Skip to content

Commit

Permalink
fix: Filters in item-wise sales history report (#34145)
Browse files Browse the repository at this point in the history
fix: Filters in item-wise sales history report (#34145)

(cherry picked from commit c88444a)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
  • Loading branch information
mergify[bot] and deepeshgarg007 authored Feb 21, 2023
1 parent 65aec3e commit 44c837f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def get_sales_order_details(company_list, filters):
)

if filters.get("item_group"):
query = query.where(db_so_item.item_group == frappe.db.escape(filters.item_group))
query = query.where(db_so_item.item_group == filters.item_group)

if filters.get("from_date"):
query = query.where(db_so.transaction_date >= filters.from_date)
Expand All @@ -225,7 +225,7 @@ def get_sales_order_details(company_list, filters):
query = query.where(db_so.transaction_date <= filters.to_date)

if filters.get("item_code"):
query = query.where(db_so_item.item_group == frappe.db.escape(filters.item_code))
query = query.where(db_so_item.item_code == filters.item_code)

if filters.get("customer"):
query = query.where(db_so.customer == filters.customer)
Expand Down

0 comments on commit 44c837f

Please sign in to comment.