Merge branch 'ticket-14739-PackLogistic'

This commit is contained in:
Michael RICOIS 2018-02-13 17:42:41 +01:00
commit bb7d8d133d
2 changed files with 17 additions and 17 deletions

View File

@ -995,10 +995,8 @@ class AdminAntLogistic extends AdminTab
<th>'.$this->l('Référence fournisseur').'</th> <th>'.$this->l('Référence fournisseur').'</th>
<th>'.$this->l('Numéro de suivi').'</th> <th>'.$this->l('Numéro de suivi').'</th>
<th>'.$this->l('Transporteur').'</th> <th>'.$this->l('Transporteur').'</th>
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14) '.(( in_array((int)$cookie->profile, array(1,9,7,13,14)) ) ?'<th></th>': '' ).'
?'<th></th>': '').' '.(( in_array((int)$cookie->profile, array(1,9,7,13,14)) ) ?'<th></th>': '' ).'
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14)
?'<th></th>': '').'
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -46,7 +46,7 @@ $ooh = array_map('intval',explode(',', Configuration::get('ANT_CARRIERS_OOH')));
if(($id_order = (int) Tools::getValue('id_order')) if(($id_order = (int) Tools::getValue('id_order'))
&& (Tools::getValue('token') === Tools::getAdminToken('AdminAntLogistic'.(int) Tab::getIdFromClassName('AdminAntLogistic').(int) Tools::getValue('id_employee')))) { && (Tools::getValue('token') === Tools::getAdminToken('AdminAntLogistic'.(int) Tab::getIdFromClassName('AdminAntLogistic').(int) Tools::getValue('id_employee')))) {
$profile = Tools::getValue('id_profile'); $profile = Tools::getValue('id_profil');
$order = new Order($id_order); $order = new Order($id_order);
if(Validate::isLoadedObject($order)) { if(Validate::isLoadedObject($order)) {
$locked_products = array(); $locked_products = array();
@ -540,18 +540,20 @@ if(($id_order = (int) Tools::getValue('id_order'))
foreach($logs as $key => $log){ foreach($logs as $key => $log){
$html_logs .= $html_logs .=
'<tr> '<tr>
<td>'.str_replace(" ", "<br />",date('d/m/Y H:i:s',strtotime($logs[$key]['date_add']))).'</td>\ <td>'.str_replace(" ", "<br />",date('d/m/Y H:i:s',strtotime($log['date_add']))).'</td>\
<td>'.(!isset($logs[$key]['lastname'])? $logs[$key]['firstname'] : $logs[$key]['firstname'] .' '.$logs[$key]['lastname']) .'</td> <td>'.(!isset($log['lastname'])? $log['firstname'] : $log['firstname'] .' '.$log['lastname']) .'</td>
<td class="text-center">'.$logs[$key]['quantity'].'</td> <td class="text-center">'.$log['quantity'].'</td>
<td>'.str_replace(" - ", "<br />",$logs[$key]['product_name']).'</td>\ <td>'.str_replace(" - ", "<br />",$log['product_name']).'</td>\
<td>'.$logs[$key]['product_reference'].'</td> <td>'.$log['product_reference'].'</td>
<td>'.$logs[$key]['product_supplier_reference'].'</td> <td>'.$log['product_supplier_reference'].'</td>
<td>'.$logs[$key]['shipping_number'].'</td> <td>'.$log['shipping_number'].'</td>
<td>'.(($logs[$key]['carrier'] == "laposte" || $logs[$key]['carrier'] == "mondialrelay") ? $carrier_names[$logs[$key]['carrier']] : $logs[$key]['carrier']) .'</td> <td>'.(($log['carrier'] == "laposte" || $log['carrier'] == "mondialrelay") ? $carrier_names[$log['carrier']] : $log['carrier']) .'</td>
'.(( in_array((int)$profile, array(1,9,7,13,14)) ) ? '.(( in_array((int)$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>').' ? '<td><a class="need_token" href="/adm/index.php?tab=AdminAntLogistic&id_order='.$order->id.'&delete_'.$log['carrier'].'='.$log['id_order_detail'].'&delete_number='.$logs[$key]['shipping_number'].'"><span class="anticon anticon-bin"></span></a></td>'
'.(( in_array((int)$profile, array(1,9,7,13,14)) )? : '<td></td>').'
(($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)$profile, array(1,9,7,13,14)) )
? '<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)$log['weight']>0?(float)$log['weight']:0.24).'" data-ref="'.$log['product_reference'] .'" data-id_order="'.$order->id.'" data-carrier="'.$log['carrier'].'" data-id_order_detail="'.$log['id_order_detail'].'"><span class="anticon anticon-printer"></span></a></td>'
: '<td></td>').'
</tr>'; </tr>';
} }