Merge branch 'develop' of gitlab.antadis.net:dev-antadis/bebeboutik into develop

This commit is contained in:
root 2017-05-15 14:43:13 +02:00
commit 4800e60ce9

View File

@ -577,6 +577,14 @@ class AdminAntReturnprocess extends AdminTab
FROM `'._DB_PREFIX_.'customer_thread`
WHERE id_customer ='.(int)$order->id_customer.' AND id_order = '.(int)$order->id.'
');
if(!$query_thread) {
$query_thread = Db::getInstance()->getValue('
SELECT `id_customer_thread`
FROM `'._DB_PREFIX_.'customer_thread`
WHERE id_customer ='.(int)$order->id_customer.'
ORDER BY `date_upd` ASC
');
}
if($query_thread){
$thread = new CustomerThread((int)$query_thread);
$last_message = Db::getInstance()->getRow('
@ -945,6 +953,7 @@ class AdminAntReturnprocess extends AdminTab
<div class="row">
<div class="col-md-12">';
if(isset($thread)){
if($thread->id_order == $orderReturn->id_order) {
$products = Db::getInstance()->ExecuteS('
SELECT spc.*, pl.`name`
FROM `'._DB_PREFIX_.'support_product_customerthread` spc
@ -973,8 +982,9 @@ class AdminAntReturnprocess extends AdminTab
</a>';
}
}
}
if($last_message){
$html .='<h5 style="background:#504D8B;color:#fff;padding:5px; text-align:center;">Dernier Message</h5>';
$html .='<h5 style="background:#504D8B;color:#fff;padding:5px; text-align:center;">Dernier Message '.($thread->id_order != $orderReturn->id_order?'<br/><i>(Ne concerne pas cette commande)</i>':'').'</h5>';
$last_message['message'] = preg_replace('/(https?:\/\/[a-z0-9#%&_=\(\)\.\? \+\-@\/]{6,1000})([\s\n<])/Uui', '<a href="\1">\1</a>\2', html_entity_decode($last_message['message'], ENT_NOQUOTES, 'UTF-8'));
if(!empty($last_message['employee_name'])) {