diff --git a/tailbone/templates/batch/inventory/desktop_form.mako b/tailbone/templates/batch/inventory/desktop_form.mako index 720084f6..77d573dd 100644 --- a/tailbone/templates/batch/inventory/desktop_form.mako +++ b/tailbone/templates/batch/inventory/desktop_form.mako @@ -12,11 +12,21 @@ % if allow_cases: var cases = parseFloat($('#cases').val()); if (!isNaN(cases)) { + if (cases > 999999) { + alert("Case amount is invalid!"); + $('#cases').select().focus(); + return false; + } return true; } % endif var units = parseFloat($('#units').val()); if (!isNaN(units)) { + if (units > 999999) { + alert("Unit amount is invalid!"); + $('#units').select().focus(); + return false; + } return true; } alert("Please provide case and/or unit quantity");