Add profile 13 (managers)

This commit is contained in:
Michael RICOIS 2018-01-08 12:47:09 +01:00
parent 9374aeb31c
commit 2e2ac976a0

View File

@ -161,11 +161,9 @@ class AdminLogistics extends AdminTab {
public function postProcess() {
global $cookie, $logistics_carriers;
if((
(int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14
) && (
$delete_number = Tools::getValue('delete_number')
)) {
if(( in_array((int)$cookie->profile, array(1,9,7,13,14)) )
&& ( $delete_number = Tools::getValue('delete_number') )) {
if($delete = (int) Tools::getValue('delete_laposte')) {
Db::getInstance()->ExecuteS('
DELETE FROM `'._DB_PREFIX_.'lapostews`
@ -266,7 +264,7 @@ class AdminLogistics extends AdminTab {
// Generate a new shipping number for product sent with many parcels
if( (Tools::isSubmit('submitReprintShip'))
&& ((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))
&& (
($id_order = Tools::getValue('id_order_reprint'))
&& ($products = Tools::getValue('products_reprint'))
@ -804,10 +802,8 @@ class AdminLogistics extends AdminTab {
<th>'.$this->l('Supplier reference').'</th>\
<th>'.$this->l('Shipping number').'</th>\
<th>'.$this->l('Carrier').'</th>\
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14)?
'<th></th>': '').'\
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14)?
'<th></th>': '').'\
'.(( in_array((int)$cookie->profile, array(1,9,7,13,14)) ) ? '<th></th>': '').'\
'.(( in_array((int)$cookie->profile, array(1,9,7,13,14)) ) ? '<th></th>': '').'\
</tr>\
</thead>\
<tbody>\';
@ -822,10 +818,10 @@ class AdminLogistics extends AdminTab {
<td>\' + loaded.logs[i].product_supplier_reference + \'</td>\
<td>\' + loaded.logs[i].shipping_number + \'</td>\
<td>\' + ((loaded.logs[i].carrier == "laposte" || loaded.logs[i].carrier == "mondialrelay") ? carriers[loaded.logs[i].carrier] : loaded.logs[i].carrier) + \'</td>\
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14)?
'\' + ((loaded.logs[i].carrier == "laposte" || loaded.logs[i].carrier == "mondialrelay") ?\'<td><a href="/adm/index.php?tab=AdminLogistics&token='.Tools::getAdminTokenLite('AdminLogistics').'&id_order=\' + loaded.order.id + \'&delete_\' + loaded.logs[i].carrier + \'=\' + loaded.logs[i].id_order_detail + \'&delete_number=\' + loaded.logs[i].shipping_number + \'">x</a></td>': '').'\':"") +\'\
'.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14)?
'\' + ((loaded.logs[i].carrier == "laposte" || loaded.logs[i].carrier == "mondialrelay") ?\'<td><a title="Re print" class="reprint ui-icon ui-icon-arrowthickstop-1-s" data-product="\' + loaded.logs[i].product_name.replace(" - ", "<br />") + \'" data-weight="\' + loaded.logs[i].weight + \'" data-ref="\' + loaded.logs[i].product_reference + \'" data-id_order="\' + loaded.order.id + \'" data-carrier="\' + loaded.logs[i].carrier + \'" data-id_order_detail="\' + loaded.logs[i].id_order_detail + \'">+</a></td>': '').'\':"") +\'\
'.(( in_array((int)$cookie->profile, array(1,9,7,13,14)) ) ?
'\' + ((loaded.logs[i].carrier == "laposte" || loaded.logs[i].carrier == "mondialrelay") ?\'<td><a href="/adm/index.php?tab=AdminLogistics&token='.Tools::getAdminTokenLite('AdminLogistics').'&id_order=\' + loaded.order.id + \'&delete_\' + loaded.logs[i].carrier + \'=\' + loaded.logs[i].id_order_detail + \'&delete_number=\' + loaded.logs[i].shipping_number + \'">x</a></td>': '').'\':"") +\'\
'.(( in_array((int)$cookie->profile, array(1,9,7,13,14)) ) ?
'\' + ((loaded.logs[i].carrier == "laposte" || loaded.logs[i].carrier == "mondialrelay") ?\'<td><a title="Re print" class="reprint ui-icon ui-icon-arrowthickstop-1-s" data-product="\' + loaded.logs[i].product_name.replace(" - ", "<br />") + \'" data-weight="\' + loaded.logs[i].weight + \'" data-ref="\' + loaded.logs[i].product_reference + \'" data-id_order="\' + loaded.order.id + \'" data-carrier="\' + loaded.logs[i].carrier + \'" data-id_order_detail="\' + loaded.logs[i].id_order_detail + \'">+</a></td>': '').'\':"") +\'\
</tr>\';
}
@ -850,7 +846,7 @@ class AdminLogistics extends AdminTab {
';
if((int) $cookie->profile == 1 || (int) $cookie->profile == 2 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14) {
if(in_array((int)$cookie->profile, array(1,9,7,13,14))) {
$this->_html .= '
content += \'<br /><br />\';
';