Merge branch 'ticket-13166-ReturnProcess'

This commit is contained in:
Marion Muszynski 2017-06-07 15:30:50 +02:00
commit 0fc01207fc

View File

@ -1248,7 +1248,9 @@ class AdminAntReturnprocess extends AdminTab
<div class="table-responsive">
<table class="table table-custombordered">
<tbody>';
foreach ($returnProducts AS $k => $product) {
$id_order_details = array();
foreach ($order->getProducts() AS $k => $product) {
$id_order_details[] = (int)($product['id_order_detail']);
$img_path = '';
$img = Db::getInstance()->getRow('
SELECT id_image
@ -1338,6 +1340,45 @@ class AdminAntReturnprocess extends AdminTab
$html .='
</div>
</div>
<div class="row">
<div class="col-md-12">';
$parcel_sent_other = Db::getInstance()->ExecuteS('
SELECT lpr.*, od.`product_name`
FROM '._DB_PREFIX_.'lapostews_return lpr
LEFT JOIN '._DB_PREFIX_.'order_detail od ON (lpr.id_order_detail = od.id_order_detail)
WHERE lpr.id_order_detail IN ('.implode(',', $id_order_details).')
AND lpr.id_order_return != '.$orderReturn->id.'
ORDER BY lpr.date_add DESC'
);
if($parcel_sent_other && !empty($parcel_sent_other)) {
$html .= '
<p>Envoyé via un autre retour :</p>
<table class="table">
<thead>
<tr>
<th>'.$this->l('Produit').'</th>
<th style="text-align:center;">'.$this->l('Qté').'</th>
<th style="text-align:center;">'.$this->l('Shipping number').'</th>
<th style="text-align:center;">'.$this->l('date envoi').'</th>
</tr>
</thead>
<tbody>';
foreach ($parcel_sent_other as $key => $parcel) {
$html .= '
<tr>
<td>'.$parcel['product_name'].' (retour <a href="index.php?tab=AdminAntReturnprocess&updateorder_return&id_order_return='.(int)$parcel['id_order_return'].'&token='.Tools::getAdminTokenLite('AdminAntReturnprocess').'" target="_blank">#'.(int)$parcel['id_order_return'].'</a>)</td>
<td style="text-align:center;">'.$parcel['quantity'].'</td>
<td style="text-align:center;">'.$parcel['shipping_number'].'</td>
<td style="text-align:center;">'.date('d/m/Y H:i',strtotime($parcel['date_add'])).'</td>
</tr>';
}
$html .= '</tbody>
</table>';
}
$html .='
</div>
</div>
</div>
</div>
</div>