diff --git a/adm/scaddressedit.php b/adm/scaddressedit.php index 1a9f11c3..615ebd32 100644 --- a/adm/scaddressedit.php +++ b/adm/scaddressedit.php @@ -55,7 +55,25 @@ if($address) { WHERE id_cart = '.pSQL(intval(Tools::getValue('id_cart'))).' '); - /* mail('marion@antadis.com', '[BBB] Modif transporteur BO', + /* Log modif Address to check errors */ + if($address['prfirstname'] != $address['cefirstname'] + || $address['cefirstname'] != Tools::getValue('cefirstname', '') + || $address['cename'] != Tools::getValue('cename', '')) { + $message = 'Modification address Socol -- id_order :'.$order['id_order']; + $message .= ' -- ancien prfirstname : '.$address['prfirstname'].' remplacé par : '.Tools::getValue('prfirstname', ''); + $message .= ' -- ancien cefirstname : '.$address['cefirstname'].' remplacé par : '.Tools::getValue('cefirstname', ''); + $message .= ' -- ancien cename : '.$address['cename'].' remplacé par : '.Tools::getValue('cename', ''); + Db::getInstance()->execute(' + INSERT INTO `'._DB_PREFIX_.'ant_log` + VALUES ( + DEFAULT, + '.(int) $cookie->id_employee.', + "'.pSQL($message).'", + NOW() + ) + '); + } + /* mail('marion@antadis.com', '[BBB] Modif transporteur BO', 'ID Customer : ' . $address['id_customer']. ' , ID Order : ' . $order['id_order']. ' , Date Order : ' . $order['date_add'].