diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js index 1a8e728040..35d5d0d5a6 100644 --- a/InvenTree/templates/js/translated/part.js +++ b/InvenTree/templates/js/translated/part.js @@ -672,7 +672,20 @@ function loadPartVariantTable(table, partId, options={}) { field: 'in_stock', title: '{% trans "Stock" %}', formatter: function(value, row) { - return renderLink(value, `/part/${row.pk}/?display=part-stock`); + + var base_stock = row.in_stock; + var variant_stock = row.variant_stock || 0; + + var total = base_stock + variant_stock; + + var text = `${total}`; + + if (variant_stock > 0) { + text = `${text}`; + text += ``; + } + + return renderLink(text, `/part/${row.pk}/?display=part-stock`); } } ];