From 29c913b553e67dd239263cfed26976f8b33cf165 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 30 Oct 2021 13:31:13 +1100 Subject: [PATCH] Improvements for stock item test result table --- InvenTree/templates/js/translated/stock.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/InvenTree/templates/js/translated/stock.js b/InvenTree/templates/js/translated/stock.js index ce351219af..62e765b25b 100644 --- a/InvenTree/templates/js/translated/stock.js +++ b/InvenTree/templates/js/translated/stock.js @@ -468,11 +468,7 @@ function formatDate(row) { var html = row.date; if (row.user_detail) { - html += `${row.user_detail.username}`; - } - - if (row.attachment) { - html += ``; + html += `${row.user_detail.username}`; } return html; @@ -553,6 +549,15 @@ function loadStockTestResultsTable(table, options) { { field: 'value', title: '{% trans "Value" %}', + formatter: function(value, row) { + var html = value; + + if (row.attachment) { + html += ``; + } + + return html; + } }, { field: 'notes',