+ Update historic list v3

This commit is contained in:
Djery-Tom 2020-06-30 12:07:41 +01:00
parent f7317e16a5
commit b2597d161b
4 changed files with 14 additions and 9 deletions

View File

@ -1020,7 +1020,7 @@ class Hyperviseur_dash extends CI_Controller
if (isset($country)) { if (isset($country)) {
$data['country_id'] = $country; $data['country_id'] = $country;
$data['country'] = $this->user_model->getCountry($country)->first_row(); $data['country'] = $this->user_model->getCountry($country)->first_row();
$res = $this->user_model->getActiveNetworksByCountry($country); $res = $this->user_model->getActiveNetworksByCountry($country,$this->session->userdata('network_id'));
$data['networks'] = []; $data['networks'] = [];
if($res){ if($res){
$result = $res->result(); $result = $res->result();

View File

@ -414,4 +414,7 @@ $lang['fees'] = 'Frais';
$lang['tax'] = 'Taxe'; $lang['tax'] = 'Taxe';
$lang['customer_net_amount_init'] = 'Montant net client du pays de départ'; $lang['customer_net_amount_init'] = 'Montant net client du pays de départ';
$lang['customer_net_amount_final'] = 'Montant net client du pays d\'arrivée'; $lang['customer_net_amount_final'] = 'Montant net client du pays d\'arrivée';
$lang['issuer_id'] = 'ID émetteur';
$lang['recipient_id']= 'ID destinataire';
$lang['commission_paying_network'] = 'Commission de l\'hyperviseur payeur';
?> ?>

View File

@ -2487,9 +2487,9 @@ class User_model extends CI_Model
} }
} }
public function getActiveNetworksByCountry($country_id){ public function getActiveNetworksByCountry($country_id , $network_id){
$query = $this->db->query("SELECT networks.name , networks.id , configWallet.type FROM `networks` INNER JOIN countries ON networks.country_id=countries.id $query = $this->db->query("SELECT networks.name , networks.id , configWallet.type FROM `networks` INNER JOIN countries ON networks.country_id=countries.id
INNER JOIN configWallet ON configWallet.id_network = networks.id WHERE status = 1 AND countries.id = $country_id"); INNER JOIN configWallet ON configWallet.id_network = networks.id WHERE status = 1 AND networks.id <> $network_id AND countries.id = $country_id");
if($query->num_rows()>0){ if($query->num_rows()>0){
return $query; return $query;
}else{ }else{

View File

@ -126,17 +126,18 @@ use Brick\Money\Money;
<th><?php echo $this->lang->line('cart_number') ?></th> <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_init') ?></th>
<th><?php echo $this->lang->line('customer_net_amount_final') ?></th> <th><?php echo $this->lang->line('customer_net_amount_final') ?></th>
<th>Pays de depart</th> <th><?php echo $this->lang->line('departure_country') ?></th>
<th>Pays d'arrivée</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('fees') ?></th>
<th><?php echo $this->lang->line('tax') ?></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 la banque') ?></th>
<th><?php echo $this->lang->line('Commission de l\'hyperviseur') ?></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 du superviseur') ?></th>
<th><?php echo $this->lang->line('Commission de l\'agent') ?></th> <th><?php echo $this->lang->line('Commission de l\'agent') ?></th>
<th><?php echo $this->lang->line('agent_name') ?></th> <th><?php echo $this->lang->line('agent_name') ?></th>
<th> ID emetteur</th> <th><?php echo $this->lang->line('issuer_id') ?></th>
<th> ID destinataire</th> <th><?php echo $this->lang->line('recipient_id')?></th>
<th align='center'>Date</th> <th align='center'>Date</th>
<?php if ($this->session->userdata('category') != 'super') { ?> <?php if ($this->session->userdata('category') != 'super') { ?>
<th align='center'>Action</th> <th align='center'>Action</th>
@ -178,6 +179,7 @@ use Brick\Money\Money;
<td>".Money::of(round($row->taxe, 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_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->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_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>".Money::of(round($row->commission_ag ? $row->commission_ag : 0, 2),$row->init_currency,$context)->formatTo('fr_FR')."</td>
<td>".$row->agent."</td> <td>".$row->agent."</td>
@ -248,9 +250,9 @@ use Brick\Money\Money;
const format = lang === 'french' ? 'fr' : 'en'; 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
$('#transactions').DataTable({ $('#transactions').DataTable({
"aaSorting": [[ 0, "desc" ]], "aaSorting": [[ 17, "desc" ]],
"columnDefs": [ { "columnDefs": [ {
targets: 16, targets: 17,
render: $.fn.dataTable.render.moment( 'YYYY-MM-DD HH:mm:ss' , 'D MMMM YYYY HH:mm:ss', format) render: $.fn.dataTable.render.moment( 'YYYY-MM-DD HH:mm:ss' , 'D MMMM YYYY HH:mm:ss', format)
}] }]
}); });