diff --git a/InvenTree/templates/js/translated/order.js b/InvenTree/templates/js/translated/order.js index 67fef0b853..cd6b63c56d 100644 --- a/InvenTree/templates/js/translated/order.js +++ b/InvenTree/templates/js/translated/order.js @@ -885,8 +885,7 @@ function loadPurchaseOrderLineItemTable(table, options={}) { { field: 'total_price', sortable: true, - field: 'total_price', - title: '{% trans "Total price" %}', + title: '{% trans "Total Price" %}', formatter: function(value, row) { var total = row.purchase_price * row.quantity; var formatter = new Intl.NumberFormat('en-US', {style: 'currency', currency: row.purchase_price_currency}); @@ -1436,7 +1435,7 @@ function loadSalesOrderLineItemTable(table, options={}) { sortable: true, field: 'reference', title: '{% trans "Reference" %}', - switchable: false, + switchable: true, }, { sortable: true, @@ -1456,14 +1455,6 @@ function loadSalesOrderLineItemTable(table, options={}) { field: 'sale_price', title: '{% trans "Unit Price" %}', formatter: function(value, row) { - return row.sale_price_string || row.sale_price; - } - }, - { - sortable: true, - title: '{% trans "Total price" %}', - formatter: function(value, row) { - var total = row.sale_price * row.quantity; var formatter = new Intl.NumberFormat( 'en-US', { @@ -1472,7 +1463,23 @@ function loadSalesOrderLineItemTable(table, options={}) { } ); - return formatter.format(total); + return formatter.format(row.sale_price); + } + }, + { + field: 'total_price', + sortable: true, + title: '{% trans "Total Price" %}', + formatter: function(value, row) { + var formatter = new Intl.NumberFormat( + 'en-US', + { + style: 'currency', + currency: row.sale_price_currency + } + ); + + return formatter.format(row.sale_price * row.quantity); }, footerFormatter: function(data) { var total = data.map(function(row) { @@ -1544,6 +1551,7 @@ function loadSalesOrderLineItemTable(table, options={}) { if (pending) { columns.push({ field: 'buttons', + switchable: false, formatter: function(value, row, index, field) { var html = `
`;