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