From cef75a598799e7eadfba0dbccae2e18d0030b4c6 Mon Sep 17 00:00:00 2001 From: Marica Date: Wed, 18 Sep 2019 20:00:39 +0530 Subject: [PATCH] fix: Customer Credit Balance Report query fix (#19105) --- .../customer_credit_balance/customer_credit_balance.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/report/customer_credit_balance/customer_credit_balance.py b/erpnext/selling/report/customer_credit_balance/customer_credit_balance.py index cd50568cf9..f396705460 100644 --- a/erpnext/selling/report/customer_credit_balance/customer_credit_balance.py +++ b/erpnext/selling/report/customer_credit_balance/customer_credit_balance.py @@ -60,7 +60,7 @@ def get_details(filters): conditions = "" if filters.get("customer"): - conditions += " AND c.name = " + filters.get("customer") + conditions += " AND c.name = '" + filters.get("customer") + "'" return frappe.db.sql("""SELECT c.name, c.customer_name, @@ -69,6 +69,6 @@ def get_details(filters): FROM `tabCustomer` c, `tabCustomer Credit Limit` ccl WHERE c.name = ccl.parent - AND ccl.company = %s - {0} - """.format(conditions), (filters.get("company")), as_dict=1) #nosec + AND ccl.company = '{0}' + {1} + """.format( filters.get("company"),conditions), as_dict=1) #nosec