diff --git a/InvenTree/static/script/inventree/stock.js b/InvenTree/static/script/inventree/stock.js index 9f9c5fd40b..8824965c41 100644 --- a/InvenTree/static/script/inventree/stock.js +++ b/InvenTree/static/script/inventree/stock.js @@ -87,8 +87,18 @@ function updateStock(items, options={}) { html += ''; html += "
"; + html += "

Note field must be filled

"; + + html += ` +
+
+ +

Confirm stock count

+
`; - html += "

Note field must be filled

"; var title = ''; @@ -109,6 +119,7 @@ function updateStock(items, options={}) { }); $(modal).find('#note-warning').hide(); + $(modal).find('#confirm-warning').hide(); modalEnable(modal, true); @@ -116,13 +127,23 @@ function updateStock(items, options={}) { var stocktake = []; var notes = $(modal).find('#stocktake-notes').val(); + var confirm = $(modal).find('#stocktake-confirm').is(':checked'); + + var valid = true; if (!notes) { $(modal).find('#note-warning').show(); - return false; + valid = false; } - var valid = true; + if (!confirm) { + $(modal).find('#confirm-warning').show(); + valid = false; + } + + if (!valid) { + return false; + } // Form stocktake data for (idx = 0; idx < items.length; idx++) {