From cc6ca97dc53fed52ba3e3ec5b47569c752a18aa7 Mon Sep 17 00:00:00 2001 From: Michelle Alva <50285544+michellealva@users.noreply.github.com> Date: Fri, 18 Sep 2020 15:50:29 +0530 Subject: [PATCH] fix: Item-wise Sales History Report Error (#23349) Co-authored-by: Rucha Mahabal --- .../report/item_wise_sales_history/item_wise_sales_history.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0a70b97648..c716aa96e0 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 @@ -188,7 +188,7 @@ def get_conditions(filters): conditions += "AND so.transaction_date <= '%s'" %filters.to_date if filters.get("item_code"): - conditions += "AND so_item.item_code = '%s'" %frappe.db.escape(filters.item_code) + 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)