Commit a6f73d2a by Félicie

alert changed

parent edd0e0df
Pipeline #2255 passed with stage
in 1 minute 27 seconds
......@@ -396,32 +396,30 @@ var addProductToList = async function(barcode) {
//It could also be a wrong reading one
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])) {
alert("Produit déjà présent dans la liste.");
} else {
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])
.attr('data-bc', odoo_product.barcode)
.addClass('obc');
$('<td>').text(barcode)
.appendTo(pdt_line);
$('<td>').text(odoo_product.barcode)
.appendTo(pdt_line);
$('<td>').text(odoo_product.data[barcodes.keys.name])
.appendTo(pdt_line);
$('<td>').html(odoo_product.data[barcodes.keys.list_price] + " €")
.appendTo(pdt_line);
$('<td>').html(delete_icon + " " + print_icon)
.appendTo(pdt_line);
adding_pdts_tpl.find('#added_products tbody').append(pdt_line);
main_content.find('button.add-products').css('display', 'block')
.html(add_pdts_btn_text);
}
var pdt_line = $('<tr>').attr('data-id', odoo_product.data[barcodes.keys.id])
.attr('data-bc', odoo_product.barcode)
.addClass('obc');
$('<td>').text(barcode)
.appendTo(pdt_line);
$('<td>').text(odoo_product.barcode)
.appendTo(pdt_line);
$('<td>').text(odoo_product.data[barcodes.keys.name])
.appendTo(pdt_line);
$('<td>').html(odoo_product.data[barcodes.keys.list_price] + " €")
.appendTo(pdt_line);
$('<td>').html(delete_icon + " " + print_icon)
.appendTo(pdt_line);
adding_pdts_tpl.find('#added_products tbody').append(pdt_line);
main_content.find('button.add-products').css('display', 'block')
.html(add_pdts_btn_text);
}
}
};
......
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