From e2e973f7be0292cc845fd0057b4735089f696dc6 Mon Sep 17 00:00:00 2001 From: bhupeshg2 Date: Tue, 14 Apr 2015 22:15:24 +0530 Subject: [PATCH 1/2] 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 --- .../report/bank_clearance_summary/bank_clearance_summary.js | 1 + erpnext/controllers/queries.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js index c28ba70a25..98cc2dece0 100644 --- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js +++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js @@ -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", diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index d555532419..c07d3b4923 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -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"]) From 3f59615555c51bf71e18ba8cb3ec1f1d9b14cd43 Mon Sep 17 00:00:00 2001 From: bhupeshg2 Date: Wed, 15 Apr 2015 22:29:45 +0530 Subject: [PATCH 2/2] switch to tabs --- .../report/bank_clearance_summary/bank_clearance_summary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js index 98cc2dece0..629d9c000e 100644 --- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js +++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js @@ -21,7 +21,7 @@ frappe.query_reports["Bank Clearance Summary"] = { "label": __("Bank Account"), "fieldtype": "Link", "options": "Account", - "reqd": 1, + "reqd": 1, "get_query": function() { return { "query": "erpnext.controllers.queries.get_account_list",