diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php
index 63307c88..ddc610b7 100755
--- a/application/controllers/Hyperviseur_dash.php
+++ b/application/controllers/Hyperviseur_dash.php
@@ -371,7 +371,6 @@ class Hyperviseur_dash extends CI_Controller
} elseif ($data['hasWallet']->first_row()->type == 'ilink') {
- $data['taxes'] = $this->user_model->getTaxes($data['idConfig']);
$transactions = $this->user_model->getNetworkIlinTransactions($id_network);
$data["transactions"] = array();
$totalCommissionBanque = 0;
@@ -454,6 +453,10 @@ class Hyperviseur_dash extends CI_Controller
$data['transactions'] = $this->user_model->getTransactions($startDate, $endDate, $network_id);
else if ($type == 'transaction_ilink')
$data['transactions'] = $this->user_model->getIlinkTransactions($startDate, $endDate, $network_id);
+ 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'));
else
$data['transactions'] = $this->user_model->getRecharges($startDate, $endDate, $network_id);
@@ -475,6 +478,10 @@ class Hyperviseur_dash extends CI_Controller
$this->load->view('historique_transactions');
else if ($type == 'transaction_ilink')
$this->load->view('historique_transactions_ilink');
+ else if ($type == 'commission_transfer')
+ $this->load->view('historique_transferts_commission');
+ else if ($type == 'balance_statement')
+ $this->load->view('config_wallet_ilink_hyp/etat_soldes');
else
$this->load->view('historique_recharges');
$this->load->view('footer');
@@ -994,8 +1001,10 @@ class Hyperviseur_dash extends CI_Controller
$res = $this->user_model->getSharingRate($network->id , $data['idConfig']);
if($res){
$network->rate = $res->first_row()->taux_partage;
+ $network->url = $res->first_row()->url;
}else{
$network->rate = null;
+ $network->url = null;
}
$data['networks'][] = $network;
}
@@ -1092,6 +1101,11 @@ class Hyperviseur_dash extends CI_Controller
$this->load->view('header_hyp', $data);
$this->load->view('config_wallet_ilink_hyp/agent_send_cash_canal');
break;
+ case 'taxes':
+ $data['taxes'] = $this->user_model->getTaxes($data['idConfig']);
+ $this->load->view('header_hyp', $data);
+ $this->load->view('config_wallet_ilink_hyp/taxes');
+ break;
}
$this->load->view('footer');
}
@@ -1124,8 +1138,8 @@ class Hyperviseur_dash extends CI_Controller
$network_id = $_POST['network_id'];
$config_id = $_POST['config_id'];
$rate = $_POST['rate'];
-
- $res = $this->user_model->setSharingRate($network_id,$config_id,$rate);
+ $url = $_POST['url'];
+ $res = $this->user_model->setSharingRate($network_id,$config_id,$rate,$url);
if ($res) {
echo json_encode("200");
diff --git a/application/controllers/Superviseur_dash.php b/application/controllers/Superviseur_dash.php
index e5663769..5512409a 100755
--- a/application/controllers/Superviseur_dash.php
+++ b/application/controllers/Superviseur_dash.php
@@ -1,4 +1,8 @@
user_model->getConfigWallet($this->session->userdata('network_id'));
if ($this->input->get('history')) {
- $this->historique($id_network, $this->input->get('d'), $this->input->get('f'), $this->session->userdata('member_code'));
+ $this->historique($id_network, $this->input->get('d'), $this->input->get('f'), $this->session->userdata('member_code'),
+ $this->input->get('history'));
} else {
+ $context = new AutoContext();
//Create wallet if it not exist
$res = $this->user_model->getWallet($agent_id );
if($res == false){
@@ -232,8 +238,8 @@ class Superviseur_dash extends CI_Controller
$res = $this->user_model->getWallet($agent_id);
if ($res!=null){
$row = $res->first_row();
- $data["commission"] = $row->balance_com;
- $data["principal"] = $row->balance_princ;
+ $data["commission"] = Money::of(round($row->balance_com,2), $this->session->userdata('currency_code'),$context)->formatTo('fr_FR');
+ $data["principal"] = Money::of(round($row->balance_princ,2), $this->session->userdata('currency_code'),$context)->formatTo('fr_FR');
$agents_g = $this->user_model->getUsersGeolocatedForSup($this->session->userdata('member_code'));
$data['agents_g'] = $agents_g;
@@ -243,7 +249,11 @@ class Superviseur_dash extends CI_Controller
foreach($agents_g->result() AS $row){
$wallet = $this->user_model->getWallet($row->agent_id);
if($wallet){
- $transactions = $this->user_model->getAgentTransactions($wallet->first_row()->wallet_id);
+ if ($data['hasWallet']->first_row()->type == 'visa') {
+ $transactions = $this->user_model->getAgentTransactions($wallet->first_row()->wallet_id);
+ } elseif ($data['hasWallet']->first_row()->type == 'ilink') {
+ $transactions = $this->user_model->getAgentiLinkTransactions($wallet->first_row()->wallet_id);
+ }
if($transactions){
foreach($transactions->result() AS $trans){
$trans->agent_id = $row->agent_id ; // Add agent id to transaction
@@ -261,6 +271,7 @@ class Superviseur_dash extends CI_Controller
}
+ $data['currency_code'] = $this->session->userdata('currency_code');
$data['alert'] = "";
$data['active'] = "wallet";
$data['token'] = $this->session->userdata('token');
@@ -279,21 +290,31 @@ class Superviseur_dash extends CI_Controller
$data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($id_network);
$data['geolocated_user'] = $this->user_model->getSuperNameAndCodeForSup($this->session->userdata('member_code'));
$this->load->view('header_sup',$data);
- $this->load->view('gestion_wallet_sup');
+ if ($data['hasWallet']->first_row()->type == 'visa')
+ $this->load->view('gestion_wallet_sup');
+ elseif ($data['hasWallet']->first_row()->type == 'ilink')
+ $this->load->view('gestion_wallet_sup_ilink');
$this->load->view('footer');
}
}
}
- private function historique($network_id, $startDate, $endDate, $codeMembre)
+ private function historique($network_id, $startDate, $endDate, $codeMembre, $type)
{
$data['configWallet'] = $this->user_model->getConfigWallet($network_id);
$format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d';
$data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null;
$data['endDate'] = $endDate ? date($format, strtotime($endDate)) : null;
$endDate = Date('Y-m-d', strtotime($endDate . "+1 day"));
- $data['transactions'] = $this->user_model->getTransactionsSup($startDate, $endDate, $codeMembre);
+ if ($type == 'transaction')
+ $data['transactions'] = $this->user_model->getTransactionsSup($startDate, $endDate, $codeMembre);
+ else if ($type == 'transaction_ilink')
+ $data['transactions'] = $this->user_model->getIlinkTransactionsSup($startDate, $endDate, $codeMembre);
+ 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->getInfosWalletAgentForSuper($codeMembre);
$data['active'] = "wallet";
$data['alert'] = "";
@@ -310,7 +331,14 @@ class Superviseur_dash extends CI_Controller
$data['geolocated_user'] = $this->user_model->getSuperNameAndCodeForSup($this->session->userdata('member_code'));
$this->load->view('header_sup', $data);
- $this->load->view('historique_transactions');
+ if ($type == 'transaction')
+ $this->load->view('historique_transactions');
+ else if ($type == 'transaction_ilink')
+ $this->load->view('historique_transactions_ilink');
+ else if ($type == 'commission_transfer')
+ $this->load->view('historique_transferts_commission');
+ else if ($type == 'balance_statement')
+ $this->load->view('config_wallet_ilink_hyp/etat_soldes');
$this->load->view('footer');
}
}
diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php
index 27054e23..c24df21b 100755
--- a/application/language/french/message_lang.php
+++ b/application/language/french/message_lang.php
@@ -317,21 +317,21 @@
$lang['no_geolocated_agent'] = 'Aucun utilisateur géolocalisé';
$lang['choose_wallet_type'] = 'Choisissez le type de wallet';
$lang['rate'] = 'Taux';
- $lang['rate_com_user_wallet_wallet_international'] = 'Taux de commission utilisateur wallet à wallet pays etranger';
- $lang['rate_com_user_wallet_wallet_national'] = 'Taux de commission utilisateur wallet à wallet national';
+ $lang['rate_com_user_wallet_wallet_international'] = 'Taux de commission du client sur opération d\'envoi de wallet à wallet pays etranger';
+ $lang['rate_com_user_wallet_wallet_national'] = 'Taux de commission du client sur opération d\'envoi de wallet à wallet national';
$lang['new_level'] = 'Nouveau palier';
- $lang['rate_com_user_wallet_cash_international'] = 'Taux de commission utilisateur wallet à cash pays etranger';
- $lang['rate_com_user_wallet_cash_national'] = 'Taux de commission utilisateur wallet à cash national';
- $lang['rate_com_user_wallet_cart'] = 'Taux de commission utilisateur wallet à carte';
- $lang['rate_com_user_cart_wallet'] = 'Taux de commission utilisateur carte à wallet';
+ $lang['rate_com_user_wallet_cash_international'] = 'Taux de commission du client sur opération d\'envoi de wallet à cash pays etranger';
+ $lang['rate_com_user_wallet_cash_national'] = 'Taux de commission du client sur opération d\'envoi de wallet à cash national';
+ $lang['rate_com_user_wallet_cart'] = 'Taux de commission du client sur opération d\'envoi de wallet à carte';
+ $lang['rate_com_user_cart_wallet'] = 'Taux de commission du client sur opération d\'envoi de carte à wallet';
$lang['rate_com_user_cart_cash'] = 'Taux de commission utilisateur carte à cash';
- $lang['rate_com_agent_depot_wallet_national'] = 'Taux de commission agent depot vers wallet iLink national';
- $lang['rate_com_agent_depot_wallet_international'] = 'Taux de commission agent depot vers wallet iLink etranger';
- $lang['rate_com_agent_depot_autre_wallet_national'] = 'Taux de commission agent depot vers autre wallet national';
- $lang['rate_com_agent_depot_autre_wallet_international'] = 'Taux de commission agent depot vers autre wallet etranger';
- $lang['rate_com_agent_depot_cash_cart'] = 'Taux de commission agent depot cash vers carte';
- $lang['rate_com_agent_cash_cash_national'] = 'Taux de commission agent envoi cash vers cash national';
- $lang['rate_com_agent_cash_cash_international'] = 'Taux de commission agent envoi cash vers cash pays etranger';
+ $lang['rate_com_agent_depot_wallet_national'] = 'Taux de commission du client sur opération d\'envoi vers wallet iLink national';
+ $lang['rate_com_agent_depot_wallet_international'] = 'Taux de commission du client sur opération d\'envoi vers wallet iLink etranger';
+ $lang['rate_com_agent_depot_autre_wallet_national'] = 'Taux de commission du client sur opération d\'envoi vers autre wallet national';
+ $lang['rate_com_agent_depot_autre_wallet_international'] = 'Taux de commission du client sur opération d\'envoi vers autre wallet etranger';
+ $lang['rate_com_agent_depot_cash_cart'] = 'Taux de commission du client sur opération d\'envoi de cash vers carte';
+ $lang['rate_com_agent_cash_cash_national'] = 'Taux de commission du client sur opération d\'envoi de cash vers cash national';
+ $lang['rate_com_agent_cash_cash_international'] = 'Taux de commission du client sur opération d\'envoi cash vers cash pays etranger';
$lang['rate_com_agent_send_cash'] = 'Taux de commission de l\'agent géolocalisé sur operation d\'envoi d\'argent ';
$lang['rate_com_sup_send_cash'] = 'Taux de commission du superviseur sur operation d\'envoi d\'argent ';
$lang['rate_com_hyp_send_cash'] = 'Taux de commission de l\'hyperviseur sur operation d\'envoi d\'argent ';
@@ -346,7 +346,7 @@
$lang['rate_com_sup_remove_cart'] = 'Taux de commission superviseur sur operation de retrait dans carte ';
$lang['rate_com_hyp_remove_cart'] = 'Taux de commission hyperviseur sur operation de retrait dans carte ';
$lang['rate_com_bq_remove_cart'] = 'Taux de commission de la banque sur operation de retrait dans carte ';
- $lang['rate_com_agent_cart_cash'] = 'Taux de commission de l\'agent géolocalisé sur retrait carte à cash ';
+ $lang['rate_com_agent_cart_cash'] = 'Taux de commission du client chez l\'agent géolocalisé sur retrait carte à cash ';
$lang['rate_com_agent_cash_cart'] = 'Taux de commission de l\'agent géolocalisé sur depot cash vers carte ';
$lang['rate_com_hyp_remove_cart_ilink'] = 'Taux de commission hyperviseur sur operation de retrait dans carte pour utilisateur iLink ';
$lang['rate_com_bq_remove_cart_ilink'] = 'Taux de commission banque sur operation de retrait dans carte pour utilisateur iLink ';
@@ -428,6 +428,19 @@ $lang['config_ilink_agent_remove_cash'] = 'Retrait d’argent';
$lang['config_ilink_agent_remove_carte_cash'] = 'Retrait de la carte vers cash';
$lang['config_ilink_agent_send_cash_carte'] = 'Envoi de cash vers une carte visa';
$lang['config_ilink_agent_send_cash_canal'] = 'Envoi de cash vers un autre canal ( Wallet ou cash)';
-$lang['config_user'] = 'Configuration utilisateur';
+$lang['config_user'] = 'Configuration client';
$lang['config_agent'] = 'Configuration agent';
+$lang['config_ilink_note'] = 'Le partage des commissions se fait entre l\'hyperviseur et le réseau payeur !';
+$lang['configure_paying_network'] = 'Configurer le réseau payeur';
+$lang['paying_network_updated'] = 'Réseau payeur mis à jour';
+$lang['commission_transfer_historic'] = 'Historique des transferts de commission';
+$lang['init_balance_princ'] = 'Solde principal initial';
+$lang['init_balance_com'] = 'Solde commission initial';
+$lang['final_balance_princ'] = 'Solde principal final';
+$lang['final_balance_com'] = 'Solde commission final';
+$lang['export_commission_transfer_history'] = 'Exporter l\'historique des transferts de commission affichés';
+$lang['export_transaction_history'] = 'Exporter l\'historique des transactions affichées';
+$lang['export_balance_statement'] = 'Exporter l\'état actuel des comptes';
+$lang['balance_statement'] = 'État des comptes';
+$lang['created_date'] ='Date de creation';
?>
diff --git a/application/models/User_model.php b/application/models/User_model.php
index cad2bfdd..7277783f 100755
--- a/application/models/User_model.php
+++ b/application/models/User_model.php
@@ -2152,6 +2152,17 @@ class User_model extends CI_Model
}
}
+ public function getAgentiLinkTransactions($id_wallet){
+ $query = $this->db->query("SELECT *
+ FROM infos_ilink_transaction
+ WHERE `id_wallet_ag`= '".$id_wallet."'");
+ if($query->num_rows()>0){
+ return $query;
+ }else{
+ return false;
+ }
+ }
+
public function getNetworkHyper($id_network){
$sql = "SELECT * FROM `hyper_infos` WHERE network_id = ?";
$query = $this->db->query($sql , array($id_network));
@@ -2474,21 +2485,21 @@ class User_model extends CI_Model
}
}
- public function setSharingRate($network_id,$config_id,$rate){
+ public function setSharingRate($network_id,$config_id,$rate, $url){
$sql = "SELECT * FROM `paying_networks` WHERE `id_network` = ? AND id_configWallet = ? ;";
$query = $this->db->query($sql , array($network_id,$config_id));
if($query->num_rows()>0){
- $sql = "UPDATE `paying_networks` SET `taux_partage` = ? WHERE `id_network` = ? AND id_configWallet = ? ;";
- $this->db->query($sql , array($rate,$network_id,$config_id));
+ $sql = "UPDATE `paying_networks` SET `taux_partage` = ? ,`url` = ? WHERE `id_network` = ? AND id_configWallet = ? ;";
+ $this->db->query($sql , array($rate, $url, $network_id,$config_id));
}else{
- $sql = "INSERT INTO `paying_networks` (`id_network`, `taux_partage`, `id_configWallet`) VALUES ( ?, ? ,?); ;";
- $this->db->query($sql , array($network_id,$rate,$config_id));
+ $sql = "INSERT INTO `paying_networks` (`id_network`, `taux_partage`, `url`, `id_configWallet`) VALUES ( ?, ?, ? ,?); ;";
+ $this->db->query($sql , array($network_id,$rate,$url,$config_id));
}
return true;
}
public function getSharingRate($id_network ,$idConfig){
- $sql = "SELECT taux_partage FROM `paying_networks` WHERE `id_network` = ? AND id_configWallet = ? ;";
+ $sql = "SELECT taux_partage , url FROM `paying_networks` WHERE `id_network` = ? AND id_configWallet = ? ;";
$query = $this->db->query($sql , array($id_network,$idConfig));
if($query->num_rows()>0){
return $query;
@@ -2571,4 +2582,39 @@ class User_model extends CI_Model
return false;
}
}
+
+ public function getCommissionTransfers($debut , $fin , $codeMembre){
+ $chain = $debut ? " AND date BETWEEN '".$debut."' AND '".$fin."'" : "";
+ $query = $this->db->query("SELECT *
+ FROM infos_transferts_commission
+ WHERE `codeParrain`='".$codeMembre."'".$chain);
+ if($query->num_rows()>0){
+ return $query;
+ }else{
+ return false;
+ }
+ }
+
+ public function getIlinkTransactionsSup($debut , $fin , $codeMembre){
+ $chain = $debut ? " AND date BETWEEN '".$debut."' AND '".$fin."'" : "";
+ $query = $this->db->query("SELECT *
+ FROM infos_ilink_transaction
+ WHERE `code_parrain`='".$codeMembre."'".$chain);
+ if($query->num_rows()>0){
+ return $query;
+ }else{
+ return false;
+ }
+ }
+
+ public function getInfosWalletAgentForSuper($codeMembre){
+ $query = $this->db->query("SELECT *
+ FROM wallet_agent
+ WHERE `codeParrain`='".$codeMembre."'");
+ if($query->num_rows()>0){
+ return $query;
+ }else{
+ return false;
+ }
+ }
}
diff --git a/application/views/config_wallet_ilink_hyp/etat_soldes.php b/application/views/config_wallet_ilink_hyp/etat_soldes.php
new file mode 100755
index 00000000..8117ac47
--- /dev/null
+++ b/application/views/config_wallet_ilink_hyp/etat_soldes.php
@@ -0,0 +1,212 @@
+
+
+
+
+
+
+setTimezone($timezone);
+ return $carbon->toDateTimeString();
+ }
+ return $date;
+ }
+?>
+
+
+
+
+
+
+
+
+ num_rows();
+ $num = 0;
+ if ($numrows > 0) {
+ $fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL );
+ ?>
+
+
+
+
+ ID |
+ =$this->lang->line('Solde Principal')?> |
+ =$this->lang->line('Solde Commission')?> |
+ =$this->lang->line('Telephone')?> |
+ =$this->lang->line('code membre')?> |
+ Agent |
+
+
+
+
+ result() as $row) {
+ $num++;
+ echo "
+ $num |
+ ".Money::of(round($row->balance_princ,2), $row->currency_code,$context)->formatTo('fr_FR')." |
+ ".Money::of(round($row->balance_com,2), $row->currency_code,$context)->formatTo('fr_FR')." |
+ ".$row->transactionNumber." |
+ ".$row->codeMembre." |
+ ".$row->lastname." | ";
+ ?>
+
+
+
+
+
+ lang->line('Aucune transaction');
+ }
+ }else {
+ echo $this->lang->line('Aucune transaction');
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/views/config_wallet_ilink_hyp/taxes.php b/application/views/config_wallet_ilink_hyp/taxes.php
new file mode 100755
index 00000000..4ddd380f
--- /dev/null
+++ b/application/views/config_wallet_ilink_hyp/taxes.php
@@ -0,0 +1,430 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lang->line('Nom') ; ?> |
+ Type |
+ Valeur |
+ Destination |
+
+
+
+ result() as $row) {
+ echo "
+ ".$row->nom." |
+ ".$row->type." |
+ ".$row->valeur." |
+ ".$row->destination." | ".'
+
';
+ }
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/views/config_wallet_ilink_hyp/user_wallet_cash.php b/application/views/config_wallet_ilink_hyp/user_wallet_cash.php
index f4ad75da..e9cdd3aa 100755
--- a/application/views/config_wallet_ilink_hyp/user_wallet_cash.php
+++ b/application/views/config_wallet_ilink_hyp/user_wallet_cash.php
@@ -229,8 +229,10 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
-
-
+
+
Note
+
lang->line('config_ilink_note') ?>
+
diff --git a/application/views/config_wallet_ilink_hyp/user_wallet_wallet.php b/application/views/config_wallet_ilink_hyp/user_wallet_wallet.php
index 99ae3b3d..6209ebb8 100755
--- a/application/views/config_wallet_ilink_hyp/user_wallet_wallet.php
+++ b/application/views/config_wallet_ilink_hyp/user_wallet_wallet.php
@@ -228,7 +228,10 @@ $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL);
-
+
+
Note
+
lang->line('config_ilink_note') ?>
+
diff --git a/application/views/gestion_wallet_ilink_config_paying_network.php b/application/views/gestion_wallet_ilink_config_paying_network.php
index 2dd843a0..654e6321 100755
--- a/application/views/gestion_wallet_ilink_config_paying_network.php
+++ b/application/views/gestion_wallet_ilink_config_paying_network.php
@@ -60,7 +60,8 @@
N° |
lang->line('Nom'); ?> |
Wallet |
-
lang->line('share_rate')?> |
+
lang->line('share_rate') ?> |
+
URL |
Action |
@@ -73,30 +74,65 @@
echo "
$num |
$row->name |
- ".strtoupper($row->type)." | ";
+ " . strtoupper($row->type) . " | ";
?>
rate != null ) {
+ if ($row->rate != null) {
?>
- = $row->rate . ' %'?>
+ = $row->rate . ' %' ?>
|
- lang->line('not_defined'); ?>
+ lang->line('not_defined'); ?>
|
+ = $row->url ?> |
-
|
+
@@ -116,31 +152,6 @@
-
@@ -177,25 +188,27 @@
var network_id = null;
var config_id = null;
+ var num = null;
$(document).on("click", ".openModal", function () {
network_id = $(this).data('network-id');
config_id = $(this).data('config-id');
+ num = $(this).data('num');
})
- $(document).on("click", "#enableRate", function () {
- // const network_id = $(this).data('network-id');
- if ($('#rateForm')[0].checkValidity()) {
- const rate = parseFloat($('#rate').val());
+ $(document).on("click", ".enableRate", function () {
+ if ($('#rateForm'+num)[0].checkValidity()) {
+ const rate = parseFloat($('#rate'+num).val());
+ const url = $('#url'+num).val();
$.ajax({
url: '',
type: 'POST',
dataType: 'json',
- data: {"network_id": network_id, "rate": rate , "config_id" : config_id},
+ data: {"network_id": network_id, "rate": rate, "url": url, "config_id": config_id},
success: function (data) {
if (data == '200') {
Swal.fire({
icon: 'success',
- title: "lang->line('sharing_updated')?>",
+ title: "lang->line('paying_network_updated')?>",
text: "lang->line('informations_updated')?>",
timer: 3000
}).then(() => {
@@ -212,8 +225,9 @@
}
});
} else {
- $('#rateForm')[0].reportValidity();
- };
+ $('#rateForm'+num)[0].reportValidity();
+ }
+ ;
});
diff --git a/application/views/gestion_wallet_ilink_hyp.php b/application/views/gestion_wallet_ilink_hyp.php
index cb354199..379be3cf 100755
--- a/application/views/gestion_wallet_ilink_hyp.php
+++ b/application/views/gestion_wallet_ilink_hyp.php
@@ -306,8 +306,8 @@ $context = new \Brick\Money\Context\AutoContext();
@@ -378,19 +378,19 @@ $context = new \Brick\Money\Context\AutoContext();
@@ -436,6 +436,14 @@ $context = new \Brick\Money\Context\AutoContext();
@@ -501,71 +509,6 @@ $context = new \Brick\Money\Context\AutoContext();
-
@@ -714,105 +657,12 @@ $context = new \Brick\Money\Context\AutoContext();
Pie = JSON.parse(Pie);
}
-
-
-
diff --git a/application/views/gestion_wallet_sup_ilink.php b/application/views/gestion_wallet_sup_ilink.php
new file mode 100755
index 00000000..d85f692b
--- /dev/null
+++ b/application/views/gestion_wallet_sup_ilink.php
@@ -0,0 +1,391 @@
+
+
+
+
+
+
+
+date));
+ $year = date("Y",strtotime($trans->date));
+ return $month == $months[$i-1] && $year == $years[$i-1] && $trans->type_transaction == 'retrait' ;
+ });
+ $retraits_data[] = sizeof($retraits_query_mounth);
+ }
+
+ $startDate = (new DateTime('01-'.$months[11].'-'.$years[11]))-> format('Y-m-d H:i:s');
+ $endDate = date_create_from_format ('m/Y',$months[0].'/'.$years[0])-> format('Y-m-d H:i:s');
+
+ $retraits = array_filter($transactions, function ($trans) use ($i, $endDate ,$startDate){
+ $date = strtotime($trans->date);
+// return $date >= strtotime($startDate) && $date <= strtotime($endDate) && $trans->type == 'debit' ;
+ return $trans->type_transaction == 'retrait' ;
+
+ });
+
+ /**
+ ** Dépots
+ **/
+ $date = date("Y");
+
+ $depots_data[] = '';
+ $depots_data =array();
+ for ($i = 1; $i <= 12; $i++) {
+ $depots_query_mounth= array_filter($transactions, function ($trans) use ($i, $months ,$years){
+ $month = date("m",strtotime($trans->date));
+ $year = date("Y",strtotime($trans->date));
+ return $month == $months[$i-1] && $year == $years[$i-1] && $trans->type_transaction == 'depot' ;
+ });
+ $depots_data[] = sizeof($depots_query_mounth);
+ }
+ $depots = array_filter($transactions, function ($trans) use ($i, $endDate ,$startDate){
+ $date = strtotime($trans->date);
+// return $date >= strtotime($startDate) && $date <= strtotime($endDate) && $trans->type == 'credit' ;
+ return $trans->type_transaction == 'depot' ;
+
+ });
+
+ if($transactions!=false){
+ $transac=sizeof($transactions);
+ $array_transac = array();
+ $num = 0;
+ if ($transac > 0) {
+ foreach($transactions as $row) {
+ $num++;
+ $array_transac[] = $row->type_transaction;
+ }
+ $vals_transac = array_count_values($array_transac);
+ $pieChart = array();
+ foreach(array_keys($vals_transac) as $paramName) {
+ $color = dechex(rand(0x000000, 0xFFFFFF));
+ $trash = array("value" => $vals_transac[$paramName],
+ "color" => "#".$color,
+ "highlight" => "#".$color,
+ "label" => $paramName);
+
+ $pieChart[]= $trash;
+ }
+ }
+ }else{
+ $pieChart = array();
+ }
+$fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL );
+?>
+
+
+
+
+
+
+
+
+
+
+
+
lang->line('Solde Principal') ?>
+
+
+
+
+
+
+
+
+
+
+
+
lang->line('Solde Commission') ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ".$this->lang->line('Nom')."
+ ".$this->lang->line('Solde Principal')." |
+ ".$this->lang->line('Solde Commission')." |
+ ".$this->lang->line('DEPOT'). 's'." |
+ ".$this->lang->line('RETRAIT').'s'." | ";
+ ?>
+
+
+
+ result() as $row) {
+ $wallet = null;
+ foreach ($agentWalletInfos->result() as $value) {
+ if ($value->agent_id == $row->agent_id) {
+ $wallet = $value;
+ break;
+ }
+ }
+ $com = 0;
+ $princ = 0;
+ if($wallet) {
+ $com = $wallet->balance_com;
+ $princ = $wallet->balance_princ;
+ }
+ echo "
+ ".$row->lastname." |
+ ".Money::of(round($princ,2), $this->session->userdata('currency_code'),$context)->formatTo('fr_FR')." |
+ ".Money::of(round($com,2), $this->session->userdata('currency_code'),$context)->formatTo('fr_FR')." | ";
+ $nb_depots = 0;
+ $nb_retraits = 0;
+ foreach($depots as $depot){
+ if($depot->agent_id == $row->agent_id) {
+ $nb_depots ++;
+ }
+ }
+ foreach($retraits as $retrait){
+ if($retrait->agent_id == $row->agent_id) {
+ $nb_retraits ++;
+ }
+ }
+ echo "".$nb_depots." |
+ ".$nb_retraits." |
+
";
+ }
+
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/views/historique_transactions_ilink.php b/application/views/historique_transactions_ilink.php
index abcf2f24..bd47d3a4 100755
--- a/application/views/historique_transactions_ilink.php
+++ b/application/views/historique_transactions_ilink.php
@@ -2,8 +2,8 @@
+
-
- lang->line('Gestion des wallets') ; echo ' '.$network.' - '.$country; ?>
+ lang->line('Gestion des wallets') ; echo ' '.$network.' - '.$country
+ .' :: '.$this->lang->line('Historique des transactions'); ?>
@@ -107,7 +108,7 @@ use Brick\Money\Money;
+
+
+
+
+
+
@@ -254,13 +261,33 @@ use Brick\Money\Money;
const lang = $('#picker').data('lang');
const format = lang === 'french' ? 'fr' : 'en';
moment.updateLocale(moment.locale(format), { invalidDate: "" }); // Blank text when is invalid date
- $('#transactions').DataTable({
+ var table = $('#transactions').DataTable({
"aaSorting": [[ 17, "desc" ]],
"columnDefs": [ {
targets: 17,
render: $.fn.dataTable.render.moment( 'YYYY-MM-DD HH:mm:ss' , 'D MMMM YYYY HH:mm:ss', format)
- }]
+ }],
+ dom: 'Bfrtip',
+ "buttons": [
+ {
+ extend: 'excelHtml5',
+ title: 'Histrotique des transactions'
+ },
+ {
+ extend: 'csvHtml5',
+ title: 'Histrotique des transactions'
+ },
+ {
+ extend: 'pdfHtml5',
+ orientation: 'landscape',
+ pageSize: 'LEGAL',
+ title: 'Histrotique des transactions'
+ }
+ ]
});
+
+ table.buttons().container()
+ .appendTo( '#example_wrapper .col-sm-6:eq(0)' );
});
diff --git a/application/views/historique_transferts_commission.php b/application/views/historique_transferts_commission.php
new file mode 100755
index 00000000..e5c01f24
--- /dev/null
+++ b/application/views/historique_transferts_commission.php
@@ -0,0 +1,273 @@
+
+
+
+
+
+
+setTimezone($timezone);
+ return $carbon->toDateTimeString();
+ }
+ return $date;
+ }
+?>
+
+
+
+
+
+
+
+
+ lang->line('Période') ?>
+
+
+
+
+ Format : session->userdata('site_lang') === 'french' ? 'Jour - Mois - Année ' : 'Year - Month - Day'?>
+
+
+
+
+
+
+
+
+
+
+ num_rows();
+ $num = 0;
+ if ($numrows > 0) {
+ $fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL );
+ ?>
+
+
+
+
+ ID |
+ = $this->lang->line('init_balance_princ').' ' ?> |
+ = $this->lang->line('init_balance_com') ?> |
+ = $this->lang->line('final_balance_princ') ?> |
+ = $this->lang->line('final_balance_com') ?> |
+ = $this->session->userdata('category') == 'super' ? 'Agent': $this->lang->line('Superviseur') ?> |
+ Date |
+
+
+
+
+ result() as $row) {
+ $num++;
+ echo "
+ $num |
+ ".Money::of(round($row->balance_princ_init,2), $row->currency_code,$context)->formatTo('fr_FR')." |
+ ".Money::of(round($row->balance_com_init,2), $row->currency_code,$context)->formatTo('fr_FR')." |
+ ".Money::of(round($row->balance_princ_final,2), $row->currency_code,$context)->formatTo('fr_FR')." |
+ ".Money::of(round($row->balance_com_final,2), $row->currency_code,$context)->formatTo('fr_FR')." |
+ ".$row->agent." |
+ ".toLocateDate($row->date,$this->session->userdata('timezone'))." | ";
+ ?>
+
+
+
+
+
+ lang->line('Aucune transaction');
+ }
+ }else {
+ echo $this->lang->line('Aucune transaction');
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+