Merge pull request #3108 from BhupeshGupta/fix_bank_reports
Add/Fix Bank Reports Filters
This commit is contained in:
commit
9e6812cfab
@ -21,6 +21,7 @@ frappe.query_reports["Bank Clearance Summary"] = {
|
|||||||
"label": __("Bank Account"),
|
"label": __("Bank Account"),
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
|
"reqd": 1,
|
||||||
"get_query": function() {
|
"get_query": function() {
|
||||||
return {
|
return {
|
||||||
"query": "erpnext.controllers.queries.get_account_list",
|
"query": "erpnext.controllers.queries.get_account_list",
|
||||||
|
@ -278,6 +278,8 @@ def get_account_list(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
filter_list.append([doctype, key, val[0], val[1]])
|
filter_list.append([doctype, key, val[0], val[1]])
|
||||||
else:
|
else:
|
||||||
filter_list.append([doctype, key, "=", val])
|
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]:
|
if "group_or_ledger" not in [d[1] for d in filter_list]:
|
||||||
filter_list.append(["Account", "group_or_ledger", "=", "Ledger"])
|
filter_list.append(["Account", "group_or_ledger", "=", "Ledger"])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user