Merge pull request #18415 from frappe/Salmanmulani-patch-1

fix: added default value for projected_qty in bin_dict
This commit is contained in:
rohitwaghchaure 2019-07-19 11:52:57 +05:30 committed by GitHub
commit 65f01dddc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -505,7 +505,7 @@ def get_material_request_items(row, sales_order,
total_qty = row['qty'] total_qty = row['qty']
required_qty = 0 required_qty = 0
if ignore_existing_ordered_qty or bin_dict.get("projected_qty") < 0: if ignore_existing_ordered_qty or bin_dict.get("projected_qty", 0) < 0:
required_qty = total_qty required_qty = total_qty
elif total_qty > bin_dict.get("projected_qty"): elif total_qty > bin_dict.get("projected_qty"):
required_qty = total_qty - bin_dict.get("projected_qty") required_qty = total_qty - bin_dict.get("projected_qty")