diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py
index 164f120067f..b383ba4e309 100644
--- a/erpnext/accounts/doctype/account/account.py
+++ b/erpnext/accounts/doctype/account/account.py
@@ -117,7 +117,29 @@ class Account(NestedSet):
for d in frappe.db.get_values('Account', filters=filters, fieldname=["company", "name"], as_dict=True):
parent_acc_name_map[d["company"]] = d["name"]
- if not parent_acc_name_map: return
+
+ if not parent_acc_name_map:
+ # map can be empty if only one descendant or all descendants without parent account exist(s)
+ # or if no descendants exist
+ if descendants:
+ frappe.throw(_("Parent Account {0} does not exist in any Child Company").format(frappe.bold(parent_acc_name)),
+ title=_("Account Missing"))
+ else:
+ # no descendants and empty map, nothing to sync
+ return
+
+ companies_missing_account = []
+ for company in descendants:
+ if not company in parent_acc_name_map:
+ companies_missing_account.append(company)
+
+ # If atleast any one of the descendants does not have the parent account, block transaction
+ if companies_missing_account:
+ message = _("Parent Account {0} does not exist in the following companies:").format(frappe.bold(parent_acc_name))
+ message += "