From 79fdc0d8cab32b9fa8a9abc121545c345bc834f7 Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Fri, 3 Oct 2025 15:33:35 +0200 Subject: [PATCH] Remove debug logging for lines 08, 09, 9B calculation - Removed debug logging that was added to troubleshoot line 08 display issues - The issue was identified as database field length limit (varchar(255) vs TEXT) - Calculation is working correctly - line 08 shows base=1410.57, vat=186.34, total=1596.91 - User needs to run the database migration to fix the line_label field length --- core/class/declarationtva.class.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/core/class/declarationtva.class.php b/core/class/declarationtva.class.php index 71d2e71..99e918b 100644 --- a/core/class/declarationtva.class.php +++ b/core/class/declarationtva.class.php @@ -220,27 +220,18 @@ class DeclarationTVA if (in_array($ca3_line, array('08', '09', '9B'))) { // Get base accounts (sales) $base_mappings = isset($grouped_mappings[$ca3_line . '_BASE']) ? $grouped_mappings[$ca3_line . '_BASE'] : array(); - error_log("DeclarationTVA: Line $ca3_line BASE mappings found: " . count($base_mappings)); foreach ($base_mappings as $mapping) { $amounts = $this->getAccountAmounts($mapping['account_code'], $period['start_date'], $period['end_date']); $line_total_base += $amounts['base_amount']; $account_labels[] = $mapping['account_label'] . ' (base)'; - error_log("DeclarationTVA: BASE account " . $mapping['account_code'] . " added " . $amounts['base_amount'] . " to line_total_base"); } // Get VAT accounts $vat_mappings = isset($grouped_mappings[$ca3_line . '_VAT']) ? $grouped_mappings[$ca3_line . '_VAT'] : array(); - error_log("DeclarationTVA: Line $ca3_line VAT mappings found: " . count($vat_mappings)); foreach ($vat_mappings as $mapping) { $amounts = $this->getAccountAmounts($mapping['account_code'], $period['start_date'], $period['end_date']); $line_total_vat += $amounts['vat_amount']; $account_labels[] = $mapping['account_label'] . ' (VAT)'; - error_log("DeclarationTVA: VAT account " . $mapping['account_code'] . " added " . $amounts['vat_amount'] . " to line_total_vat"); - } - - // Debug: Check if we have any mappings at all for this line - if (empty($base_mappings) && empty($vat_mappings)) { - error_log("DeclarationTVA: No BASE or VAT mappings found for line $ca3_line. Available mappings: " . implode(', ', array_keys($grouped_mappings))); } $line_total_amount = $line_total_base + $line_total_vat;