mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-11 22:38:25 +00:00
fix: Company Filter in Total Stock Summary Report (#17973)
This commit is contained in:
committed by
Faris Ansari
parent
820d66b42e
commit
0c7afb389d
@@ -10,8 +10,23 @@ frappe.query_reports["Total Stock Summary"] = {
|
||||
"fieldtype": "Select",
|
||||
"width": "80",
|
||||
"reqd": 1,
|
||||
"options": ["","Warehouse", "Company"],
|
||||
"default": "Warehouse"
|
||||
"options": ["", "Warehouse", "Company"],
|
||||
"change": function() {
|
||||
let group_by = frappe.query_report.get_filter_value("group_by")
|
||||
let company_filter = frappe.query_report.get_filter("company")
|
||||
if (group_by == "Company") {
|
||||
company_filter.df.reqd = 0;
|
||||
company_filter.df.hidden = 1;
|
||||
frappe.query_report.set_filter_value("company", "");
|
||||
company_filter.refresh();
|
||||
}
|
||||
else {
|
||||
company_filter.df.reqd = 1;
|
||||
company_filter.df.hidden = 0;
|
||||
company_filter.refresh();
|
||||
frappe.query_report.refresh();
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"fieldname": "company",
|
||||
@@ -23,4 +38,4 @@ frappe.query_reports["Total Stock Summary"] = {
|
||||
"reqd": 1
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user