mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
fix(subcontract): ignore BOM qty validation for alternative items (#51122)
This commit is contained in:
@@ -571,6 +571,12 @@ class SubcontractingReceipt(SubcontractingController):
|
|||||||
|
|
||||||
for row in self.items:
|
for row in self.items:
|
||||||
precision = row.precision("qty")
|
precision = row.precision("qty")
|
||||||
|
|
||||||
|
# if allow alternative item, ignore the validation as per BOM required qty
|
||||||
|
is_allow_alternative_item = frappe.db.get_value("BOM", row.bom, "allow_alternative_item")
|
||||||
|
if is_allow_alternative_item:
|
||||||
|
continue
|
||||||
|
|
||||||
for bom_item in self._get_materials_from_bom(
|
for bom_item in self._get_materials_from_bom(
|
||||||
row.item_code, row.bom, row.get("include_exploded_items")
|
row.item_code, row.bom, row.get("include_exploded_items")
|
||||||
):
|
):
|
||||||
|
|||||||
Reference in New Issue
Block a user