From 88d400b132d3d1a49588b74696088618e1389cc2 Mon Sep 17 00:00:00 2001 From: Pek5892 Date: Tue, 28 Nov 2023 15:09:01 +0100 Subject: [PATCH] Fix #1396 --- modules/preventivi/row-list.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/preventivi/row-list.php b/modules/preventivi/row-list.php index c360c614c..1efa37ea6 100755 --- a/modules/preventivi/row-list.php +++ b/modules/preventivi/row-list.php @@ -175,10 +175,12 @@ foreach ($righe as $key => $riga) { $evasione_bar['or_righe_ordini'] = 'success'; foreach ($evasione_bar as $table => $color) { $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 ($perc_ev > 0) { - echo ' -
'; + if ($righe_ev->count() > 0) { + $perc_ev = $righe_ev->sum('qta') * 100 / $riga->qta; + if ($perc_ev > 0) { + echo ' +
'; + } } } echo '