From b3b059b0ea9fe350a4c9862cfb81261a2d740005 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 31 Jul 2015 10:49:34 +0530 Subject: [PATCH] [fix] payment reconciliation --- .../doctype/payment_reconciliation/payment_reconciliation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index ecbf78ce37..bcca0f2da1 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -192,9 +192,9 @@ class PaymentReconciliation(Document): .format(p.idx, p.allocated_amount, p.amount)) invoice_outstanding = unreconciled_invoices.get(p.invoice_type, {}).get(p.invoice_number) - if abs(flt(p.allocated_amount) - invoice_outstanding) > 0.009: + if flt(p.allocated_amount) - invoice_outstanding > 0.009: frappe.throw(_("Row {0}: Allocated amount {1} must be less than or equals to invoice outstanding amount {2}") - .format(p.idx, p.allocated_amount, unreconciled_invoices.get(p.invoice_type, {}).get(p.invoice_number))) + .format(p.idx, p.allocated_amount, invoice_outstanding)) if not invoices_to_reconcile: frappe.throw(_("Please select Allocated Amount, Invoice Type and Invoice Number in atleast one row"))