Skip to content

Commit

Permalink
fix: getting scrap items from sub assemblies by fetching scrap items …
Browse files Browse the repository at this point in the history
…for parent BOM
  • Loading branch information
Carlos9k authored and KerollesFathy committed Aug 26, 2024
1 parent 0decd09 commit da7b691
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion erpnext/manufacturing/doctype/bom/bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,10 @@ def get_scrap_items_from_sub_assemblies(bom_no, company, qty, scrap_items=None):
fields=["bom_no", "qty"],
order_by="idx asc",
)

# fetch Scrap Items for Parent Bom
items = get_bom_items_as_dict(bom_no, company, qty=qty, fetch_exploded=0, fetch_scrap_items=1)
scrap_items.update(items)

for row in bom_items:
if not row.bom_no:
continue
Expand Down

0 comments on commit da7b691

Please sign in to comment.