diff --git a/InvenTree/templates/js/stock.html b/InvenTree/templates/js/stock.html
index 68f1a0c5c5..fd2dd61746 100644
--- a/InvenTree/templates/js/stock.html
+++ b/InvenTree/templates/js/stock.html
@@ -32,17 +32,6 @@ function noResultBadge() {
     return `<span class='label label-blue float-right'>{% trans "NO RESULT" %}</span>`;
 }
 
-function testKey(test_name) {
-    // Convert test name to a unique key without any illegal chars
-
-    test_name = test_name.trim().toLowerCase();
-    test_name = test_name.replace(' ', '');
-
-    test_name = test_name.replace(/[^0-9a-z]/gi, '');
-
-    return test_name;
-}
-
 function loadStockTestResultsTable(table, options) {
     /*
      * Load StockItemTestResult table
@@ -177,14 +166,14 @@ function loadStockTestResultsTable(table, options) {
                             var match = false;
                             var override = false;
 
-                            var key = testKey(item.test);
+                            var key = item.key;
 
                             // Try to associate this result with a test row
                             tableData.forEach(function(row, index) {
                                 
                                 
                                 // The result matches the test template row
-                                if (key == testKey(row.test_name)) {
+                                if (key == row.key) {
                                     
                                     // Force the names to be the same!
                                     item.test_name = row.test_name;