Test
This commit is contained in:
parent
02def68974
commit
807fc023f3
@ -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.='
|
||||
<tr data-weight="'.((float)($products[$key]['product_weight']) == 0.001? 0.24: $products[$key]['product_weight']).'" data-carrier="'.implode(',',$products[$key]['carriers']).'" rel="'.($products[$key]['product_ean13']? $products[$key]['product_ean13']: '').'"
|
||||
<tr data-weight="'.((float)($products[$key]['product_weight']) == 0.001 ? 0.24 : $products[$key]['product_weight']).'" data-carrier="'.implode(',',$products[$key]['carriers']).'" rel="'.($products[$key]['product_ean13'] ? $products[$key]['product_ean13'] : '').'"
|
||||
class="'
|
||||
.($products[$key]['id_shipping'] == 2? 'fed_ship': '')
|
||||
.(in_array($products[$key]['product_id'], $locked_products)? 'blocked': '')
|
||||
.(($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) && (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': '').'"';
|
||||
|
||||
.($products[$key]['id_shipping'] == 2 ? 'fed_ship' : '')
|
||||
.(in_array($products[$key]['product_id'], $locked_products) ? 'blocked' : '')
|
||||
.(($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) && (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.='
|
||||
>
|
||||
>
|
||||
<td>'.(isset($p['items_pack'])?'<strong>LOT</strong>':'<img src="'.$products[$key]['image'].'" alt="" width="200" height="200" />').'</td>
|
||||
<td style="font-size:16px;"><strong>'.str_replace(' - ','<br>',$products[$key]['product_name']).'</strong></td>
|
||||
<td class="right">'.($products[$key]['product_reference']? $products[$key]['product_reference'].'<br />': '').($products[$key]['product_ean13']? $products[$key]['product_ean13']: '').($products[$key]['location']?'<br /><span class="location">'.$products[$key]['location'].'</span>': '').'</td>
|
||||
@ -544,10 +544,10 @@ if(($id_order = (int) Tools::getValue('id_order'))
|
||||
<td>'.$logs[$key]['product_supplier_reference'].'</td>
|
||||
<td>'.$logs[$key]['shipping_number'].'</td>
|
||||
<td>'.(($logs[$key]['carrier'] == "laposte" || $logs[$key]['carrier'] == "mondialrelay") ? $carrier_names[$logs[$key]['carrier']] : $logs[$key]['carrier']) .'</td>
|
||||
'.(((int) $profile == 1 || (int) $profile == 9 || (int) $profile == 7 || (int) $profile == 14)?
|
||||
(($logs[$key]['carrier'] == "laposte" || $logs[$key]['carrier'] == "mondialrelay") ?'<td><a class="need_token" href="/adm/index.php?tab=AdminAntLogistic&id_order='.$order->id.'&delete_'.$logs[$key]['carrier'].'='.$logs[$key]['id_order_detail'].'&delete_number='.$logs[$key]['shipping_number'].'"><span class="anticon anticon-bin"></span></a></td>': '<td></td>'):'<td></td>').'
|
||||
'.(((int) $profile == 1 || (int) $profile == 9 || (int) $profile == 7 || (int) $profile == 14)?
|
||||
(($logs[$key]['carrier'] == "laposte" || $logs[$key]['carrier'] == "mondialrelay") ?'<td><a title="Re print" data-toggle="modal" data-target="#modalRePrint" class="reprint" data-product="'.str_replace(" - ", "<br />",$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'].'"><span class="anticon anticon-printer"></span></a></td>': '<td></td>'):'<td></td>').'
|
||||
'.(( in_array((int)$cookie->profile, array(1,9,7,13,14)) ) ?
|
||||
(($logs[$key]['carrier'] == "laposte" || $logs[$key]['carrier'] == "mondialrelay") ? '<td><a class="need_token" href="/adm/index.php?tab=AdminAntLogistic&id_order='.$order->id.'&delete_'.$logs[$key]['carrier'].'='.$logs[$key]['id_order_detail'].'&delete_number='.$logs[$key]['shipping_number'].'"><span class="anticon anticon-bin"></span></a></td>': '<td></td>'):'<td></td>').'
|
||||
'.(( in_array((int)$cookie->profile, array(1,9,7,13,14)) )?
|
||||
(($logs[$key]['carrier'] == "laposte" || $logs[$key]['carrier'] == "mondialrelay") ? '<td><a title="Re print" data-toggle="modal" data-target="#modalRePrint" class="reprint" data-product="'.str_replace(" - ", "<br />",$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'].'"><span class="anticon anticon-printer"></span></a></td>': '<td></td>'):'<td></td>').'
|
||||
</tr>';
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user