Allow zero quantity for inventory batch desktop entry form

This commit is contained in:
Lance Edgar 2018-06-27 13:34:48 -05:00
parent edbf7e6723
commit c1e2c5551c

View file

@ -10,11 +10,13 @@
function assert_quantity() {
% if allow_cases:
if ($('#cases').val() && parseFloat($('#cases').val())) {
var cases = parseFloat($('#cases').val());
if (!isNaN(cases)) {
return true;
}
% endif
if ($('#units').val() && parseFloat($('#units').val())) {
var units = parseFloat($('#units').val());
if (!isNaN(units)) {
return true;
}
alert("Please provide case and/or unit quantity");