[minor] Check account read permission for get_balance_on
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index 25a8adf..5f364e3 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -45,11 +45,8 @@
account = frappe.form_dict.get("account")
date = frappe.form_dict.get("date")
- acc = frappe.db.get_value('Account', account, \
- ['lft', 'rgt', 'report_type', 'group_or_ledger'], as_dict=1)
-
- if not acc:
- frappe.throw(_("Account {0} does not exist").format(account), frappe.DoesNotExistError)
+ acc = frappe.get_doc("Account", account)
+ acc.check_permission("read")
cond = []
if date: