From e7d0639edc9129fd179790bbcc201035f73a8357 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 28 Jul 2016 16:56:46 +0530 Subject: [PATCH] Set difference amount in Payment Entry as per field precision --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 3eed70cbcc..6c04cf53cc 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -267,6 +267,8 @@ class PaymentEntry(AccountsController): if d.amount: self.difference_amount -= flt(d.amount) + self.difference_amount = flt(self.difference_amount, self.precision("difference_amount")) + def clear_unallocated_reference_document_rows(self): self.set("references", self.get("references", {"allocated_amount": ["not in", [0, None, ""]]}))