From 26345aee03620445767f08470763dba520db7f8e Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Tue, 7 Oct 2025 15:25:56 +0200 Subject: [PATCH] Add debugging to journal entries generation - Added debug logging to see how many balancing entries are found - Added logging to show each balancing entry being added - Added total count of entries after balancing - Should help identify if entries are being added to the PDF --- core/class/declarationtva_pdf.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/class/declarationtva_pdf.class.php b/core/class/declarationtva_pdf.class.php index e5240a6..67622c3 100644 --- a/core/class/declarationtva_pdf.class.php +++ b/core/class/declarationtva_pdf.class.php @@ -1871,11 +1871,14 @@ class DeclarationTVA_PDF // Add balancing entry to ensure debits equal credits $balancing_entries = $this->getBalancingEntries($declaration, $entries); + error_log("DeclarationTVA: Found " . count($balancing_entries) . " balancing entries"); foreach ($balancing_entries as $entry) { if ($entry) { + error_log("DeclarationTVA: Adding balancing entry: " . $entry['account_code'] . " " . $entry['debit'] . " " . $entry['credit']); $entries[] = $entry; } } + error_log("DeclarationTVA: Total entries after balancing: " . count($entries)); return $entries; }