fix: set new AP summary filters
diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js
index 27a8570..484ff7f 100644
--- a/erpnext/accounts/report/accounts_payable/accounts_payable.js
+++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js
@@ -108,11 +108,8 @@
},
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",
diff --git a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js
index ea20072..8a1725c 100644
--- a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js
+++ b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js
@@ -72,10 +72,27 @@
}
},
{
- "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",