convert select to chosen, if specified in filters
This commit is contained in:
parent
d7f1bcbde6
commit
293e0124cd
@ -69,7 +69,8 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
|
||||
filter: function(val, item, opts) {
|
||||
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) {
|
||||
if(val == opts.default_value) {
|
||||
return true;
|
||||
@ -120,7 +121,9 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
|
||||
}
|
||||
|
||||
// chosen
|
||||
if(me.filter_inputs.company.get(0).opts.chosen) {
|
||||
$filter.trigger("liszt:updated");
|
||||
}
|
||||
|
||||
me.filter_inputs.refresh.click();
|
||||
});
|
||||
|
@ -32,7 +32,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
|
||||
parent: $(wrapper).find('.layout-main'),
|
||||
appframe: wrapper.appframe,
|
||||
doctypes: ["Item", "Item Group", "Supplier", "Supplier Type", "Company",
|
||||
"Purchase Invoice", "Purchase Invoice Item"],
|
||||
"Purchase Invoice", "Purchase Invoice Item", "Fiscal Year"],
|
||||
tree_grid: { show: true }
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user