Commit a6f73d2a by Félicie

alert changed

parent edd0e0df
Pipeline #2255 passed with stage
in 1 minute 27 seconds
...@@ -396,14 +396,13 @@ var addProductToList = async function(barcode) { ...@@ -396,14 +396,13 @@ var addProductToList = async function(barcode) {
//It could also be a wrong reading one //It could also be a wrong reading one
odoo_product = barcodes.get_corresponding_odoo_product(barcode); odoo_product = barcodes.get_corresponding_odoo_product(barcode);
if (odoo_product) { if (odoo_product === null) {
alert(barcode + " : ce code-barre est inconnu, merci d'apporter le produit à un salarié.");
} else {
if (is_product_in_shelf_adding_queue_list(odoo_product.data[barcodes.keys.id])) { if (is_product_in_shelf_adding_queue_list(odoo_product.data[barcodes.keys.id])) {
alert("Produit déjà présent dans la liste."); alert("Produit déjà présent dans la liste.");
} else { } else {
add_to_shelf_product_ids.push(odoo_product.data[4]); add_to_shelf_product_ids.push(odoo_product.data[4]);
if (odoo_product === null) {
alert(barcode + ' : Code-barre inconnu');
} else {
var pdt_line = $('<tr>').attr('data-id', odoo_product.data[barcodes.keys.id]) var pdt_line = $('<tr>').attr('data-id', odoo_product.data[barcodes.keys.id])
.attr('data-bc', odoo_product.barcode) .attr('data-bc', odoo_product.barcode)
.addClass('obc'); .addClass('obc');
...@@ -423,7 +422,6 @@ var addProductToList = async function(barcode) { ...@@ -423,7 +422,6 @@ var addProductToList = async function(barcode) {
.html(add_pdts_btn_text); .html(add_pdts_btn_text);
} }
} }
}
}; };
var addProducts = async function() { var addProducts = async function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment