mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
total price column as per #1660
This commit is contained in:
parent
9386332de1
commit
70e0933336
@ -182,6 +182,20 @@ $("#po-table").inventreeTable({
|
||||
return row.purchase_price_string || row.purchase_price;
|
||||
}
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
title: '{% trans "Total price" %}',
|
||||
formatter: function(value, row) {
|
||||
var total = row.purchase_price * row.quantity;
|
||||
|
||||
// Create our number formatter.
|
||||
var formatter = new Intl.NumberFormat('en-US', {
|
||||
style: 'currency',
|
||||
currency: row.purchase_price_currency,
|
||||
});
|
||||
return formatter.format(total)
|
||||
},
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
field: 'received',
|
||||
|
Loading…
x
Reference in New Issue
Block a user