From ad4fbc17a577add684608f142bcdb404dfdd634e Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Tue, 7 Oct 2025 14:12:38 +0200 Subject: [PATCH] Fix difference calculation to match user examples - Changed difference calculation from (debits - credits) to (credits - debits) - Now matches user examples where credit difference uses 4455100 - Should eliminate the unwanted 4456700 line in credit scenarios - 4455100 and 4456700 will never appear together now --- core/class/declarationtva_pdf.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/class/declarationtva_pdf.class.php b/core/class/declarationtva_pdf.class.php index 58b43a3..b74aa37 100644 --- a/core/class/declarationtva_pdf.class.php +++ b/core/class/declarationtva_pdf.class.php @@ -2062,7 +2062,7 @@ class DeclarationTVA_PDF } } - $difference = $total_debits - $total_credits; + $difference = $total_credits - $total_debits; // If difference is very small (less than 0.01), no balancing entry needed if (abs($difference) < 0.01) {