How can I add Account multiselect filter in trial balance report just like General Ledger report?
1 Like
@NCP Thank you for your response. How do I effect it to the report? Can you please help me to do this filter effects on report which is in .py files code I guess.
not sure but test it and then apply it.
@NCP Thanks again. I already tested it. Not filtered. Its connected with this function get_accounts_with_children. Declared this function also. but now filtering too
if filters.account:
acc_data = frappe.db.get_value("Account", filters.account)
additional_conditions += """ and account in (select name from `tabAccount`
)""" % (
acc_data
)
Adding this code but show’s an error
TypeError: not all arguments converted during string formatting
i want to add multi account filter in Trial Balance
i edit the sql and write this
accounts = frappe.db.sql(
f"""select name, account_number, parent_account, account_name, root_type, report_type, lft, rgt
from `tabAccount` where company=%s {get_conditions(filters)} ORDER BY lft """,
(filters.company,)
,
as_dict=1
)
i get this error
TypeError: format requires a mapping