From 42982a69ea8cd39384b7075d7138c67e86b32549 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 21 Mar 2018 10:52:30 -0500 Subject: [PATCH] Treat unknown UPC as "product not found" for inventory batch i.e. as opposed to collecting info about the product --- .../batch/inventory/desktop_form.mako | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/tailbone/templates/batch/inventory/desktop_form.mako b/tailbone/templates/batch/inventory/desktop_form.mako index ad69aef4..a1adcf4e 100644 --- a/tailbone/templates/batch/inventory/desktop_form.mako +++ b/tailbone/templates/batch/inventory/desktop_form.mako @@ -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');