stock ageing: apply zero filters
This commit is contained in:
parent
bf8c5033fe
commit
671fcc00c0
@ -64,10 +64,7 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({
|
|||||||
},
|
},
|
||||||
filters: [
|
filters: [
|
||||||
{fieldtype:"Select", label: "Warehouse", link:"Warehouse",
|
{fieldtype:"Select", label: "Warehouse", link:"Warehouse",
|
||||||
default_value: "Select Warehouse...",
|
default_value: "Select Warehouse..."},
|
||||||
filter: function(val, item, opts, me) {
|
|
||||||
return me.apply_zero_filter(val, item, opts, me);
|
|
||||||
}},
|
|
||||||
{fieldtype:"Select", label: "Brand", link:"Brand",
|
{fieldtype:"Select", label: "Brand", link:"Brand",
|
||||||
default_value: "Select Brand...", filter: function(val, item, opts) {
|
default_value: "Select Brand...", filter: function(val, item, opts) {
|
||||||
return val == opts.default_value || item.brand == val;
|
return val == opts.default_value || item.brand == val;
|
||||||
@ -108,6 +105,11 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({
|
|||||||
this.data = $.map(this.data, function(d) {
|
this.data = $.map(this.data, function(d) {
|
||||||
return me.apply_filter(d, "brand") ? d : null;
|
return me.apply_filter(d, "brand") ? d : null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// filter out rows with zero values
|
||||||
|
this.data = $.map(this.data, function(d) {
|
||||||
|
return me.apply_zero_filter(null, d, null, me) ? d : null;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
prepare_balances: function() {
|
prepare_balances: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user