From 780fb8a4e520472eebf4374479378c5013ba8836 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 17 Sep 2019 18:46:50 +0530 Subject: [PATCH] fix: set stock adjustment account for the raw materials instead of COGS (#19090) --- 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 8eb4c9c28c8..f82afb766c6 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -648,7 +648,7 @@ def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_ite item_dict[item.item_code] = item for item, item_details in item_dict.items(): - for d in [["Account", "expense_account", "default_expense_account"], + for d in [["Account", "expense_account", "stock_adjustment_account"], ["Cost Center", "cost_center", "cost_center"], ["Warehouse", "default_warehouse", ""]]: company_in_record = frappe.db.get_value(d[0], item_details.get(d[1]), "company") if not item_details.get(d[1]) or (company_in_record and company != company_in_record):