mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-01 12:38:27 +00:00
fix: Brand filter in Stock Analytics
This commit is contained in:
@@ -235,12 +235,15 @@ def filter_items_with_no_transactions(iwb_map, float_precision):
|
||||
return iwb_map
|
||||
|
||||
def get_items(filters):
|
||||
"Get items based on item code, item group or brand."
|
||||
conditions = []
|
||||
if filters.get("item_code"):
|
||||
conditions.append("item.name=%(item_code)s")
|
||||
else:
|
||||
if filters.get("item_group"):
|
||||
conditions.append(get_item_group_condition(filters.get("item_group")))
|
||||
if filters.get("brand"): # used in stock analytics report
|
||||
conditions.append("item.brand=%(brand)s")
|
||||
|
||||
items = []
|
||||
if conditions:
|
||||
|
||||
Reference in New Issue
Block a user