Merge pull request #41467 from khushi8112/unlink-asset-reference-issue

Asset cancelation issue
This commit is contained in:
Nabin Hait
2024-05-14 22:41:45 +05:30
committed by GitHub

View File

@@ -457,7 +457,7 @@ class JournalEntry(AccountsController):
self.voucher_type == "Depreciation Entry"
and d.reference_type == "Asset"
and d.reference_name
and d.account_type == "Depreciation"
and frappe.get_cached_value("Account", d.account, "root_type") == "Expense"
and d.debit
):
asset = frappe.get_doc("Asset", d.reference_name)