fix: Brand filter in Stock Analytics

This commit is contained in:
marination 2021-08-10 20:37:09 +05:30
parent 55d8aaf0b6
commit eb2050b407

View File

@ -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: