From 8fd3e1d5a88c4c73abbedbd568eef87d26a940cb Mon Sep 17 00:00:00 2001 From: John BOTELLA <68917336+thersane-john@users.noreply.github.com> Date: Wed, 10 Jun 2026 20:35:19 +0200 Subject: [PATCH] Fix inverted hidden conf (#38452) * Fix inverted conf * Apply suggestion from @thersane-john * Apply suggestion from @thersane-john --------- Co-authored-by: Alexandre SPANGARO --- htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 5bac5e3b8f3..ceede425561 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -1911,8 +1911,8 @@ class pdf_sponge extends ModelePDFFactures // Show total discount only if there is some discount on lines if ($total_discount_on_lines > 0 && !$object->isSituationInvoice()) { - // Show discount except on credit note type invoices - if (!getDolGlobalString('MAIN_HIDE_AMOUNT_DISCOUNT') && $object->type != 2) { + // Show total NET before discount except on credit note type invoices + if (!getDolGlobalString('MAIN_HIDE_AMOUNT_BEFORE_DISCOUNT') && $object->type != 2) { $pdf->SetFillColor(255, 255, 255); $pdf->SetXY($col1x, $tab2_top); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHTBeforeDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHTBeforeDiscount") : ''), 0, 'L', true); @@ -1924,8 +1924,8 @@ class pdf_sponge extends ModelePDFFactures $index++; } - // Show total NET before discount except on credit note type invoices - if (!getDolGlobalString('MAIN_HIDE_AMOUNT_BEFORE_DISCOUNT') && $object->type != 2) { + // Show discount except on credit note type invoices + if (!getDolGlobalString('MAIN_HIDE_AMOUNT_DISCOUNT') && $object->type != 2) { $pdf->SetFillColor(255, 255, 255); $pdf->SetXY($col1x, $tab2_top + $tab2_hl); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalDiscount") : ''), 0, 'L', true);