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,12 +175,14 @@ 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();
if ($righe_ev->count() > 0) {
$perc_ev = $righe_ev->sum('qta') * 100 / $riga->qta; $perc_ev = $righe_ev->sum('qta') * 100 / $riga->qta;
if ($perc_ev > 0) { if ($perc_ev > 0) {
echo ' echo '
<div class="progress-bar progress-bar-'.$color.'" style="width:'.$perc_ev.'%"></div>'; <div class="progress-bar progress-bar-'.$color.'" style="width:'.$perc_ev.'%"></div>';
} }
} }
}
echo ' echo '
</div> </div>
</td>'; </td>';