This commit is contained in:
Pek5892 2023-11-28 15:09:01 +01:00
parent 405c2f01e5
commit 88d400b132
1 changed files with 6 additions and 4 deletions

View File

@ -175,10 +175,12 @@ foreach ($righe as $key => $riga) {
$evasione_bar['or_righe_ordini'] = 'success'; $evasione_bar['or_righe_ordini'] = 'success';
foreach ($evasione_bar as $table => $color) { foreach ($evasione_bar as $table => $color) {
$righe_ev = $dbo->table($table)->where('original_id', $riga->id)->where('original_type', get_class($riga))->get(); $righe_ev = $dbo->table($table)->where('original_id', $riga->id)->where('original_type', get_class($riga))->get();
$perc_ev = $righe_ev->sum('qta') * 100 / $riga->qta; if ($righe_ev->count() > 0) {
if ($perc_ev > 0) { $perc_ev = $righe_ev->sum('qta') * 100 / $riga->qta;
echo ' if ($perc_ev > 0) {
<div class="progress-bar progress-bar-'.$color.'" style="width:'.$perc_ev.'%"></div>'; echo '
<div class="progress-bar progress-bar-'.$color.'" style="width:'.$perc_ev.'%"></div>';
}
} }
} }
echo ' echo '