From b2597d161b4af1ffc4ec2c7f8799dea816d2e9f6 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Tue, 30 Jun 2020 12:07:41 +0100 Subject: [PATCH] + Update historic list v3 --- application/controllers/Hyperviseur_dash.php | 2 +- application/language/french/message_lang.php | 3 +++ application/models/User_model.php | 4 ++-- .../views/historique_transactions_ilink.php | 14 ++++++++------ 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php index 51b7fe28..d8df25bc 100755 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -1020,7 +1020,7 @@ class Hyperviseur_dash extends CI_Controller if (isset($country)) { $data['country_id'] = $country; $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'] = []; if($res){ $result = $res->result(); diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index 34b58107..f6226eea 100755 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -414,4 +414,7 @@ $lang['fees'] = 'Frais'; $lang['tax'] = 'Taxe'; $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['issuer_id'] = 'ID émetteur'; +$lang['recipient_id']= 'ID destinataire'; +$lang['commission_paying_network'] = 'Commission de l\'hyperviseur payeur'; ?> diff --git a/application/models/User_model.php b/application/models/User_model.php index f3d723fa..bc4cdd99 100755 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -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 - 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){ return $query; }else{ diff --git a/application/views/historique_transactions_ilink.php b/application/views/historique_transactions_ilink.php index eaf3c60d..70373352 100755 --- a/application/views/historique_transactions_ilink.php +++ b/application/views/historique_transactions_ilink.php @@ -126,17 +126,18 @@ use Brick\Money\Money; lang->line('cart_number') ?> lang->line('customer_net_amount_init') ?> lang->line('customer_net_amount_final') ?> - Pays de depart - Pays d'arrivée + lang->line('departure_country') ?> + lang->line('country_of_destination') ?> lang->line('fees') ?> lang->line('tax') ?> lang->line('Commission de la banque') ?> lang->line('Commission de l\'hyperviseur') ?> + lang->line('commission_paying_network') ?> lang->line('Commission du superviseur') ?> lang->line('Commission de l\'agent') ?> lang->line('agent_name') ?> - ID emetteur - ID destinataire + lang->line('issuer_id') ?> + lang->line('recipient_id')?> Date session->userdata('category') != 'super') { ?> Action @@ -178,6 +179,7 @@ use Brick\Money\Money; ".Money::of(round($row->taxe, 2),$row->init_currency,$context)->formatTo('fr_FR')." ".Money::of(round($row->commission_banque ? $row->commission_banque : 0, 2),$row->init_currency,$context)->formatTo('fr_FR')." ".Money::of(round($row->commission_hyp ? $row->commission_hyp : 0, 2),$row->init_currency,$context)->formatTo('fr_FR')." + ".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')." ".Money::of(round($row->commission_sup ? $row->commission_sup : 0 , 2),$row->init_currency,$context)->formatTo('fr_FR')." ".Money::of(round($row->commission_ag ? $row->commission_ag : 0, 2),$row->init_currency,$context)->formatTo('fr_FR')." ".$row->agent." @@ -248,9 +250,9 @@ use Brick\Money\Money; const format = lang === 'french' ? 'fr' : 'en'; moment.updateLocale(moment.locale(format), { invalidDate: "" }); // Blank text when is invalid date $('#transactions').DataTable({ - "aaSorting": [[ 0, "desc" ]], + "aaSorting": [[ 17, "desc" ]], "columnDefs": [ { - targets: 16, + targets: 17, render: $.fn.dataTable.render.moment( 'YYYY-MM-DD HH:mm:ss' , 'D MMMM YYYY HH:mm:ss', format) }] });