From f3f41730be32765dc4037df3fd9e72f0d3822b7d Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 13 Oct 2021 11:58:40 +1100 Subject: [PATCH] Add "substitutes" column to BOM table --- InvenTree/templates/js/translated/bom.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/InvenTree/templates/js/translated/bom.js b/InvenTree/templates/js/translated/bom.js index 3524bc5c40..51866732ba 100644 --- a/InvenTree/templates/js/translated/bom.js +++ b/InvenTree/templates/js/translated/bom.js @@ -300,6 +300,20 @@ function loadBomTable(table, options) { return renderLink(text, url); } }); + + cols.push({ + field: 'substitutes', + title: '{% trans "Substitutes" %}', + searchable: false, + sortable: true, + formatter: function(value, row) { + if (row.substitutes) { + return row.substitutes.length; + } else { + return '-'; + } + } + }); if (show_pricing) { cols.push({