mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
fix: added default value for projected_qty in bin_dict
`projected_qty` if not in `bin_dict` would return None. And when compared to an integer would result in a TypeError. This PR fixes this Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user