mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
fix: no server side validations for accounts in asset category
This commit is contained in:
@@ -31,7 +31,7 @@ class AssetCategory(Document):
|
|||||||
if d.get(account):
|
if d.get(account):
|
||||||
account_type = frappe.db.get_value('Account', d.get(account), 'account_type')
|
account_type = frappe.db.get_value('Account', d.get(account), 'account_type')
|
||||||
if account_type != account_type_map[account]['account_type']:
|
if account_type != account_type_map[account]['account_type']:
|
||||||
frappe.throw(_("Row {}: {} should be a {} account".format(d.idx, frappe.bold(frappe.unscrub(account)),
|
frappe.throw(_("Row {}: Account Type of {} should be {} account".format(d.idx, frappe.bold(frappe.unscrub(account)),
|
||||||
frappe.bold(account_type_map[account]['account_type']))), title=_("Invalid Account"))
|
frappe.bold(account_type_map[account]['account_type']))), title=_("Invalid Account"))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user