diff --git a/core/class/declarationtva_pdf.class.php b/core/class/declarationtva_pdf.class.php index b74aa37..b86dab6 100644 --- a/core/class/declarationtva_pdf.class.php +++ b/core/class/declarationtva_pdf.class.php @@ -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)) + ); } } }