diff --git a/core/class/declarationtva_pdf.class.php b/core/class/declarationtva_pdf.class.php index b6f9492..1b0acf4 100644 --- a/core/class/declarationtva_pdf.class.php +++ b/core/class/declarationtva_pdf.class.php @@ -2095,30 +2095,16 @@ class DeclarationTVA_PDF error_log("DeclarationTVA: Line 16: " . $line_16_amount . ", Line 23: " . $line_23_amount . ", TD: " . $td_amount); if (abs($td_amount) >= 0.01) { - $rounded_td = round($td_amount); - $rounding_diff = $td_amount - $rounded_td; + error_log("DeclarationTVA: TD amount: " . $td_amount . " (already rounded)"); - error_log("DeclarationTVA: TD amount: " . $td_amount . ", Rounded: " . $rounded_td . ", Rounding diff: " . $rounding_diff); - - // Main TD amount (rounded) on 4455100 + // TD amount is already rounded, so just use it directly $balancing_entries[] = array( 'account_code' => '4455100', 'account_label' => $this->getAccountLabel('4455100'), 'entry_label' => $declaration->declaration_name, 'debit' => '', - 'credit' => $this->formatAmount(abs($rounded_td)) + 'credit' => $this->formatAmount(abs($td_amount)) ); - - // Rounding difference on 758000 - if (abs($rounding_diff) >= 0.01) { - $balancing_entries[] = array( - 'account_code' => '758000', - 'account_label' => $this->getAccountLabel('758000'), - 'entry_label' => $declaration->declaration_name, - 'debit' => '', - 'credit' => $this->formatAmountReal(abs($rounding_diff)) - ); - } } return $balancing_entries;