mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
fix: Child company account currency fix
This commit is contained in:
@@ -98,7 +98,10 @@ class Account(NestedSet):
|
|||||||
|
|
||||||
ancestors = get_root_company(self.company)
|
ancestors = get_root_company(self.company)
|
||||||
if ancestors:
|
if ancestors:
|
||||||
frappe.throw(_("Please add the account to root level Company - %s" % ancestors[0]))
|
account = frappe.db.exists("Account", {"company": ancestors[0], "account_name": self.account_name})
|
||||||
|
|
||||||
|
if not account:
|
||||||
|
frappe.throw(_("Please add the account to root level Company - %s" % ancestors[0]))
|
||||||
else:
|
else:
|
||||||
descendants = get_descendants_of('Company', self.company)
|
descendants = get_descendants_of('Company', self.company)
|
||||||
if not descendants: return
|
if not descendants: return
|
||||||
|
|||||||
Reference in New Issue
Block a user