fix: query (#19376)

This commit is contained in:
Anurag Mishra 2019-10-22 11:46:17 +05:30 committed by Nabin Hait
parent ed8e3b3786
commit eaff541349

View File

@ -30,7 +30,7 @@ def get_total_stock(filters):
if filters.get("group_by") == "Warehouse":
if filters.get("company"):
conditions += " AND warehouse.company = '%s'" % frappe.db.escape(filters.get("company"), percent=False)
conditions += " AND warehouse.company = %s" % frappe.db.escape(filters.get("company"), percent=False)
conditions += " GROUP BY ledger.warehouse, item.item_code"
columns += "'' as company, ledger.warehouse"