Merge pull request #3108 from BhupeshGupta/fix_bank_reports

Add/Fix Bank Reports Filters
This commit is contained in:
Rushabh Mehta 2015-04-17 14:17:22 +05:30
commit 9e6812cfab
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

@ -278,6 +278,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"])