fix: requested filters changes

This commit is contained in:
Anurag Mishra 2019-05-28 11:08:14 +05:30
parent 32c23ae274
commit a69f72988a

View File

@ -113,6 +113,10 @@ def get_conditions(filters):
where wh.lft >= %s and wh.rgt <= %s and sle.warehouse = wh.name)"%(warehouse_details.lft,
warehouse_details.rgt)
if filters.get("warehouse_type") and not filters.get("warehouse"):
conditions += " and exists (select name from `tabWarehouse` wh \
where wh.warehouse_type = '%s' and sle.warehouse = wh.name)"%(filters.get("warehouse_type"))
return conditions
def get_stock_ledger_entries(filters, items):