diff --git a/modules/ant_logistic/ajax.php b/modules/ant_logistic/ajax.php
index 9adbc255..9b1b033d 100644
--- a/modules/ant_logistic/ajax.php
+++ b/modules/ant_logistic/ajax.php
@@ -309,7 +309,7 @@ if(($id_order = (int) Tools::getValue('id_order'))
$carriers[(int) $row['id_carrier']] = $row['name'];
}
- if(count($id_order_details) > 0) {
+ if (count($id_order_details) > 0) {
$logs = array();
// Send by PHILEA
@@ -458,20 +458,20 @@ if(($id_order = (int) Tools::getValue('id_order'))
$html_products = '';
foreach($products as $key => $p) {
$html_products.='
-
0 ? $products[$key]['product_quantity_refunded']: $products[$key]['product_quantity_return']) - $products[$key]['product_quantity_sent'] > 0) && (in_array((int)($products[$key]['id_sale']), $sales_list)) ? '' : 'grey')
+ .(max(in_array($products[$key]['product_id'], $locked_products)? 0: ($products[$key]['product_quantity'] - ($products[$key]['product_quantity_refunded'] > 0? $products[$key]['product_quantity_refunded']: $products[$key]['product_quantity_return']) - $products[$key]['product_quantity_sent']), 0) > 1 ? ' blue' : '')
+ .'"';
if(isset($p['items_pack'])){
foreach($p['items_pack'] as $item){
$html_products.='data-pack_'.$item['id_product'].'="'.$item['pack_quantity'].'"';
}
}
$html_products.='
- >
+ >
'.(isset($p['items_pack'])?'LOT':'').' |
'.str_replace(' - ',' ',$products[$key]['product_name']).' |
'.($products[$key]['product_reference']? $products[$key]['product_reference'].' ': '').($products[$key]['product_ean13']? $products[$key]['product_ean13']: '').($products[$key]['location']?' '.$products[$key]['location'].'': '').' |
@@ -544,10 +544,10 @@ if(($id_order = (int) Tools::getValue('id_order'))
'.$logs[$key]['product_supplier_reference'].' |
'.$logs[$key]['shipping_number'].' |
'.(($logs[$key]['carrier'] == "laposte" || $logs[$key]['carrier'] == "mondialrelay") ? $carrier_names[$logs[$key]['carrier']] : $logs[$key]['carrier']) .' |
- '.(((int) $profile == 1 || (int) $profile == 9 || (int) $profile == 7 || (int) $profile == 14)?
- (($logs[$key]['carrier'] == "laposte" || $logs[$key]['carrier'] == "mondialrelay") ?' | ': ' | '):' | ').'
- '.(((int) $profile == 1 || (int) $profile == 9 || (int) $profile == 7 || (int) $profile == 14)?
- (($logs[$key]['carrier'] == "laposte" || $logs[$key]['carrier'] == "mondialrelay") ?'",$logs[$key]['product_name']).'" data-weight="'.((float)$logs[$key]['weight']>0?(float)$logs[$key]['weight']:0.24).'" data-ref="'.$logs[$key]['product_reference'] .'" data-id_order="'.$order->id.'" data-carrier="'.$logs[$key]['carrier'].'" data-id_order_detail="'.$logs[$key]['id_order_detail'].'"> | ': ' | '):' | ').'
+ '.(( in_array((int)$cookie->profile, array(1,9,7,13,14)) ) ?
+ (($logs[$key]['carrier'] == "laposte" || $logs[$key]['carrier'] == "mondialrelay") ? ' | ': ' | '):' | ').'
+ '.(( in_array((int)$cookie->profile, array(1,9,7,13,14)) )?
+ (($logs[$key]['carrier'] == "laposte" || $logs[$key]['carrier'] == "mondialrelay") ? '",$logs[$key]['product_name']).'" data-weight="'.((float)$logs[$key]['weight']>0?(float)$logs[$key]['weight']:0.24).'" data-ref="'.$logs[$key]['product_reference'] .'" data-id_order="'.$order->id.'" data-carrier="'.$logs[$key]['carrier'].'" data-id_order_detail="'.$logs[$key]['id_order_detail'].'"> | ': ' | '):' | ').'
';
}
diff --git a/modules/ant_logistic/script.js b/modules/ant_logistic/script.js
index ee88e4ca..7a9ce09f 100644
--- a/modules/ant_logistic/script.js
+++ b/modules/ant_logistic/script.js
@@ -234,32 +234,32 @@ function checkEAN() {
clearTimeout(ean_timeout);
ean_timeout = setTimeout(function() {
var eanval = $("#eaninput").val();
- if(eanval != "") {
+ if (eanval != "") {
var eanval_item = $("#button_form tbody tr").filter(function() {
- if($(this).attr("rel") != eanval) {
+ if ($(this).attr("rel") != eanval) {
return $(this).attr("rel") == '0'+eanval;
}
return $(this).attr("rel") == eanval;
});
- if(eanval_item.length > 0) {
+ if (eanval_item.length > 0) {
$(eanval_item).each(function(id, el) {
var current_val = parseInt($(el).find(".shipped input").val());
var max_val = parseInt($(el).find(".toship strong").text());
- if(current_val < max_val) {
+ if (current_val < max_val) {
qtyUp($(el).find(".shipped a")[0], max_val);
} else {
var eanval_item_pack = $("#button_form tbody tr").filter(function() {
- if($(this).attr("rel") != eanval+'_pack') {
+ if ($(this).attr("rel") != eanval+'_pack') {
return $(this).attr("rel") == '0'+eanval+'_pack';
}
return $(this).attr("rel") == eanval+'_pack';
});
- if(eanval_item_pack.length > 0) {
+ if (eanval_item_pack.length > 0) {
$(eanval_item_pack).each(function(id_pack, el_pack) {
var current_val = parseInt($(el_pack).find(".shipped input").val());
var max_val = parseInt($(el_pack).find(".toship strong").text());
- if(current_val < max_val) {
+ if (current_val < max_val) {
qtyUp($(el_pack).find(".shipped a")[0], max_val);
} else {
confirm("Quantité à envoyer déjà atteinte pour ce produit");
@@ -272,16 +272,18 @@ function checkEAN() {
});
} else {
var eanval_item_pack = $("#button_form tbody tr").filter(function() {
- if($(this).attr("rel") != eanval+'_pack') {
+ if ($(this).attr("rel") != eanval+'_pack') {
return $(this).attr("rel") == '0'+eanval+'_pack';
}
return $(this).attr("rel") == eanval+'_pack';
- });
- if(eanval_item_pack.length > 0) {
+ });
+ if (eanval_item_pack.length > 0) {
+ console.log(eanval_item_pack);
$(eanval_item_pack).each(function(id_pack, el_pack) {
var current_val = parseInt($(el_pack).find(".shipped input").val());
var max_val = parseInt($(el_pack).find(".toship strong").text());
- if(current_val < max_val) {
+ if (current_val < max_val) {
+ console.log('qtyUp');
qtyUp($(el_pack).find(".shipped a")[0], max_val);
} else {
confirm("Quantité à envoyer déjà atteinte pour ce produit");