fix(accounts): supplier group filter not applied on accounts payable report

(cherry picked from commit 513f19924d)
This commit is contained in:
ervishnucs
2026-08-14 17:58:57 +05:30
committed by Mergify
parent 8dbe4bd7fa
commit d23b9197d5

View File

@@ -94,10 +94,15 @@ frappe.query_reports["Accounts Payable"] = {
options: get_party_type_options(), options: get_party_type_options(),
on_change: function () { on_change: function () {
frappe.query_report.set_filter_value("party", ""); frappe.query_report.set_filter_value("party", "");
frappe.query_report.toggle_filter_display( let is_supplier = frappe.query_report.get_filter_value("party_type") === "Supplier";
"supplier_group", let supplier_group_filter = frappe.query_report.get_filter("supplier_group");
frappe.query_report.get_filter_value("party_type") !== "Supplier" if (supplier_group_filter) {
); supplier_group_filter.df.hidden = !is_supplier;
}
frappe.query_report.toggle_filter_display("supplier_group", !is_supplier);
if (!is_supplier) {
frappe.query_report.set_filter_value("supplier_group", []);
}
}, },
}, },
{ {