mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix javascript rendering of decimal quantity in BOM table
This commit is contained in:
parent
6e90ac367e
commit
4e1b9efe93
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user