From 9737acc75aae082fb14dcbabe0a2348ca51281d0 Mon Sep 17 00:00:00 2001 From: atm-florian Date: Wed, 3 Dec 2025 15:34:12 +0100 Subject: [PATCH] FIX wrong indentation --- htdocs/core/lib/pdf.lib.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 9ceb5cf5e2f..6327c41bd39 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -2413,7 +2413,7 @@ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookm // 2 = situation_percent is non-cumulative (delta of current situation) // 1 = (old mode): situation_percent is cumulative (state at situation) $isCumulative = getDolGlobalInt('INVOICE_USE_SITUATION') === 1; - $showDelta = (bool) getDolGlobalInt('SITUATION_DISPLAY_DIFF_ON_PDF'); + $showDelta = (bool)getDolGlobalInt('SITUATION_DISPLAY_DIFF_ON_PDF'); if ($isCumulative xor $showDelta) { // Either: @@ -2425,14 +2425,14 @@ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookm // - old mode but we want to show a delta or // - new mode but we want to show a total $prev_progress = 0; - if (method_exists($object->lines[$i], 'get_prev_progress')) { - $prev_progress = $object->lines[$i]->get_prev_progress($object->id); - } - $result = $isCumulative ? - // old mode: we need to compute the delta (total - sum of previous) - $object->lines[$i]->situation_percent - $prev_progress : - // new mode: we need to compute the total (sum of previous + delta) - $prev_progress + $object->lines[$i]->situation_percent; + if (method_exists($object->lines[$i], 'get_prev_progress')) { + $prev_progress = $object->lines[$i]->get_prev_progress($object->id); + } + $result = $isCumulative ? + // old mode: we need to compute the delta (total - sum of previous) + $object->lines[$i]->situation_percent - $prev_progress : + // new mode: we need to compute the total (sum of previous + delta) + $prev_progress + $object->lines[$i]->situation_percent; } $result = round($result, 1).'%'; }