Fix VAT result entry to use 4455100

- Restored getVATResultEntry call (needed for main journal entries)
- Changed account code from 4456700 to 4455100
- Uses getAccountLabel for proper account name
- Should now show 4455100 with TD amount in journal table
This commit is contained in:
Frank Cools 2025-10-07 15:48:35 +02:00
parent e225a0c35c
commit db687bdb77

View File

@ -1857,9 +1857,11 @@ class DeclarationTVA_PDF
$line20_entries = $this->getLine20Accounts($declaration, $ca3_lookup);
$entries = array_merge($entries, $line20_entries);
// VAT result is now handled in getBalancingEntries method
// Rounding difference is now handled in getBalancingEntries method
// Add VAT result on account 4455100 (changed from 4456700)
$vat_result_entry = $this->getVATResultEntry($declaration, $ca3_lookup);
if ($vat_result_entry) {
$entries[] = $vat_result_entry;
}
// Add balancing entry to ensure debits equal credits
$balancing_entries = $this->getBalancingEntries($declaration, $entries);
@ -1970,8 +1972,8 @@ class DeclarationTVA_PDF
}
$entry = array(
'account_code' => '4456700',
'account_label' => 'TVA à payer',
'account_code' => '4455100',
'account_label' => $this->getAccountLabel('4455100'),
'entry_label' => $declaration->declaration_name,
'debit' => '',
'credit' => ''