mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +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;
|
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,
|
sortable: true,
|
||||||
field: 'received',
|
field: 'received',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user