mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-13 23:38:01 +00:00
Merge pull request #44753 from frappe/mergify/bp/version-15-hotfix/pr-44695
fix: User permissions in financial statements (backport #44695)
This commit is contained in:
@@ -527,9 +527,16 @@ def get_accounting_entries(
|
||||
account_filter_query = get_account_filter_query(root_lft, root_rgt, root_type, gl_entry)
|
||||
query = query.where(ExistsCriterion(account_filter_query))
|
||||
|
||||
entries = query.run(as_dict=True)
|
||||
from frappe.desk.reportview import build_match_conditions
|
||||
|
||||
return entries
|
||||
match_conditions = build_match_conditions(doctype)
|
||||
|
||||
if match_conditions:
|
||||
query += "and" + match_conditions
|
||||
|
||||
query, params = query.walk()
|
||||
|
||||
return frappe.db.sql(query, params, as_dict=True)
|
||||
|
||||
|
||||
def get_account_filter_query(root_lft, root_rgt, root_type, gl_entry):
|
||||
|
||||
Reference in New Issue
Block a user