fix: incorrect expense account book in purchase return

(cherry picked from commit 2a720e7008)
This commit is contained in:
Rohit Waghchaure
2026-04-30 20:36:20 +05:30
committed by Mergify
parent 3919c3d385
commit 04de662222

View File

@@ -673,6 +673,9 @@ class PurchaseReceipt(BuyingController):
or stock_asset_rbnb
)
if self.is_return and item.expense_account:
loss_account = item.expense_account
cost_center = item.cost_center or frappe.get_cached_value(
"Company", self.company, "cost_center"
)