convert select to chosen, if specified in filters
diff --git a/accounts/page/general_ledger/general_ledger.js b/accounts/page/general_ledger/general_ledger.js
index d9fb4bb..ebe24dc 100644
--- a/accounts/page/general_ledger/general_ledger.js
+++ b/accounts/page/general_ledger/general_ledger.js
@@ -69,7 +69,8 @@
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 @@
}
// chosen
- $filter.trigger("liszt:updated");
+ if(me.filter_inputs.company.get(0).opts.chosen) {
+ $filter.trigger("liszt:updated");
+ }
me.filter_inputs.refresh.click();
});
diff --git a/buying/page/purchase_analytics/purchase_analytics.js b/buying/page/purchase_analytics/purchase_analytics.js
index ac0e41f..23db139 100644
--- a/buying/page/purchase_analytics/purchase_analytics.js
+++ b/buying/page/purchase_analytics/purchase_analytics.js
@@ -32,7 +32,7 @@
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 }
});