mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
convert select to chosen, if specified in filters
This commit is contained in:
@@ -69,7 +69,8 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
|
|||||||
filter: function(val, item, opts) {
|
filter: function(val, item, opts) {
|
||||||
return item.company == val || val == opts.default_value;
|
return item.company == val || val == opts.default_value;
|
||||||
}},
|
}},
|
||||||
{fieldtype:"Select", label: "Account", link:"Account", default_value: "Select Account...",
|
{fieldtype:"Select", label: "Account", link:"Account",
|
||||||
|
default_value: "Select Account...", chosen: true,
|
||||||
filter: function(val, item, opts, me) {
|
filter: function(val, item, opts, me) {
|
||||||
if(val == opts.default_value) {
|
if(val == opts.default_value) {
|
||||||
return true;
|
return true;
|
||||||
@@ -120,7 +121,9 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// chosen
|
// chosen
|
||||||
$filter.trigger("liszt:updated");
|
if(me.filter_inputs.company.get(0).opts.chosen) {
|
||||||
|
$filter.trigger("liszt:updated");
|
||||||
|
}
|
||||||
|
|
||||||
me.filter_inputs.refresh.click();
|
me.filter_inputs.refresh.click();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
|
|||||||
parent: $(wrapper).find('.layout-main'),
|
parent: $(wrapper).find('.layout-main'),
|
||||||
appframe: wrapper.appframe,
|
appframe: wrapper.appframe,
|
||||||
doctypes: ["Item", "Item Group", "Supplier", "Supplier Type", "Company",
|
doctypes: ["Item", "Item Group", "Supplier", "Supplier Type", "Company",
|
||||||
"Purchase Invoice", "Purchase Invoice Item"],
|
"Purchase Invoice", "Purchase Invoice Item", "Fiscal Year"],
|
||||||
tree_grid: { show: true }
|
tree_grid: { show: true }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user