From d15b7ca9af106989866e9b6fac800cc1ed6e71fd Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 18:12:36 +0530 Subject: [PATCH] fix: fix sub assembly qty calculation in production plan when bom level >= 1 (backport #47296) (#47315) * fix: fix sub assembly qty calculation in production plan when bom level >= 1 (cherry picked from commit bfc4ce1d5dd67a7b2a3b1d7c931077446bbdd036) * fix: logical error (cherry picked from commit ee10afc0747a15f7da623ab6e1c5dceb0364424a) --------- Co-authored-by: Mihir Kandoi --- erpnext/manufacturing/doctype/production_plan/production_plan.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 681abc8ddde..dbcf07bbccf 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -1768,6 +1768,7 @@ def get_sub_assembly_items( continue else: stock_qty = stock_qty - _bin_dict.projected_qty + sub_assembly_items.append(d.item_code) elif warehouse: bin_details.setdefault(d.item_code, get_bin_details(d, company, for_warehouse=warehouse))