Exclude line 17 from automatic calculation

Fixed:
- Line 17 is for manual entry only (paper form)
- Removed line 17 from automatic totals calculation
- Only lines 08, 09, 9B contribute to total_vat_collected
- This should give the correct value for line 25
This commit is contained in:
Frank Cools 2025-10-02 22:29:57 +02:00
parent 1cf0d3d6a5
commit 01a944fbfc

View File

@ -269,8 +269,8 @@ class DeclarationTVA
error_log("DeclarationTVA: Final amounts for line $ca3_line: base=$line_total_base, vat=$line_total_vat, total=$line_total_amount"); error_log("DeclarationTVA: Final amounts for line $ca3_line: base=$line_total_base, vat=$line_total_vat, total=$line_total_amount");
// Update totals - only VAT amounts from sections B and C // Update totals - only VAT amounts from sections B and C
if (in_array($ca3_line, ['08', '09', '9B', '17'])) { if (in_array($ca3_line, ['08', '09', '9B'])) {
// Section B: VAT amounts only // Section B: VAT amounts only (line 17 is manual entry)
$total_vat_collected += $line_total_vat; $total_vat_collected += $line_total_vat;
} elseif (in_array($ca3_line, ['20', '21', '22'])) { } elseif (in_array($ca3_line, ['20', '21', '22'])) {
// Section C: VAT amounts only // Section C: VAT amounts only