diff --git a/public/viewjs/stockdetail.js b/public/viewjs/stockdetail.js index 13d4b093..49b9b030 100644 --- a/public/viewjs/stockdetail.js +++ b/public/viewjs/stockdetail.js @@ -119,6 +119,12 @@ function RefreshStockDetailRow(stockRowId) function(result) { var stockRow = $('#stock-' + stockRowId + '-row'); + + // If the stock row not exists / is invisible (happens after consume/undo because the undone new stock row has different id), just reload the page for now + if (!stockRow.length || stockRow.hasClass("d-none")) + { + window.location.reload(); + } if (result == null || result.amount == 0) {