fix: use stock adjustment account if no expense account

(cherry picked from commit b2e109318f)
This commit is contained in:
ravibharathi656
2025-09-26 14:54:21 +05:30
committed by Mergify
parent 50f9521feb
commit 9c81f448c8

View File

@@ -2042,7 +2042,7 @@ class StockEntry(StockController):
to_warehouse = item.get("default_warehouse")
expense_account = item.get("expense_account")
if self.purpose == "Manufacture" or not expense_account:
if not expense_account:
expense_account = frappe.get_cached_value("Company", self.company, "stock_adjustment_account")
args = {
"to_warehouse": to_warehouse,