Fix javascript rendering of decimal quantity in BOM table

This commit is contained in:
Oliver Walters 2019-11-19 09:08:17 +11:00
parent 6e90ac367e
commit 4e1b9efe93

View File

@ -163,21 +163,16 @@ function loadBomTable(table, options) {
formatter: function(value, row, index, field) {
var text = value;
// The 'value' is a text string with (potentially) multiple trailing zeros
// Let's make it a bit more pretty
text = parseFloat(text);
if (row.overage) {
text += "<small> (+" + row.overage + ") </small>";
}
return text;
},
footerFormatter: function(data) {
var quantity = 0;
data.forEach(function(item) {
quantity += item.quantity;
});
return quantity;
},
});
if (!options.editable) {