+ Optimize transactions ilink interface
This commit is contained in:
parent
890ff5c0e5
commit
a299394c77
|
@ -451,9 +451,13 @@ class Hyperviseur_dash extends CI_Controller
|
|||
$endDate = Date('Y-m-d', strtotime($endDate . "+1 day"));
|
||||
if ($type == 'transaction')
|
||||
$data['transactions'] = $this->user_model->getTransactions($startDate, $endDate, $network_id);
|
||||
else if ($type == 'transaction_ilink')
|
||||
else if ($type == 'transaction_ilink') {
|
||||
$networkDetails = $this->user_model->getNetworkDetails($network_id);
|
||||
$data['currency_name_fr'] = $networkDetails->first_row()->currency_name_fr;
|
||||
$data['currency_name_en'] = $networkDetails->first_row()->currency_name_en;
|
||||
$data['transactions'] = $this->user_model->getIlinkTransactions($startDate, $endDate, $network_id);
|
||||
else if ($type == 'commission_transfer')
|
||||
|
||||
} else if ($type == 'commission_transfer')
|
||||
$data['transactions'] = $this->user_model->getCommissionTransfers($startDate, $endDate, $this->session->userdata('member_code'));
|
||||
else if ($type == 'balance_statement')
|
||||
$data['wallets'] = $this->user_model->getInfosWalletAgentForHyper($this->session->userdata('network_id'));
|
||||
|
|
|
@ -439,4 +439,5 @@ $lang ['refund_history'] = 'History of refunds';
|
|||
$lang ['remaining_amount'] = 'Remaining amount';
|
||||
$lang ['amount_greater_than_balance'] = 'Amount greater than the compensation balance';
|
||||
$lang['no_refund'] = 'No refund';
|
||||
$lang['final_currency'] = 'Currency of the country of arrival';
|
||||
?>
|
||||
|
|
|
@ -451,5 +451,6 @@ $lang['refund_history'] = 'Historique des remboursements';
|
|||
$lang['remaining_amount'] = 'Montant restant';
|
||||
$lang['amount_greater_than_balance'] = 'Montant supérieur au solde de compensation';
|
||||
$lang['no_refund'] = 'Aucun remboursement';
|
||||
$lang['final_currency'] = 'Monnaie du pays d\'arrivée';
|
||||
|
||||
?>
|
||||
|
|
|
@ -92,12 +92,25 @@ use Brick\Money\Money;
|
|||
<span class="info-box-text"><?php echo $this->lang->line('Période') ?> </span>
|
||||
<span class="info-box-number">
|
||||
<input id="picker"
|
||||
style="background: #fff; cursor: pointer; padding: 1px 1px; border: 1px solid #ccc; width: 100%" data-category="<?php echo isset($category) ? $category : null ?>"
|
||||
type="text" name="daterange" data-lang="<?php echo $this->session->userdata('site_lang') ?>"
|
||||
value="<?php echo ($startDate!=null & $endDate != null) ? $startDate. ' - '.$endDate : ''?>"/>
|
||||
style="background: #fff; cursor: pointer; padding: 1px 1px; border: 1px solid #ccc; width: 100%"
|
||||
data-category="<?php echo isset($category) ? $category : null ?>"
|
||||
type="text" name="daterange"
|
||||
data-lang="<?php echo $this->session->userdata('site_lang') ?>"
|
||||
value="<?php echo ($startDate != null & $endDate != null) ? $startDate . ' - ' . $endDate : '' ?>"/>
|
||||
|
||||
</span>
|
||||
<span> Format : <?php echo $this->session->userdata('site_lang') === 'french' ? 'Jour - Mois - Année ' : 'Year - Month - Day'?> </span>
|
||||
<span> Format : <?php echo $this->session->userdata('site_lang') === 'french' ? 'Jour - Mois - Année ' : 'Year - Month - Day' ?> </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 col-xs-6">
|
||||
<div class="small-box bg-red-active">
|
||||
<div class="inner">
|
||||
<h4>
|
||||
<strong> <?php echo $this->session->userdata('currency_code') . ' - ' . $currency_name_fr; ?> </strong>
|
||||
</h4>
|
||||
<p><?php echo $this->lang->line('currency') ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -126,13 +139,14 @@ use Brick\Money\Money;
|
|||
<th><?php echo $this->lang->line('cart_number') ?></th>
|
||||
<th><?php echo $this->lang->line('customer_net_amount_init') ?></th>
|
||||
<th><?php echo $this->lang->line('customer_net_amount_final') ?></th>
|
||||
<th><?php echo $this->lang->line('commission_paying_network') ?></th>
|
||||
<th><?php echo $this->lang->line('final_currency') ?></th>
|
||||
<th><?php echo $this->lang->line('departure_country') ?></th>
|
||||
<th><?php echo $this->lang->line('country_of_destination') ?></th>
|
||||
<th><?php echo $this->lang->line('fees') ?></th>
|
||||
<th><?php echo $this->lang->line('tax') ?></th>
|
||||
<th><?php echo $this->lang->line('Commission de la banque') ?></th>
|
||||
<th><?php echo $this->lang->line('Commission de l\'hyperviseur') ?></th>
|
||||
<th><?php echo $this->lang->line('commission_paying_network') ?></th>
|
||||
<th><?php echo $this->lang->line('Commission du superviseur') ?></th>
|
||||
<th><?php echo $this->lang->line('Commission de l\'agent') ?></th>
|
||||
<th><?php echo $this->lang->line('agent_name') ?></th>
|
||||
|
@ -174,17 +188,18 @@ use Brick\Money\Money;
|
|||
$moneyNetFinal =Money::of(round($row->montant_net_final_country,2),$row->final_currency ? $row->final_currency : 'XAF',$context);
|
||||
echo "<tr>
|
||||
<td align='center' >$row->id_transaction</td>
|
||||
<td>".strtoupper($row->acteur).' - '.$row->operation."</td>
|
||||
<td>".join(" ", str_split($row->numero_carte, 4))."</td>
|
||||
<td>".$moneyNetInit->formatTo('fr_FR')."</td>
|
||||
<td>".$moneyNetFinal->formatTo('fr_FR')."</td>
|
||||
<td>" . strtoupper($row->acteur) . ' - ' . $row->operation . "</td>
|
||||
<td>" . join(" ", str_split($row->numero_carte, 4)) . "</td>
|
||||
<td>" . $moneyNetInit->formatTo('fr_FR') . "</td>
|
||||
<td>" . $moneyNetFinal->formatTo('fr_FR') . "</td>
|
||||
<td>" . Money::of(round($row->part_reseau_payeur_final_country ? $row->part_reseau_payeur_final_country : 0, 2), $row->final_currency ? $row->final_currency : 'XAF', $context)->formatTo('fr_FR') . "</td>
|
||||
<td>" . $row->final_currency . "</td>
|
||||
<td>".$row->pays_init."</td>
|
||||
<td>".$row->pays_final."</td>
|
||||
<td>".Money::of(round($row->frais,2), $row->init_currency,$context)->formatTo('fr_FR')."</td>
|
||||
<td>".Money::of(round($row->taxe, 2),$row->init_currency,$context)->formatTo('fr_FR')."</td>
|
||||
<td>".Money::of(round($row->commission_banque ? $row->commission_banque : 0, 2),$row->init_currency,$context)->formatTo('fr_FR')."</td>
|
||||
<td>".Money::of(round($row->commission_hyp ? $row->commission_hyp : 0, 2),$row->init_currency,$context)->formatTo('fr_FR')."</td>
|
||||
<td>".Money::of(round($row->part_reseau_payeur_final_country ? $row->part_reseau_payeur_final_country : 0, 2),$row->final_currency ? $row->final_currency : 'XAF',$context)->formatTo('fr_FR')."</td>
|
||||
<td>".Money::of(round($row->commission_sup ? $row->commission_sup : 0 , 2),$row->init_currency,$context)->formatTo('fr_FR')."</td>
|
||||
<td>".Money::of(round($row->commission_ag ? $row->commission_ag : 0, 2),$row->init_currency,$context)->formatTo('fr_FR')."</td>
|
||||
<td>".$row->agent."</td>
|
||||
|
@ -261,11 +276,11 @@ use Brick\Money\Money;
|
|||
$(function () {
|
||||
const lang = $('#picker').data('lang');
|
||||
const format = lang === 'french' ? 'fr' : 'en';
|
||||
moment.updateLocale(moment.locale(format), { invalidDate: "" }); // Blank text when is invalid date
|
||||
moment.updateLocale(moment.locale(format), {invalidDate: ""}); // Blank text when is invalid date
|
||||
var table = $('#transactions').DataTable({
|
||||
"aaSorting": [[ 17, "desc" ]],
|
||||
"columnDefs": [ {
|
||||
targets: 17,
|
||||
"aaSorting": [[18, "desc"]],
|
||||
"columnDefs": [{
|
||||
targets: 18,
|
||||
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format)
|
||||
}],
|
||||
dom: 'Bfrtip',
|
||||
|
@ -281,7 +296,7 @@ use Brick\Money\Money;
|
|||
for (var i = 0; i < data.body.length; i++) {
|
||||
for (var j = 0; j < data.body[i].length; j++) {
|
||||
// data.body[i][j] = '\u200C' + data.body[i][j];
|
||||
if ([3, 4, 7, 8, 9, 10, 11, 12, 13].includes(j)) {
|
||||
if ([3, 4, 5, 9, 10, 11, 12, 13, 14].includes(j)) {
|
||||
// Get the value and strip the non numeric characters
|
||||
// var value = $(this).text();
|
||||
value = data.body[i][j].replace(',', ".")
|
||||
|
|
Loading…
Reference in New Issue