Merge branch 'ticket-fidelite' into develop

This commit is contained in:
Marion Muszynski 2016-06-08 12:15:18 +02:00
commit f01b450dc3
2 changed files with 2 additions and 5 deletions

View File

@ -55,10 +55,10 @@ $total_discount = 0;
if (!empty($allOrders)) {
$nb_orders = count($allOrders);
foreach ($allOrders as $key => $order) {
if ($order['id_loyalty_state'] !=2){
if ((int)$order['id_loyalty_state'] !=2){
continue;
}
$total_discount += (float)$order['id_loyalty_state'];
$total_discount += (float)$order['discount_value'];
}
} else {
$nb_orders = 0;

View File

@ -651,7 +651,6 @@ class Loyalty extends Module
<tr style="background-color:#F5E9CF; padding: 0.3em 0.1em;">
<th>'.$this->l('Order').'</th>
<th>'.$this->l('Date').'</th>
<th>'.$this->l('Total (without shipping)').'</th>
<th>'.$this->l('Discount').'</th>
<th>'.$this->l('Discount Status').'</th>
</tr>';
@ -661,14 +660,12 @@ class Loyalty extends Module
<tr style="background-color: '.($key % 2 != 0 ? '#FFF6CF' : '#FFFFFF').';">
<td>'.((int)$loyalty['id'] > 0 ? '<a style="color: #268CCD; font-weight: bold; text-decoration: underline;" href="index.php?tab=AdminOrders&id_order='.$loyalty['id'].'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($params['cookie']->id_employee)).'">'.$this->l('#').sprintf('%06d', $loyalty['id']).'</a>' : '--').'</td>
<td>'.Tools::displayDate($loyalty['date'], (int)($params['cookie']->id_lang)).'</td>
<td>'.((int)$loyalty['id'] > 0 ? Tools::displayPrice($loyalty['total_without_shipping'],(int)Configuration::get('PS_CURRENCY_DEFAULT')) : '--').'</td>
<td>'.Tools::displayPrice((float)$loyalty['discount_value'],(int)Configuration::get('PS_CURRENCY_DEFAULT')).'</td>
<td>'.$loyalty['state'].'</td>
</tr>';
}
$html.= '
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>'.$this->l('Voucher value:').'</td>
<td>'.Tools::displayPrice($discount_value, new Currency((int)Configuration::get('PS_CURRENCY_DEFAULT'))).'</td>