Fix balancing entry account codes for proper VAT accounting
- If difference < 0 (more credits): Use 4456700 (TVA à payer) on debit side - If difference > 0 (more debits): Use 4455100 (TVA à recevoir) on credit side - Each account gets its real label from chart of accounts - Proper French VAT accounting logic for balancing entries
This commit is contained in:
parent
009ad50d65
commit
ea624ba3cb
@ -2073,23 +2073,24 @@ class DeclarationTVA_PDF
|
||||
return null;
|
||||
}
|
||||
|
||||
// Get real account description for 4456700
|
||||
$account_label = $this->getAccountLabel('4456700');
|
||||
|
||||
if ($difference < 0) {
|
||||
// More credits than debits, add debit to balance (TVA à payer)
|
||||
$entry = array(
|
||||
'account_code' => '4456700',
|
||||
'account_label' => $account_label,
|
||||
'account_label' => $this->getAccountLabel('4456700'),
|
||||
'entry_label' => $declaration->declaration_name,
|
||||
'debit' => '',
|
||||
'debit' => $this->formatAmount(round(abs($difference))),
|
||||
'credit' => ''
|
||||
);
|
||||
|
||||
if ($difference < 0) {
|
||||
// More credits than debits, add debit to balance
|
||||
$entry['debit'] = $this->formatAmount(round(abs($difference)));
|
||||
} else {
|
||||
// More debits than credits, add credit to balance
|
||||
$entry['credit'] = $this->formatAmount(round($difference));
|
||||
// More debits than credits, add credit to balance (TVA à recevoir)
|
||||
$entry = array(
|
||||
'account_code' => '4455100',
|
||||
'account_label' => $this->getAccountLabel('4455100'),
|
||||
'entry_label' => $declaration->declaration_name,
|
||||
'debit' => '',
|
||||
'credit' => $this->formatAmount(round($difference))
|
||||
);
|
||||
}
|
||||
|
||||
return $entry;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user