From de3b79cce8fd844a3870a60d22ebbabb8975f60a Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Thu, 18 Jul 2019 13:51:05 +0530 Subject: [PATCH] fix: precision on comparing with the outstanding amount (#18374) --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index b98fbf42cdd..ebf51104bf2 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -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):