fix: set stock adjustment account for the raw materials instead of COGS (#19090)
This commit is contained in:
parent
d019d28bc9
commit
780fb8a4e5
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user