Skip to content

Commit

Permalink
chore: add validation for depreciation expense account in asset categ…
Browse files Browse the repository at this point in the history
…ory (#36659)
  • Loading branch information
anandbaburajan committed Aug 15, 2023
1 parent 1e07f6e commit e0c79d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions erpnext/assets/doctype/asset_category/asset_category.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ frappe.ui.form.on('Asset Category', {
var d = locals[cdt][cdn];
return {
"filters": {
"account_type": "Depreciation",
"root_type": ["in", ["Expense", "Income"]],
"is_group": 0,
"company": d.company_name
Expand Down
2 changes: 1 addition & 1 deletion erpnext/assets/doctype/asset_category/asset_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def validate_account_types(self):
account_type_map = {
"fixed_asset_account": {"account_type": ["Fixed Asset"]},
"accumulated_depreciation_account": {"account_type": ["Accumulated Depreciation"]},
"depreciation_expense_account": {"root_type": ["Expense", "Income"]},
"depreciation_expense_account": {"account_type": ["Depreciation"]},
"capital_work_in_progress_account": {"account_type": ["Capital Work in Progress"]},
}
for d in self.accounts:
Expand Down

0 comments on commit e0c79d3

Please sign in to comment.