Oliver Walters 2019-05-23 23:18:35 +10:00
parent d287c0e8d3
commit 2bf80efc09

View File

@ -121,7 +121,16 @@ function loadBomTable(table, options) {
}
return text;
}
},
footerFormatter: function(data) {
var quantity = 0;
data.forEach(function(item) {
quantity += item.quantity;
});
return quantity;
},
}
);
@ -195,6 +204,7 @@ function loadBomTable(table, options) {
search: true,
formatNoMatches: function() { return "No BOM items found"; },
clickToSelect: true,
showFooter: true,
queryParams: function(p) {
return {
part: options.parent_id,