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

This commit is contained in:
Mangesh-Khairnar
2019-07-18 13:51:05 +05:30
committed by Anurag Mishra
parent e112ac2345
commit de3b79cce8

View File

@@ -825,7 +825,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):