mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 13:09:17 +00:00
[fix] Pull subcontracted item if subassembly is not defined (#11996)
This commit is contained in:
committed by
Nabin Hait
parent
cc05c0b348
commit
40f5d8edd4
@@ -542,7 +542,7 @@ def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_ite
|
|||||||
|
|
||||||
if fetch_exploded:
|
if fetch_exploded:
|
||||||
query = query.format(table="BOM Explosion Item",
|
query = query.format(table="BOM Explosion Item",
|
||||||
where_conditions="""and item.is_sub_contracted_item = 0""",
|
where_conditions="",
|
||||||
select_columns = ", bom_item.source_warehouse, (Select idx from `tabBOM Item` where item_code = bom_item.item_code and parent = %(parent)s ) as idx")
|
select_columns = ", bom_item.source_warehouse, (Select idx from `tabBOM Item` where item_code = bom_item.item_code and parent = %(parent)s ) as idx")
|
||||||
items = frappe.db.sql(query, { "parent": bom, "qty": qty, "bom": bom }, as_dict=True)
|
items = frappe.db.sql(query, { "parent": bom, "qty": qty, "bom": bom }, as_dict=True)
|
||||||
elif fetch_scrap_items:
|
elif fetch_scrap_items:
|
||||||
|
|||||||
Reference in New Issue
Block a user