From 8703ee90c6bdd800bcc2009e8e38aa35e0dbc82b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 7 Sep 2019 10:41:22 +1000 Subject: [PATCH] Improve grouping --- InvenTree/InvenTree/static/script/inventree/stock.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InvenTree/InvenTree/static/script/inventree/stock.js b/InvenTree/InvenTree/static/script/inventree/stock.js index 8d1c1539e3..e4fa188598 100644 --- a/InvenTree/InvenTree/static/script/inventree/stock.js +++ b/InvenTree/InvenTree/static/script/inventree/stock.js @@ -88,12 +88,12 @@ function loadStockTable(table, options) { data.forEach(function(item) { var batch = item.batch; - if (!batch) { + if (!batch || batch == '') { batch = '-'; } - if (!batches.includes(item.batch)) { - batches.push(item.batch); + if (!batches.includes(batch)) { + batches.push(batch); } });