Skip to content

Commit

Permalink
fix: set new AP summary filters
Browse files Browse the repository at this point in the history
  • Loading branch information
GursheenK committed Sep 26, 2023
1 parent 7d96044 commit 76a5d94
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
3 changes: 0 additions & 3 deletions erpnext/accounts/report/accounts_payable/accounts_payable.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,8 @@ frappe.query_reports["Accounts Payable"] = {
},
on_change: () => {
frappe.query_report.set_filter_value('party', "");
let party_type = frappe.query_report.get_filter_value('party_type');
frappe.query_report.toggle_filter_display('supplier_group', frappe.query_report.get_filter_value('party_type') !== "Supplier");

}

},
{
"fieldname":"party",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,27 @@ frappe.query_reports["Accounts Payable Summary"] = {
}
},
{
"fieldname":"supplier",
"label": __("Supplier"),
"fieldname": "party_type",
"label": __("Party Type"),
"fieldtype": "Link",
"options": "Supplier"
"options": "Party Type",
get_query: () => {
return {
filters: {
'account_type': 'Payable'
}
};
},
on_change: () => {
frappe.query_report.set_filter_value('party', "");
frappe.query_report.toggle_filter_display('supplier_group', frappe.query_report.get_filter_value('party_type') !== "Supplier");
}
},
{
"fieldname":"party",
"label": __("Party"),
"fieldtype": "Dynamic Link",
"options": "party_type",
},
{
"fieldname":"payment_terms_template",
Expand Down

0 comments on commit 76a5d94

Please sign in to comment.