Add reqd to bank clearance aummary report

Add filters if filters are in list form to get_account_list [erpnext.controllers.queries.get_account_list] query
This commit is contained in:
bhupeshg2 2015-04-14 22:15:24 +05:30
parent dfa013e73f
commit e2e973f7be
2 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,7 @@ frappe.query_reports["Bank Clearance Summary"] = {
"label": __("Bank Account"),
"fieldtype": "Link",
"options": "Account",
"reqd": 1,
"get_query": function() {
return {
"query": "erpnext.controllers.queries.get_account_list",

View File

@ -269,6 +269,8 @@ def get_account_list(doctype, txt, searchfield, start, page_len, filters):
filter_list.append([doctype, key, val[0], val[1]])
else:
filter_list.append([doctype, key, "=", val])
elif isinstance(filters, list):
filter_list.extend(filters)
if "group_or_ledger" not in [d[1] for d in filter_list]:
filter_list.append(["Account", "group_or_ledger", "=", "Ledger"])