fix: precision on comparing with the outstanding amount (#18375)

This commit is contained in:
Mangesh-Khairnar 2019-07-22 11:29:26 +05:30 committed by Nabin Hait
parent 64c780e8c7
commit 88620d6cbb

View File

@ -861,7 +861,7 @@ class AccountsController(TransactionBase):
if self.doctype in ("Sales Invoice", "Purchase Invoice"):
grand_total = grand_total - flt(self.write_off_amount)
if total != grand_total:
if total != flt(grand_total, self.precision("grand_total")):
frappe.throw(_("Total Payment Amount in Payment Schedule must be equal to Grand / Rounded Total"))
def is_rounded_total_disabled(self):