Commit 870ff1e2 by Damien Moulard

INV: save new qty only when validate pressed, not when cancel pressed

parent 4f963d49
......@@ -357,7 +357,7 @@ var is_product_in_shelf_adding_queue_list = function(testing_pid) {
var printProduct = function () {
let clicked = $(this);
let tr_to_print = clicked.closest('tr');
let barcode = tr_to_print.data('bc')
let barcode = tr_to_print.data('bc');
openModal();
try {
......@@ -366,8 +366,9 @@ var printProduct = function () {
data: {'barcode': barcode}
})
.done(function(res) {
var product = res.product
var product_tmpl_id = product.product_tmpl_id[0]
var product = res.product;
var product_tmpl_id = product.product_tmpl_id[0];
$.ajax({
url: '/products/label_print/' + product_tmpl_id
})
......@@ -379,9 +380,9 @@ var printProduct = function () {
} else {
alert('Impression lancée');
}
})
})
} catch(e) {
});
});
} catch (e) {
closeModal();
alert('Une erreur est survenue...');
}
......
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