diff --git a/InvenTree/InvenTree/static/script/inventree/part.js b/InvenTree/InvenTree/static/script/inventree/part.js
index 693a4d1faa..ac2cbdd2e5 100644
--- a/InvenTree/InvenTree/static/script/inventree/part.js
+++ b/InvenTree/InvenTree/static/script/inventree/part.js
@@ -184,23 +184,28 @@ function loadPartTable(table, url, options={}) {
formatter: function(value, row, index, field) {
var html = "";
var link = "stock";
-
+
if (value) {
+ // There IS stock available for this part
- if (row.units) {
- value += ' ' + row.units + '';
+ // Is stock "low" (below the 'minimum_stock' quantity)?
+ if (row.minimum_stock && row.minimum_stock > value) {
+ value = "Low stock : " + row.in_stock + "";
}
html = value;
} else if (row.on_order) {
+ // There is no stock available, but stock is on order
value = "On Order : " + row.on_order + "";
link = "orders";
} else if (row.building) {
+ // There is no stock available, but stock is being built
value = "Building : " + row.building + "";
link = "builds";
} else {
- value ="No Stock";
+ // There is no stock available
+ value ="No Stock";
}
return renderLink(value, '/part/' + row.pk + "/" + link + "/");