From a5e5365ba9c2903c8a86bbe3044a106728cded26 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Mon, 22 Dec 2025 11:34:37 +0530 Subject: [PATCH] fix: conditional check for phantom item if field exists --- erpnext/manufacturing/doctype/bom/bom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 3f79e85f276..ea43662be08 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1493,7 +1493,7 @@ def add_non_stock_items_cost(stock_entry, work_order, expense_account, job_card= items = {} for d in bom.get(table): # Phantom item is exploded, so its cost is considered via its components - if d.is_phantom_item: + if d.get("is_phantom_item"): continue items.setdefault(d.item_code, d.amount)