This commit is contained in:
Michael RICOIS 2018-01-11 13:03:54 +01:00
parent 391d526942
commit 9228227d89

View File

@ -158,12 +158,15 @@ class AdminLogistics extends AdminTab {
return TRUE;
}
public function postProcess() {
public function postProcess()
{
global $cookie, $logistics_carriers;
// Delete number
if(( in_array((int)$cookie->profile, array(1,9,7,13,14)) )
&& ( $delete_number = Tools::getValue('delete_number') )) {
// Suppression LAPOSTE
if ($delete = (int) Tools::getValue('delete_laposte')) {
Db::getInstance()->ExecuteS('
DELETE FROM `'._DB_PREFIX_.'lapostews`
@ -185,7 +188,9 @@ class AdminLogistics extends AdminTab {
AND `shipping_number` = "'.pSQL($delete_number).'"
');
}
} elseif($delete = (int) Tools::getValue('delete_exapaq')) {
}
// Suppression EXAPAQ
elseif ($delete = (int) Tools::getValue('delete_exapaq')) {
Db::getInstance()->ExecuteS('
DELETE FROM `'._DB_PREFIX_.'exapaqws`
WHERE `id_order_detail` = '.$delete.'
@ -203,7 +208,9 @@ class AdminLogistics extends AdminTab {
AND `shipping_number` = "'.pSQL($delete_number).'"
');
}
} elseif($delete = (int) Tools::getValue('delete_mondialrelay')) {
}
// Suppression MONDIAL RELAY
elseif ($delete = (int) Tools::getValue('delete_mondialrelay')) {
Db::getInstance()->ExecuteS('
DELETE FROM `'._DB_PREFIX_.'mondialrelay_parcel`
WHERE `id_order_detail` = '.$delete.'
@ -222,7 +229,12 @@ class AdminLogistics extends AdminTab {
');
}
}
// Suppression PHILEA
elseif ($delete = (int) Tools::getValue('delete_philea')) {
}
// Pour les commandes ...
$id_order_details = array();
foreach(Db::getInstance()->ExecuteS('
SELECT `id_order_detail`