From 70e093333627d5340003d0ea816c7fa368af0b47 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 16 Jun 2021 23:52:00 +0200 Subject: [PATCH] total price column as per #1660 --- .../templates/order/purchase_order_detail.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index ef844409fd..fda45240dc 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -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',