fix: Customer Credit Balance Report query fix (#19105)
This commit is contained in:
parent
50e591b815
commit
cef75a5987
@ -60,7 +60,7 @@ def get_details(filters):
|
|||||||
conditions = ""
|
conditions = ""
|
||||||
|
|
||||||
if filters.get("customer"):
|
if filters.get("customer"):
|
||||||
conditions += " AND c.name = " + filters.get("customer")
|
conditions += " AND c.name = '" + filters.get("customer") + "'"
|
||||||
|
|
||||||
return frappe.db.sql("""SELECT
|
return frappe.db.sql("""SELECT
|
||||||
c.name, c.customer_name,
|
c.name, c.customer_name,
|
||||||
@ -69,6 +69,6 @@ def get_details(filters):
|
|||||||
FROM `tabCustomer` c, `tabCustomer Credit Limit` ccl
|
FROM `tabCustomer` c, `tabCustomer Credit Limit` ccl
|
||||||
WHERE
|
WHERE
|
||||||
c.name = ccl.parent
|
c.name = ccl.parent
|
||||||
AND ccl.company = %s
|
AND ccl.company = '{0}'
|
||||||
{0}
|
{1}
|
||||||
""".format(conditions), (filters.get("company")), as_dict=1) #nosec
|
""".format( filters.get("company"),conditions), as_dict=1) #nosec
|
||||||
|
Loading…
x
Reference in New Issue
Block a user