fix: not able to add equity account in the chart of accounts
This commit is contained in:
parent
da6fb435dd
commit
cdf80eb4ad
@ -102,7 +102,7 @@ class Account(NestedSet):
|
|||||||
if not frappe.db.get_value("Account",
|
if not frappe.db.get_value("Account",
|
||||||
{'account_name': self.account_name, 'company': ancestors[0]}, 'name'):
|
{'account_name': self.account_name, 'company': ancestors[0]}, 'name'):
|
||||||
frappe.throw(_("Please add the account to root level Company - %s" % ancestors[0]))
|
frappe.throw(_("Please add the account to root level Company - %s" % ancestors[0]))
|
||||||
else:
|
elif self.parent_account:
|
||||||
descendants = get_descendants_of('Company', self.company)
|
descendants = get_descendants_of('Company', self.company)
|
||||||
if not descendants: return
|
if not descendants: return
|
||||||
parent_acc_name_map = {}
|
parent_acc_name_map = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user