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