From 7246b635423de07788507257da974b1dae6e0024 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Thu, 12 Dec 2019 17:34:37 +0100 Subject: [PATCH] NEW add total weighted amount in project list --- htdocs/projet/list.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 837948bed3e..2f7e30641b7 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -702,6 +702,7 @@ print "\n"; $i = 0; $totalarray = array(); +$totalarray['val'] = array(); while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); @@ -858,12 +859,15 @@ while ($i < min($num, $limit)) // Opp weighted amount if (!empty($arrayfields['opp_weighted_amount']['checked'])) { + if (!isset($totalarray['val']['opp_weighted_amount'])) $totalarray['val']['opp_weighted_amount'] = 0; print ''; if ($obj->opp_weighted_amount) { print price($obj->opp_weighted_amount, 1, $langs, 1, -1, -1, ''); + $totalarray['val']['opp_weighted_amount'] += $obj->opp_weighted_amount; } print ''; if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['pos'][$totalarray['nbfield']] = 'opp_weighted_amount'; } // Budget if (! empty($arrayfields['p.budget_amount']['checked']))