Merge branch 'develop' of gitlab.antadis.net:dev-antadis/bebeboutik into develop
This commit is contained in:
commit
88f8ea9c57
@ -234,6 +234,16 @@ class AdminOrders extends AdminTab
|
|||||||
)
|
)
|
||||||
');
|
');
|
||||||
$id_order_return = Db::getInstance()->Insert_ID();
|
$id_order_return = Db::getInstance()->Insert_ID();
|
||||||
|
Db::getInstance()->ExecuteS('
|
||||||
|
INSERT INTO `'._DB_PREFIX_.'order_return_history`
|
||||||
|
VALUES (
|
||||||
|
DEFAULT,
|
||||||
|
'.(int) $cookie->id_employee.',
|
||||||
|
'.(int) $id_order_return.',
|
||||||
|
2,
|
||||||
|
NOW()
|
||||||
|
)
|
||||||
|
');
|
||||||
foreach($return_reasons as $return_reason) {
|
foreach($return_reasons as $return_reason) {
|
||||||
Db::getInstance()->Execute('
|
Db::getInstance()->Execute('
|
||||||
INSERT INTO `'._DB_PREFIX_.'order_return_detail_qty` (`id_order_return`, `id_order_detail`, `qty`, `reason`, `instruction`)
|
INSERT INTO `'._DB_PREFIX_.'order_return_detail_qty` (`id_order_return`, `id_order_detail`, `qty`, `reason`, `instruction`)
|
||||||
|
@ -99,6 +99,16 @@ class AdminReturn extends AdminTab
|
|||||||
if ($orderReturn->save())
|
if ($orderReturn->save())
|
||||||
{
|
{
|
||||||
$orderReturnState = new OrderReturnState($orderReturn->state);
|
$orderReturnState = new OrderReturnState($orderReturn->state);
|
||||||
|
Db::getInstance()->ExecuteS('
|
||||||
|
INSERT INTO `'._DB_PREFIX_.'order_return_history`
|
||||||
|
VALUES (
|
||||||
|
DEFAULT,
|
||||||
|
'.(int) $cookie->id_employee.',
|
||||||
|
'.(int) $orderReturn->id.',
|
||||||
|
'.(int) $orderReturn->state.',
|
||||||
|
NOW()
|
||||||
|
)
|
||||||
|
');
|
||||||
$vars = array(
|
$vars = array(
|
||||||
'{lastname}' => $customer->lastname,
|
'{lastname}' => $customer->lastname,
|
||||||
'{firstname}' => $customer->firstname,
|
'{firstname}' => $customer->firstname,
|
||||||
|
@ -110,6 +110,16 @@ class AdminAntReturnprocess extends AdminTab
|
|||||||
if ($orderReturn->save())
|
if ($orderReturn->save())
|
||||||
{
|
{
|
||||||
$orderReturnState = new OrderReturnState($orderReturn->state);
|
$orderReturnState = new OrderReturnState($orderReturn->state);
|
||||||
|
Db::getInstance()->ExecuteS('
|
||||||
|
INSERT INTO `'._DB_PREFIX_.'order_return_history`
|
||||||
|
VALUES (
|
||||||
|
DEFAULT,
|
||||||
|
'.(int) $cookie->id_employee.',
|
||||||
|
'.(int) $orderReturn->id.',
|
||||||
|
'.(int) $orderReturn->state.',
|
||||||
|
NOW()
|
||||||
|
)
|
||||||
|
');
|
||||||
$vars = array(
|
$vars = array(
|
||||||
'{lastname}' => $customer->lastname,
|
'{lastname}' => $customer->lastname,
|
||||||
'{firstname}' => $customer->firstname,
|
'{firstname}' => $customer->firstname,
|
||||||
@ -772,6 +782,15 @@ class AdminAntReturnprocess extends AdminTab
|
|||||||
$returnProducts = OrderReturn::getOrdersReturnProducts($orderReturn->id, $order);
|
$returnProducts = OrderReturn::getOrdersReturnProducts($orderReturn->id, $order);
|
||||||
$orderReturnState = new OrderReturnState($orderReturn->state);
|
$orderReturnState = new OrderReturnState($orderReturn->state);
|
||||||
|
|
||||||
|
$return_history = Db::getInstance()->ExecuteS('
|
||||||
|
SELECT rh.*, orsl.`name` as state, CONCAT(e.`firstname`,\' \',e.`lastname`) as employee
|
||||||
|
FROM '._DB_PREFIX_.'order_return_history rh
|
||||||
|
LEFT JOIN '._DB_PREFIX_.'order_return_state_lang orsl ON (orsl.`id_order_return_state` = rh.`id_order_return_state` AND orsl.`id_lang` = '.(int)($cookie->id_lang).')
|
||||||
|
LEFT JOIN '._DB_PREFIX_.'employee e ON (e.`id_employee` = rh.`id_employee`)
|
||||||
|
WHERE rh.`id_order_return` = '.(int)$orderReturn->id.'
|
||||||
|
ORDER BY rh.`date_add` DESC
|
||||||
|
');
|
||||||
|
|
||||||
$other_returnProducts = Db::getInstance()->ExecuteS('
|
$other_returnProducts = Db::getInstance()->ExecuteS('
|
||||||
SELECT a.*, orsl.`name`, ord.`id_order_detail`, ord.`qty`
|
SELECT a.*, orsl.`name`, ord.`id_order_detail`, ord.`qty`
|
||||||
FROM '._DB_PREFIX_.'order_return a
|
FROM '._DB_PREFIX_.'order_return a
|
||||||
@ -862,6 +881,18 @@ class AdminAntReturnprocess extends AdminTab
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-offset-1 col-md-4">
|
<div class="col-md-offset-1 col-md-4">
|
||||||
|
<p style="margin-bottom:0;">'.$this->l('Historique statut:').'</p>
|
||||||
|
<table class="table">';
|
||||||
|
foreach ($return_history as $key => $history) {
|
||||||
|
$html .= '
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:11px;">'.date('d/m/Y H:i',strtotime($history['date_add'])).'</td>
|
||||||
|
<td style="font-size:11px;font-weight:bold">'.$history['state'].'</td>
|
||||||
|
<td style="font-size:11px;">'.$history['employee'].'</td>
|
||||||
|
</tr>';
|
||||||
|
}
|
||||||
|
$html .= '
|
||||||
|
</table>
|
||||||
<h5 style="background:#504D8B;color:#fff;padding:5px; text-align:center;">'.$this->l('Changer le statut du retour').'</h5>
|
<h5 style="background:#504D8B;color:#fff;padding:5px; text-align:center;">'.$this->l('Changer le statut du retour').'</h5>
|
||||||
<form style="padding:10px 20px;background:#efefef;" action="'.$currentIndex.'&submitAddorder_return=1&updateorder_return&id_order_return='.(int)$orderReturn->id.'&token='.$this->token.'" method="post">
|
<form style="padding:10px 20px;background:#efefef;" action="'.$currentIndex.'&submitAddorder_return=1&updateorder_return&id_order_return='.(int)$orderReturn->id.'&token='.$this->token.'" method="post">
|
||||||
<input type="hidden" name="id_order" value="'.$orderReturn->id_order.'" />
|
<input type="hidden" name="id_order" value="'.$orderReturn->id_order.'" />
|
||||||
|
Loading…
Reference in New Issue
Block a user