From a318235a1f79d8951f724f084caec40edb75b487 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 13 Jan 2012 15:53:46 +0530 Subject: [PATCH] Fix: Paid amount + Write Off Amount and grand total difference calculation with 2 decimal precision --- .../accounts/doctype/receivable_voucher/receivable_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py index af6225b03b..59217362a3 100644 --- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py +++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py @@ -378,7 +378,7 @@ class DocType(TransactionBase): if not self.doc.cash_bank_account: msgprint("Cash/Bank Account is mandatory for POS entry") raise Exception - if (flt(self.doc.paid_amount) + flt(self.doc.write_off_amount) - flt(self.doc.grand_total))>0.001: + if (flt(self.doc.paid_amount) + flt(self.doc.write_off_amount) - round(flt(self.doc.grand_total), 2))>0.001: msgprint("(Paid amount + Write Off Amount) can not be greater than Grand Total") raise Exception