mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
added quantity total
This commit is contained in:
parent
dac112d908
commit
5d3360e63b
@ -176,7 +176,14 @@ $("#po-table").inventreeTable({
|
||||
{
|
||||
sortable: true,
|
||||
field: 'quantity',
|
||||
title: '{% trans "Quantity" %}'
|
||||
title: '{% trans "Quantity" %}',
|
||||
footerFormatter: function(data) {
|
||||
return data.map(function (row) {
|
||||
return +row['quantity']
|
||||
}).reduce(function (sum, i) {
|
||||
return sum + i
|
||||
}, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
@ -204,7 +211,6 @@ $("#po-table").inventreeTable({
|
||||
var formatter = new Intl.NumberFormat('en-US', {style: 'currency', currency: currency});
|
||||
return formatter.format(total)
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
|
Loading…
Reference in New Issue
Block a user