From ddb637724561429e87febe354664913726da707f Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Thu, 2 Oct 2025 22:20:11 +0200 Subject: [PATCH] Add debugging for D-section calculation Added: - Debug logging for total VAT collected and deductible amounts - This will help identify why line 25 shows wrong value (should be 406.28) - Will show what values are being summed for the totals --- core/class/declarationtva.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/class/declarationtva.class.php b/core/class/declarationtva.class.php index 59dca09..661d93d 100644 --- a/core/class/declarationtva.class.php +++ b/core/class/declarationtva.class.php @@ -276,6 +276,9 @@ class DeclarationTVA } } + // Debug totals + error_log("DeclarationTVA: Total VAT collected: $total_vat_collected, Total VAT deductible: $total_vat_deductible"); + // Calculate D-section result lines (25, 26, 28, 29) $this->calculateDSectionLines($declaration_id, $total_vat_collected, $total_vat_deductible);