From 2ee7e67a43d3ac9a65928ba5c95eb1b975f0c3d9 Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Fri, 3 Oct 2025 15:08:56 +0200 Subject: [PATCH] Add comprehensive debug logging for D-section fields - Added debug logging for DTD_amount, D28_amount, D29_amount values - Added debug logging for all D-section field values being sent to PDF - This will help identify why lines 28 and 29 are not displaying in PDF - Debug will show if the values are being extracted correctly and what's being sent to PDF --- core/class/declarationtva_pdf.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/class/declarationtva_pdf.class.php b/core/class/declarationtva_pdf.class.php index 7abb6a2..1961208 100644 --- a/core/class/declarationtva_pdf.class.php +++ b/core/class/declarationtva_pdf.class.php @@ -349,6 +349,7 @@ class DeclarationTVA_PDF error_log("DeclarationTVA: A1_amount will be: " . $this->getCA3LineAmount($ca3_data, 'A1')); error_log("DeclarationTVA: B08_vat_amount will be: " . $this->getCA3LineAmount($ca3_data, '08', 'vat_amount')); error_log("DeclarationTVA: B09_vat_amount will be: " . $this->getCA3LineAmount($ca3_data, '09', 'vat_amount')); + error_log("DeclarationTVA: DTD_amount will be: " . $this->getCA3LineAmount($ca3_data, 'TD')); error_log("DeclarationTVA: D28_amount will be: " . $this->getCA3LineAmount($ca3_data, '28')); error_log("DeclarationTVA: D29_amount will be: " . $this->getCA3LineAmount($ca3_data, '29')); error_log("DeclarationTVA: total_vat_collected will be: " . $this->formatAmount($declaration->total_vat_collected)); @@ -386,6 +387,9 @@ class DeclarationTVA_PDF $field_data['net_vat_due'] = $this->formatAmount($declaration->net_vat_due); $field_data['vat_credit'] = $this->formatAmount($declaration->vat_credit); + // Debug: Log specific D-section fields + error_log("DeclarationTVA: D-section fields - D25: " . $field_data['D25_amount'] . ", D26: " . $field_data['D26_amount'] . ", DTD: " . $field_data['DTD_amount'] . ", D28: " . $field_data['D28_amount'] . ", D29: " . $field_data['D29_amount']); + return $field_data; }