mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-12 17:23:38 +00:00
fix(subcontract): ignore BOM qty validation for alternative items (#51122)
(cherry picked from commit 2f19244660)
Co-authored-by: Kavin <78342682+kavin-114@users.noreply.github.com>
This commit is contained in:
@@ -543,6 +543,12 @@ class SubcontractingReceipt(SubcontractingController):
|
||||
|
||||
for row in self.items:
|
||||
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(
|
||||
row.item_code, row.bom, row.get("include_exploded_items")
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user