[Fix] Wrong projected qty for warehouse group in the process of reorder item making extra material requests

This commit is contained in:
Rohit Waghchaure 2018-01-20 15:44:38 +05:30
parent c8e016522d
commit f83f6aae22

View File

@ -86,7 +86,11 @@ def get_item_warehouse_projected_qty(items_to_consider):
and (warehouse != "" and warehouse is not null)"""\
.format(", ".join(["%s"] * len(items_to_consider))), items_to_consider):
item_warehouse_projected_qty.setdefault(item_code, {})[warehouse] = flt(projected_qty)
if item_code not in item_warehouse_projected_qty:
item_warehouse_projected_qty.setdefault(item_code, {})
if warehouse not in item_warehouse_projected_qty.get(item_code):
item_warehouse_projected_qty[item_code][warehouse] = flt(projected_qty)
warehouse_doc = frappe.get_doc("Warehouse", warehouse)