Commit fd9030f4 by François C.

Fix 'error' found by ESLint and auto modify warnings

parent e425a6e9
Pipeline #1203 passed with stage
in 1 minute 21 seconds
...@@ -288,6 +288,7 @@ function display_grouped_orders() { ...@@ -288,6 +288,7 @@ function display_grouped_orders() {
if (table_orders !== null) { if (table_orders !== null) {
var display_something = true; var display_something = true;
$('#groups_items').empty(); $('#groups_items').empty();
let groups_display_content = "<ul>"; let groups_display_content = "<ul>";
......
...@@ -948,8 +948,9 @@ function editProductInfo (productToEdit, value = null, batch = false) { ...@@ -948,8 +948,9 @@ function editProductInfo (productToEdit, value = null, batch = false) {
update_distant_order(productToEdit.id_po); update_distant_order(productToEdit.id_po);
} }
if(addition){ if (addition) {
let row = table_processed.row($('#'+productToEdit.product_id[0])); let row = table_processed.row($('#'+productToEdit.product_id[0]));
remove_from_processed(row, productToEdit); remove_from_processed(row, productToEdit);
} }
...@@ -1214,23 +1215,26 @@ function send() { ...@@ -1214,23 +1215,26 @@ function send() {
error_report_data.group_amount_total += orders[i].amount_total; error_report_data.group_amount_total += orders[i].amount_total;
error_report_data.orders.push(orders[i]); error_report_data.orders.push(orders[i]);
} }
//Create list of articl with no barcode //Create list of articl with no barcode
no_barcode_list = []; no_barcode_list = [];
for (var i = 0; i < list_processed.length; i++) { for (var i = 0; i < list_processed.length; i++) {
if (list_processed[i].product_qty != 0 && (list_processed[i].barcode == false || list_processed[i].barcode == null || list_processed[i].barcode == "")) { if (list_processed[i].product_qty != 0 && (list_processed[i].barcode == false || list_processed[i].barcode == null || list_processed[i].barcode == "")) {
no_barcode_list.push([list_processed[i]["product_id"][0], list_processed[i]["product_id"][1]]); no_barcode_list.push([
list_processed[i]["product_id"][0],
list_processed[i]["product_id"][1]
]);
} }
} }
data_send_no_barcode={ data_send_no_barcode={
"order" : orders[order_data['id_po']], "order" : orders[order_data['id_po']],
"no_barcode_list" : no_barcode_list "no_barcode_list" : no_barcode_list
} };
// Send of articl with no barcode to mail send // Send of articl with no barcode to mail send
if (no_barcode_list.length > 0){ if (no_barcode_list.length > 0) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "../send_mail_no_barcode", url: "../send_mail_no_barcode",
...@@ -1244,7 +1248,7 @@ function send() { ...@@ -1244,7 +1248,7 @@ function send() {
} }
}); });
} }
// Send request for error report // Send request for error report
$.ajax({ $.ajax({
type: "POST", type: "POST",
...@@ -1302,10 +1306,11 @@ function send() { ...@@ -1302,10 +1306,11 @@ function send() {
}*/ }*/
} }
} }
for (var i = 0; i < no_barcode_list.length; i++) { for (let i = 0; i < no_barcode_list.length; i++) {
var node = document.createElement('li'); var node = document.createElement('li');
let textNode = document.createTextNode(no_barcode_list[i]); let textNode = document.createTextNode(no_barcode_list[i]);
node.appendChild(textNode); node.appendChild(textNode);
document.getElementById('barcodesEmpty_list').appendChild(node); document.getElementById('barcodesEmpty_list').appendChild(node);
......
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