mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
Merge pull request #50591 from khushi8112/validate-depreciation-account-type
fix: validate account type of depreciation account
This commit is contained in:
@@ -453,7 +453,7 @@ class JournalEntry(AccountsController):
|
|||||||
if (
|
if (
|
||||||
d.reference_type == "Asset"
|
d.reference_type == "Asset"
|
||||||
and d.reference_name
|
and d.reference_name
|
||||||
and d.account_type == "Depreciation"
|
and frappe.get_cached_value("Account", d.account, "root_type") == "Expense"
|
||||||
and d.debit
|
and d.debit
|
||||||
):
|
):
|
||||||
asset = frappe.get_cached_doc("Asset", d.reference_name)
|
asset = frappe.get_cached_doc("Asset", d.reference_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user