diff --git a/account_payment_term_discount/models/account_move.py b/account_payment_term_discount/models/account_move.py index 28a12722c2d8..a81bde465c37 100644 --- a/account_payment_term_discount/models/account_move.py +++ b/account_payment_term_discount/models/account_move.py @@ -43,7 +43,7 @@ def _compute_discount_amt(self): ) ) if discount_information[0] > 0.0: - invoice.discount_amt = abs(round(discount_information[0], 2)) + invoice.discount_amt = abs(discount_information[0]) # If discount taken make disc amt to 0 as disc is no more valid if invoice.discount_taken != 0: invoice.discount_amt = 0 diff --git a/account_payment_term_discount/models/account_payment_term.py b/account_payment_term_discount/models/account_payment_term.py index 8f88656c32a6..0d4989f74b55 100644 --- a/account_payment_term_discount/models/account_payment_term.py +++ b/account_payment_term_discount/models/account_payment_term.py @@ -39,7 +39,7 @@ def _get_payment_term_discount(self, invoice=None, payment_date=None, amount=0.0 ) if line.discount and payment_date <= till_discount_date: - payment_discount = round((amount * line.discount) / 100.0, 2) + payment_discount = (amount * line.discount) / 100.0 if invoice.move_type in ("out_invoice", "in_refund"): discount_account_id = line.discount_expense_account_id.id else: @@ -99,4 +99,4 @@ class AccountPaymentTermLine(models.Model): def OnchangeDiscount(self): if not self.discount: return {} - self.value_amount = round(1 - (self.discount / 100.0), 2) + self.value_amount = 1 - (self.discount / 100.0) diff --git a/account_payment_term_discount/wizard/account_payment_register.py b/account_payment_term_discount/wizard/account_payment_register.py index f46fac68785a..b30af988e919 100644 --- a/account_payment_term_discount/wizard/account_payment_register.py +++ b/account_payment_term_discount/wizard/account_payment_register.py @@ -44,7 +44,6 @@ def onchange_payment_amount(self): ) payment_date = fields.Date.from_string(self.payment_date) discount_amt = self.invoice_id.discount_amt - payment_difference = self.payment_difference self.payment_difference = 0.0