Fix rounding entry side for proper balancing
- Debit difference: 758000 credit (not debit) for rounding - Credit difference: 658000 debit for rounding - Now matches user examples where debit difference uses 758000 credit - Should show correct rounding entries in journal table
This commit is contained in:
parent
ad4fbc17a5
commit
43e4072a67
@ -2107,16 +2107,7 @@ class DeclarationTVA_PDF
|
||||
|
||||
if (abs($rounding_diff) >= 0.01) {
|
||||
if ($difference < 0) {
|
||||
// Credit difference - rounding goes to 758000 debit
|
||||
$balancing_entries[] = array(
|
||||
'account_code' => '758000',
|
||||
'account_label' => $this->getAccountLabel('758000'),
|
||||
'entry_label' => $declaration->declaration_name,
|
||||
'debit' => $this->formatAmountReal(abs($rounding_diff)),
|
||||
'credit' => ''
|
||||
);
|
||||
} else {
|
||||
// Debit difference - rounding goes to 658000 debit
|
||||
// Credit difference - rounding goes to 658000 debit
|
||||
$balancing_entries[] = array(
|
||||
'account_code' => '658000',
|
||||
'account_label' => $this->getAccountLabel('658000'),
|
||||
@ -2124,6 +2115,15 @@ class DeclarationTVA_PDF
|
||||
'debit' => $this->formatAmountReal(abs($rounding_diff)),
|
||||
'credit' => ''
|
||||
);
|
||||
} else {
|
||||
// Debit difference - rounding goes to 758000 credit
|
||||
$balancing_entries[] = array(
|
||||
'account_code' => '758000',
|
||||
'account_label' => $this->getAccountLabel('758000'),
|
||||
'entry_label' => $declaration->declaration_name,
|
||||
'debit' => '',
|
||||
'credit' => $this->formatAmountReal(abs($rounding_diff))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user