From 8acc5e148678fcf0d40d4c77c57b8adb86187bbd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 8 Feb 2021 23:37:32 +0100 Subject: [PATCH] Fix calculation of profit --- htdocs/projet/element.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index c513123c9bf..3d6f954f439 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -777,7 +777,6 @@ foreach ($listofreferent as $key => $value) // Each element with at least one line is output $qualifiedforfinalprofit = true; if ($key == 'intervention' && empty($conf->global->PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT)) $qualifiedforfinalprofit = false; - if ($key == 'propal' && $element->status != Propal::STATUS_SIGNED && $element->status != Propal::STATUS_BILLED) $qualifiedforfinalprofit = false; //var_dump($key.' '.$qualifiedforfinalprofit); // Calculate margin @@ -787,8 +786,7 @@ foreach ($listofreferent as $key => $value) $total_revenue_ht += $total_ht; } - if ($margin != "add") // Revert sign - { + if ($margin != "add") { // Revert sign $total_ht = -$total_ht; $total_ttc = -$total_ttc; }