Commit 54954ebe by Alexis Aoun

Adaptation de la detection weight à coucdb

parent 567c69d7
......@@ -97,20 +97,21 @@ function select_product_from_bc(barcode) {
}
if (foundProduct.data !== null) {
if (scannedProduct.rule === 'weight') {
foundProduct.data.product_qty = scannedProduct.qty;
} else if (scannedProduct.rule === 'price_to_weight') {
openModal($('#templates #modal_confirm_price_to_weight').html(), price_to_weight_is_wrong, 'Non', false, true, price_to_weight_confirmed_callback(foundProduct, scannedProduct));
setupPopUpBtnStyle(scannedProduct);
if(foundProduct.data.product_uom[0] == 21){ //if qty is in weight
if (scannedProduct.rule === 'weight') {
editing_product = foundProduct.data;
editProductInfo(foundProduct.data, scannedProduct.qty);
editing_product = null;
} else if (scannedProduct.rule === 'price_to_weight') {
openModal($('#templates #modal_confirm_price_to_weight').html(), price_to_weight_is_wrong, 'Non', false, true, price_to_weight_confirmed_callback(foundProduct, scannedProduct));
setupPopUpBtnStyle(scannedProduct);
}
}
if (scannedProduct.rule !== 'price_to_weight') {
if (scannedProduct.rule === 'weight') {
editProductInfo(foundProduct.data, foundProduct.data.product_qty);
} else {
if (foundProduct.data.product_uom[0] != 21) {
setLineEdition(foundProduct.data);
}
if (foundProduct.place === 'to_process') {
let row = table_to_process.row($('#'+foundProduct.data.product_id[0]));
......
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