fix: cover case when all material needs to be bought (#29326)

When material request is to be made for purchase qty should be converted
to purchase UOM
This commit is contained in:
Ankush Menat 2022-01-17 22:14:42 +05:30 committed by GitHub
parent 9cd26fbb6a
commit 48f3d53556
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -947,10 +947,6 @@ def get_materials_from_other_locations(item, warehouses, new_mr_items, company):
locations = get_available_item_locations(item.get("item_code"),
warehouses, item.get("quantity"), company, ignore_validation=True)
if not locations:
new_mr_items.append(item)
return
required_qty = item.get("quantity")
for d in locations:
if required_qty <=0: return