Don't show disabled items in the stock balance report (#14851)

This commit is contained in:
rohitwaghchaure 2018-07-09 16:56:41 +05:30 committed by Nabin Hait
parent f38d6d9c44
commit 07d0e9a2b2

View File

@ -21,6 +21,7 @@ def execute(filters=None):
data = []
for (company, item, warehouse) in sorted(iwb_map):
if item_map.get(item):
qty_dict = iwb_map[(company, item, warehouse)]
item_reorder_level = 0
item_reorder_qty = 0
@ -205,7 +206,7 @@ def get_item_details(items, sle, filters):
for item in frappe.db.sql("""
select name, item_name, description, item_group, brand, stock_uom
from `tabItem`
where name in ({0})
where name in ({0}) and ifnull(disabled, 0) = 0
""".format(', '.join(['"' + frappe.db.escape(i, percent=False) + '"' for i in items])), as_dict=1):
item_details.setdefault(item.name, item)