Treat unknown UPC as "product not found" for inventory batch

i.e. as opposed to collecting info about the product
This commit is contained in:
Lance Edgar 2018-03-21 10:52:30 -05:00
parent fde5398455
commit 42982a69ea

View file

@ -104,23 +104,24 @@
$('.buttons button').button('enable');
$('#cases').focus().select();
} else if (data.upc) {
$('#upc').val(data.upc_pretty);
$('#product-info p').text("product not found in our system");
$('#product-info img').attr('src', data.image_url).show();
// TODO: this is maybe useful if "new products" may be added via inventory batch
// } else if (data.upc) {
// $('#upc').val(data.upc_pretty);
// $('#product-info p').text("product not found in our system");
// $('#product-info img').attr('src', data.image_url).show();
$('#product').val('');
$('#brand_name').val('');
$('#description').val('');
$('#size').val('');
$('#case_quantity').val('');
// $('#product').val('');
// $('#brand_name').val('');
// $('#description').val('');
// $('#size').val('');
// $('#case_quantity').val('');
$('#product-info .warning.notfound').show();
$('.product-fields').show();
$('#brand_name').focus();
$('.field-wrapper.cases input').prop('disabled', false);
$('.field-wrapper.units input').prop('disabled', false);
$('.buttons button').button('enable');
// $('#product-info .warning.notfound').show();
// $('.product-fields').show();
// $('#brand_name').focus();
// $('.field-wrapper.cases input').prop('disabled', false);
// $('.field-wrapper.units input').prop('disabled', false);
// $('.buttons button').button('enable');
} else {
invalid_product('product not found');