Add overflow validation for cases/units in inventory batch desktop form
This commit is contained in:
parent
ee1065bfdb
commit
440a88aa0f
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue