fix: Type error handling while getting material request items (#18549)

* fix: Type error handling while getting material request items

* fix: Remove flt
This commit is contained in:
Deepesh Garg 2019-08-05 10:12:42 +05:30 committed by Nabin Hait
parent a7eaa4de14
commit fb5aa43e77

View File

@ -430,7 +430,7 @@ def download_raw_materials(production_plan):
continue
item_list.append(['', '', '', '', bin_dict.get('warehouse'),
bin_dict.get('projected_qty'), bin_dict.get('actual_qty')])
bin_dict.get('projected_qty', 0), bin_dict.get('actual_qty', 0)])
build_csv_response(item_list, doc.name)
@ -507,8 +507,8 @@ def get_material_request_items(row, sales_order,
required_qty = 0
if ignore_existing_ordered_qty or bin_dict.get("projected_qty", 0) < 0:
required_qty = total_qty
elif total_qty > bin_dict.get("projected_qty"):
required_qty = total_qty - bin_dict.get("projected_qty")
elif total_qty > bin_dict.get("projected_qty", 0):
required_qty = total_qty - bin_dict.get("projected_qty", 0)
if required_qty > 0 and required_qty < row['min_order_qty']:
required_qty = row['min_order_qty']
item_group_defaults = get_item_group_defaults(row.item_code, company)