From 586d38fb61b9f3e89d3db93a5c7c9cf9d31e4bc8 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 2 Dec 2021 21:40:21 +1100 Subject: [PATCH] Add item count to shipment table --- InvenTree/templates/js/translated/order.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/InvenTree/templates/js/translated/order.js b/InvenTree/templates/js/translated/order.js index c267bf6877..6dae5cbe79 100644 --- a/InvenTree/templates/js/translated/order.js +++ b/InvenTree/templates/js/translated/order.js @@ -1316,9 +1316,23 @@ function loadSalesOrderShipmentTable(table, options={}) { title: '{% trans "Shipment" %}', switchable: false, }, + { + field: 'allocations', + title: '{% trans "Items" %}', + switchable: false, + sortable: true, + formatter: function(value, row) { + if (row && row.allocations) { + return row.allocations.length; + } else { + return '-'; + } + } + }, { field: 'shipment_date', title: '{% trans "Shipment Date" %}', + sortable: true, formatter: function(value, row) { if (value) { return value;