diff --git a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py index 1bc4657f295c..0a70b97648bd 100644 --- a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py +++ b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py @@ -191,7 +191,7 @@ def get_conditions(filters): conditions += "AND so_item.item_code = '%s'" %frappe.db.escape(filters.item_code) if filters.get("customer"): - conditions += "AND so.customer = '%s'" %frappe.db.escape(filters.customer) + conditions += "AND so.customer = %s" %frappe.db.escape(filters.customer) return conditions