From 696ea68f868c543f8dafb709a3da4b1a1724f82b Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 26 Jan 2026 11:35:48 +0530 Subject: [PATCH] fix: not able to complete the job card --- erpnext/manufacturing/doctype/bom/bom.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 4bee20e3609..a58a37b92a0 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1547,6 +1547,9 @@ def add_operating_cost_component_wise( if job_card and job_card.operation_id != row.name: continue + if not row.actual_operation_time: + continue + workstation_cost = frappe.get_all( "Workstation Cost", fields=["operating_component", "operating_cost"], @@ -1609,7 +1612,7 @@ def add_operations_cost(stock_entry, work_order=None, expense_account=None, job_ job_card=job_card, ) - if not cost_added: + if not cost_added and not job_card: stock_entry.append( "additional_costs", {