Skip to content

Commit 1e69593

Browse files
committed
Merge PR #4951 into 16.0
Signed-off-by TheMule71
2 parents 5694719 + 879cf89 commit 1e69593

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

l10n_it_fatturapa_in_rc/models/account_invoice.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ class Invoice(models.Model):
2525
def e_inv_check_amount_tax(self):
2626
if any(self.invoice_line_ids.mapped("rc")) and self.e_invoice_amount_tax:
2727
error_message = ""
28-
amount_added_for_rc = self.get_tax_amount_added_for_rc()
28+
amount_added_for_rc = self.currency_id.round(
29+
self.get_tax_amount_added_for_rc()
30+
)
2931
amount_tax = self.amount_tax - amount_added_for_rc
3032
if (
3133
float_compare(
@@ -50,7 +52,9 @@ def e_inv_check_amount_tax(self):
5052
def e_inv_check_amount_total(self):
5153
if any(self.invoice_line_ids.mapped("rc")) and self.e_invoice_amount_total:
5254
error_message = ""
53-
amount_added_for_rc = self.get_tax_amount_added_for_rc()
55+
amount_added_for_rc = self.currency_id.round(
56+
self.get_tax_amount_added_for_rc()
57+
)
5458
amount_total = self.amount_total - amount_added_for_rc
5559
if (
5660
float_compare(

0 commit comments

Comments
 (0)