mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +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
|
return iwb_map
|
||||||
|
|
||||||
def get_items(filters):
|
def get_items(filters):
|
||||||
|
"Get items based on item code, item group or brand."
|
||||||
conditions = []
|
conditions = []
|
||||||
if filters.get("item_code"):
|
if filters.get("item_code"):
|
||||||
conditions.append("item.name=%(item_code)s")
|
conditions.append("item.name=%(item_code)s")
|
||||||
else:
|
else:
|
||||||
if filters.get("item_group"):
|
if filters.get("item_group"):
|
||||||
conditions.append(get_item_group_condition(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 = []
|
items = []
|
||||||
if conditions:
|
if conditions:
|
||||||
|
|||||||
Reference in New Issue
Block a user