From 272410bb875d290f247dd7336ca5defb3f5fda11 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 5 Sep 2013 15:43:05 +0530 Subject: [PATCH] [fix] [minor] fixes in payment reconciiation --- .../payment_to_invoice_matching_tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py index dc2bcc585d..7522c23f28 100644 --- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py +++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py @@ -19,7 +19,7 @@ class DocType: webnotes.conn.get_value("Account", self.doc.account, "debit_or_credit").lower() or "" def get_voucher_details(self): - total_amount = webnotes.conn.sql("""select %s from `tabGL Entry` + total_amount = webnotes.conn.sql("""select sum(%s) from `tabGL Entry` where voucher_type = %s and voucher_no = %s and account = %s and ifnull(is_cancelled, 'No') = 'No'""" % (self.doc.account_type, '%s', '%s', '%s'),