From c37a11d2e9d4d9cb07c228ab8983a852b7ddb581 Mon Sep 17 00:00:00 2001 From: Djery-Tom Date: Mon, 1 Jun 2020 12:21:06 +0100 Subject: [PATCH] + Adding iLink World Wallet --- application/controllers/Gestion.php | 188 +- application/controllers/Hyperviseur_dash.php | 147 +- application/language/english/message_lang.php | 351 +-- application/language/french/message_lang.php | 8 + application/models/User_model.php | 81 +- application/views/gestion_monnaie.php | 353 +++ application/views/gestion_monnaies.php | 143 ++ application/views/gestion_wallet_ilink.php | 827 +++++++ .../views/gestion_wallet_ilink_hyp.php | 2047 +++++++++++++++++ application/views/gestion_wallets.php | 30 +- application/views/header_gestion.php | 15 +- application/views/historique_transactions.php | 2 +- 12 files changed, 3927 insertions(+), 265 deletions(-) mode change 100644 => 100755 application/controllers/Gestion.php mode change 100644 => 100755 application/controllers/Hyperviseur_dash.php mode change 100644 => 100755 application/models/User_model.php create mode 100755 application/views/gestion_monnaie.php create mode 100755 application/views/gestion_monnaies.php create mode 100755 application/views/gestion_wallet_ilink.php create mode 100755 application/views/gestion_wallet_ilink_hyp.php diff --git a/application/controllers/Gestion.php b/application/controllers/Gestion.php old mode 100644 new mode 100755 index 3a1da68e..6381a220 --- a/application/controllers/Gestion.php +++ b/application/controllers/Gestion.php @@ -1543,15 +1543,56 @@ class Gestion extends CI_Controller $taux = $this->user_model->getTaux($network_id); if ($taux != null) { $taux = $taux->first_row(); - $data['taux_client_r'] = $taux->taux_com_client_retrait; - $data['taux_client_d'] = $taux->taux_com_client_depot; - $data['taux_ag_r'] = $taux->taux_com_ag_retrait; - $data['taux_ag_d'] = $taux->taux_com_ag_depot; - $data['taux_sup_r'] = $taux->taux_com_sup_retrait; - $data['taux_sup_d'] = $taux->taux_com_sup_depot; - $data['taux_bq_d'] = $taux->part_banque_depot; - $data['taux_bq_r'] = $taux->part_banque_retrait; - $data['frais_d'] = $taux->frais_min_banque_depot; + $data['idConfig'] = $taux->id; + if ($taux->type == 'visa'){ + $data['taux_client_r'] = $taux->taux_com_client_retrait; + $data['taux_client_d'] = $taux->taux_com_client_depot; + $data['taux_ag_r'] = $taux->taux_com_ag_retrait; + $data['taux_ag_d'] = $taux->taux_com_ag_depot; + $data['taux_sup_r'] = $taux->taux_com_sup_retrait; + $data['taux_sup_d'] = $taux->taux_com_sup_depot; + $data['taux_bq_d'] = $taux->part_banque_depot; + $data['taux_bq_r'] = $taux->part_banque_retrait; + $data['frais_d'] = $taux->frais_min_banque_depot; + } elseif ($taux->type == 'ilink'){ + $data['plr_user_wallet_wallet'] = $this->user_model->getPalierConfigWallet("user_wallet_wallet" , $data['idConfig']); + $data['plr_user_wallet_cash'] = $this->user_model->getPalierConfigWallet("user_wallet_cash" , $data['idConfig']); + $data['plr_agent_depot_wallet'] = $this->user_model->getPalierConfigWallet("agent_depot_wallet" , $data['idConfig']); + $data['plr_agent_cash_cash'] = $this->user_model->getPalierConfigWallet("agent_cash_cash" , $data['idConfig']); + $data['u_w_w_min'] = $taux->taux_com_user_wallet_wallet_min; + $data['u_w_w_max'] = $taux->taux_com_user_wallet_wallet_max; + $data['taux_u_w_w'] = $taux->taux_com_user_wallet_wallet; + $data['u_w_c_min'] = $taux->taux_com_user_wallet_cash_min; + $data['u_w_c_max'] = $taux->taux_com_user_wallet_cash_max; + $data['taux_u_w_c'] = $taux->taux_com_user_wallet_cash; + $data['taux_u_w_cart'] = $taux->taux_com_user_wallet_carte; + $data['taux_u_c_w'] = $taux->taux_com_user_carte_wallet; + $data['taux_u_c_c'] = $taux->taux_com_user_carte_cash; + $data['ag_d_w_min'] = $taux->taux_com_wallet_ag_envoi_cash_wallet_min; + $data['ag_d_w_max'] = $taux->taux_com_wallet_ag_envoi_cash_wallet_max; + $data['taux_ag_d_w'] = $taux->taux_com_wallet_ag_envoi_cash_wallet; + $data['taux_ag_d_c_c'] = $taux->taux_com_wallet_ag_envoi_cash_carte; + $data['ag_c_c_min'] = $taux->taux_com_wallet_ag_envoi_cash_cash_min; + $data['ag_c_c_max'] = $taux->taux_com_wallet_ag_envoi_cash_cash_max; + $data['taux_ag_c_c'] = $taux->taux_com_wallet_ag_envoi_cash_cash; + $data['taux_ag_cart_c'] = $taux->taux_com_wallet_ag_carte_cash; + $data['taux_ag_cash_c'] = $taux->taux_com_wallet_ag_depot_carte; + $data['taux_ag_s_c'] = $taux->taux_com_ag_envoi_cash; + $data['taux_sup_s_c'] = $taux->taux_com_sup_envoi_cash; + $data['taux_hyp_s_c'] = $taux->taux_com_hyp_envoi_cash; + $data['taux_ag_r_c'] = $taux->taux_com_ag_retrait_cash; + $data['taux_sup_r_c'] = $taux->taux_com_sup_retrait_cash; + $data['taux_hyp_r_c'] = $taux->taux_com_hyp_retrait_cash; + $data['taux_ag_d_c'] = $taux->taux_com_ag_depot_cash_carte; + $data['taux_sup_d_c'] = $taux->taux_com_sup_depot_cash_carte; + $data['taux_hyp_d_c'] = $taux->taux_com_hyp_depot_cash_carte; + $data['taux_bq_d_c'] = $taux->taux_com_banque_depot_cash_carte; + $data['taux_ag_r_cart'] = $taux->taux_com_ag_retrait_carte_cash; + $data['taux_sup_r_cart'] = $taux->taux_com_sup_retrait_carte_cash; + $data['taux_hyp_r_cart'] = $taux->taux_com_hyp_retrait_carte_cash; + $data['taux_bq_r_cart'] = $taux->taux_com_banque_retrait_carte_cash; + } + $data['transactions'] = $this->user_model->getTransactions(null,null,$network_id); $totalCommissionBanque = 0; if($data['transactions']){ @@ -1560,20 +1601,7 @@ class Gestion extends CI_Controller } } $data['totalCommissionBanque'] = $totalCommissionBanque ; - } else { - $data["taux_client_r"] = "N/A"; - $data["taux_client_d"] = "N/A"; - $data["taux_ag_r"] = "N/A"; - $data["taux_ag_d"] = "N/A"; - $data["taux_sup_r"] = "N/A"; - $data["taux_sup_d"] = "N/A"; - $data['taux_bq_d'] = "N/A"; - $data['taux_bq_r'] = "N/A"; - $data['frais_d'] = "N/A"; - $data['totalCommissionBanque'] = "N/A"; - $data["transactions"] = false; - } $hyper = $this->user_model->getNetworkHyper($network_id)->first_row(); $data['walletHyper'] = $this->user_model->getWallet($hyper->agent_id); @@ -1590,8 +1618,12 @@ class Gestion extends CI_Controller $data['networks'] = $this->user_model->getActiveNetwork(); $this->load->view('header_gestion', $data); - $this->load->view('gestion_wallet'); + if ($taux->type == 'visa') + $this->load->view('gestion_wallet'); + elseif ($taux->type == 'ilink') + $this->load->view('gestion_wallet_ilink'); $this->load->view('footer'); + } } @@ -1614,26 +1646,63 @@ class Gestion extends CI_Controller if (isset($_POST)) { $network_id = $_POST['network_id']; + $type = $_POST['type']; if($method == 'create') { - $res = $this->user_model->addConfigWallet($network_id , 0 , 0, 0 ,0 , 0, 0, 0 , 0 , 0); + $res = $this->user_model->addConfigWallet($network_id , $type); // if($res) // $this->generateAllWallets($network_id); } else if($method = 'update'){ - $taux_client_r = $_POST['taux_client_r']; - $taux_client_d = $_POST['taux_client_d']; - $taux_ag_d = $_POST['taux_ag_d']; - $taux_ag_r = $_POST['taux_ag_r']; - $taux_sup_d = $_POST['taux_sup_d']; - $taux_sup_r = $_POST['taux_sup_r']; - $taux_bq_d = $_POST['taux_bq_d']; - $taux_bq_r = $_POST['taux_bq_r']; - $frais_d = $_POST['frais_d']; + if($type == 'uba'){ + $taux_client_r = $_POST['taux_client_r']; + $taux_client_d = $_POST['taux_client_d']; + $taux_ag_d = $_POST['taux_ag_d']; + $taux_ag_r = $_POST['taux_ag_r']; + $taux_sup_d = $_POST['taux_sup_d']; + $taux_sup_r = $_POST['taux_sup_r']; + $taux_bq_d = $_POST['taux_bq_d']; + $taux_bq_r = $_POST['taux_bq_r']; + $frais_d = $_POST['frais_d']; - $res = $this->user_model->updateConfigWallet($network_id , $taux_client_r , $taux_client_d , $taux_ag_r ,$taux_ag_d , $taux_sup_r , $taux_sup_d, $taux_bq_r , $taux_bq_d , $frais_d); + $res = $this->user_model->updateConfigWallet($network_id , $taux_client_r , $taux_client_d , $taux_ag_r ,$taux_ag_d , $taux_sup_r , $taux_sup_d, $taux_bq_r , $taux_bq_d , $frais_d); + + }else if ($type == 'ilink'){ + $idConfig = $_POST['id_config']; + $plr_user_wallet_wallet = isset($_POST['plr_user_wallet_wallet']) ? $_POST['plr_user_wallet_wallet'] : null ; + $plr_user_wallet_cash = isset($_POST['plr_user_wallet_cash']) ? $_POST['plr_user_wallet_cash'] : null ; + $plr_agent_depot_wallet = isset($_POST['plr_agent_depot_wallet']) ? $_POST['plr_agent_depot_wallet'] : null; + $plr_agent_cash_cash = isset($_POST['plr_agent_cash_cash']) ? $_POST['plr_agent_cash_cash'] : null ; + + $fields = $_POST['fields']; + $rows = []; + //Convert fields to simple array + foreach ($fields as $field) { + $array = json_decode(json_encode($field), true); + $i=0; + $name = ""; + foreach ($array as $key => $value){ + if($i == 0) + $name = $value; + else + $rows[$name] = $value; + $i++; + } + } + + $this->insertPalier($plr_user_wallet_wallet,"user_wallet_wallet", $idConfig); + $this->insertPalier($plr_user_wallet_cash,"user_wallet_cash", $idConfig); + $this->insertPalier($plr_agent_depot_wallet,"agent_depot_wallet", $idConfig); + $this->insertPalier($plr_agent_cash_cash,"agent_cash_cash", $idConfig); + + $this->user_model->updateConfigWalletIlink($rows['u_w_w_min'],$rows['u_w_w_max'],$rows['taux_u_w_w'],$rows['u_w_c_min'],$rows['u_w_c_max'],$rows['taux_u_w_c'],$rows['taux_u_w_cart'],$rows['taux_u_c_w'],$rows['taux_u_c_c'],$rows['ag_d_w_min'],$rows['ag_d_w_max'], + $rows['taux_ag_d_w'],$rows['taux_ag_d_c_c'],$rows['ag_c_c_min'],$rows['ag_c_c_max'],$rows['taux_ag_c_c'],$rows['taux_ag_cart_c'],$rows['taux_ag_cash_c'],$rows['taux_ag_s_c'],$rows['taux_sup_s_c'],$rows['taux_hyp_s_c'],$rows['taux_ag_r_c'],$rows['taux_sup_r_c'], + $rows['taux_hyp_r_c'],$rows['taux_ag_d_c'],$rows['taux_sup_d_c'],$rows['taux_hyp_d_c'],$rows['taux_bq_d_c'], $rows['taux_ag_r_cart'],$rows['taux_sup_r_cart'],$rows['taux_hyp_r_cart'],$rows['taux_bq_r_cart'],$idConfig); + + $res = true; + } } if ($res != false) { @@ -1646,6 +1715,25 @@ class Gestion extends CI_Controller } + private function insertPalier($palier , $name , $idConfig){ + + $exist = $this->user_model->getPalierConfigWallet($name , $idConfig); + if($exist){ + $this->user_model->deletePalierConfigWallet($name , $idConfig); + } + + if($palier) { + foreach ($palier as $p) { + $array = json_decode(json_encode($p), true); + $row = []; + foreach ($array as $key => $value){ + $row[] = $value; + } + $this->user_model->addPalierConfigWallet($name, $idConfig, $row[0], $row[1], $row[2]); + } + } + } + public function delete_config_wallet() { if($this->isLogged()){ @@ -1705,6 +1793,7 @@ class Gestion extends CI_Controller private function historique($network_id ,$startDate ,$endDate, $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 ; @@ -1731,7 +1820,38 @@ class Gestion extends CI_Controller $this->load->view('footer'); } + public function currency() + { + if($this->isLogged()){ + $data['active'] = "currency"; + $data['alert'] = ""; + $data['game_pays'] = $this->user_model->getGameCountry(); + + if ($this->input->get('id')) { + + $network_id = $this->input->get('id'); + $networkDetails = $this->user_model->getNetworkDetails($network_id); + $data['network'] = $networkDetails->first_row()->network; + $data['country'] = $networkDetails->first_row()->country; + $data['currency_code'] = $networkDetails->first_row()->currency_code; + $data['currency_name_fr'] = $networkDetails->first_row()->currency_name_fr; + $data['currency_name_en'] = $networkDetails->first_row()->currency_name_en; + + $data['currencies'] = $this->user_model->getCurrencies($data['currency_code']); + $this->load->view('header_gestion', $data); + $this->load->view('gestion_monnaie'); + $this->load->view('footer'); + }else{ + + $data['networks'] = $this->user_model->getAllActivatedWalletNetworks(); + + $this->load->view('header_gestion', $data); + $this->load->view('gestion_monnaies'); + $this->load->view('footer'); + } + } + } } diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php old mode 100644 new mode 100755 index b12bfd26..8cb337b0 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -306,27 +306,69 @@ class Hyperviseur_dash extends CI_Controller $this->load->view('login', $data); } else { $id_network = $this->session->userdata('network_id'); - if($this->input->get('history')){ - $this->historique($id_network,$this->input->get('d'),$this->input->get('f'),$this->input->get('history')); - }else { + $data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id')); + if ($data['hasWallet']) { + + if($this->input->get('history')){ + $this->historique($id_network,$this->input->get('d'),$this->input->get('f'),$this->input->get('history')); + }else { + + $data["commission"] = ""; + $data["principal"] = ""; + $data["transactions"] = ""; + $agent_id = $this->session->userdata('agent_id'); - $data["commission"] = ""; - $data["principal"] = ""; - $data["transactions"] = ""; - $agent_id = $this->session->userdata('agent_id'); - $data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id')); - if ($data['hasWallet']) { $taux = $data['hasWallet']->first_row(); - $data['taux_client_r'] = $taux->taux_com_client_retrait; - $data['taux_client_d'] = $taux->taux_com_client_depot; - $data['taux_ag_r'] = $taux->taux_com_ag_retrait; - $data['taux_ag_d'] = $taux->taux_com_ag_depot; - $data['taux_sup_r'] = $taux->taux_com_sup_retrait; - $data['taux_sup_d'] = $taux->taux_com_sup_depot; - $data['taux_bq_d'] = $taux->part_banque_depot; - $data['taux_bq_r'] = $taux->part_banque_retrait; - $data['frais_d'] = $taux->frais_min_banque_depot; + $data['idConfig'] = $taux->id; + if ($data['hasWallet']->first_row()->type == 'uba'){ + $data['taux_client_r'] = $taux->taux_com_client_retrait; + $data['taux_client_d'] = $taux->taux_com_client_depot; + $data['taux_ag_r'] = $taux->taux_com_ag_retrait; + $data['taux_ag_d'] = $taux->taux_com_ag_depot; + $data['taux_sup_r'] = $taux->taux_com_sup_retrait; + $data['taux_sup_d'] = $taux->taux_com_sup_depot; + $data['taux_bq_d'] = $taux->part_banque_depot; + $data['taux_bq_r'] = $taux->part_banque_retrait; + $data['frais_d'] = $taux->frais_min_banque_depot; + } elseif ($data['hasWallet']->first_row()->type == 'ilink'){ + $data['plr_user_wallet_wallet'] = $this->user_model->getPalierConfigWallet("user_wallet_wallet" , $data['idConfig']); + $data['plr_user_wallet_cash'] = $this->user_model->getPalierConfigWallet("user_wallet_cash" , $data['idConfig']); + $data['plr_agent_depot_wallet'] = $this->user_model->getPalierConfigWallet("agent_depot_wallet" , $data['idConfig']); + $data['plr_agent_cash_cash'] = $this->user_model->getPalierConfigWallet("agent_cash_cash" , $data['idConfig']); + $data['u_w_w_min'] = $taux->taux_com_user_wallet_wallet_min; + $data['u_w_w_max'] = $taux->taux_com_user_wallet_wallet_max; + $data['taux_u_w_w'] = $taux->taux_com_user_wallet_wallet; + $data['u_w_c_min'] = $taux->taux_com_user_wallet_cash_min; + $data['u_w_c_max'] = $taux->taux_com_user_wallet_cash_max; + $data['taux_u_w_c'] = $taux->taux_com_user_wallet_cash; + $data['taux_u_w_cart'] = $taux->taux_com_user_wallet_carte; + $data['taux_u_c_w'] = $taux->taux_com_user_carte_wallet; + $data['taux_u_c_c'] = $taux->taux_com_user_carte_cash; + $data['ag_d_w_min'] = $taux->taux_com_wallet_ag_envoi_cash_wallet_min; + $data['ag_d_w_max'] = $taux->taux_com_wallet_ag_envoi_cash_wallet_max; + $data['taux_ag_d_w'] = $taux->taux_com_wallet_ag_envoi_cash_wallet; + $data['taux_ag_d_c_c'] = $taux->taux_com_wallet_ag_envoi_cash_carte; + $data['ag_c_c_min'] = $taux->taux_com_wallet_ag_envoi_cash_cash_min; + $data['ag_c_c_max'] = $taux->taux_com_wallet_ag_envoi_cash_cash_max; + $data['taux_ag_c_c'] = $taux->taux_com_wallet_ag_envoi_cash_cash; + $data['taux_ag_cart_c'] = $taux->taux_com_wallet_ag_carte_cash; + $data['taux_ag_cash_c'] = $taux->taux_com_wallet_ag_depot_carte; + $data['taux_ag_s_c'] = $taux->taux_com_ag_envoi_cash; + $data['taux_sup_s_c'] = $taux->taux_com_sup_envoi_cash; + $data['taux_hyp_s_c'] = $taux->taux_com_hyp_envoi_cash; + $data['taux_ag_r_c'] = $taux->taux_com_ag_retrait_cash; + $data['taux_sup_r_c'] = $taux->taux_com_sup_retrait_cash; + $data['taux_hyp_r_c'] = $taux->taux_com_hyp_retrait_cash; + $data['taux_ag_d_c'] = $taux->taux_com_ag_depot_cash_carte; + $data['taux_sup_d_c'] = $taux->taux_com_sup_depot_cash_carte; + $data['taux_hyp_d_c'] = $taux->taux_com_hyp_depot_cash_carte; + $data['taux_bq_d_c'] = $taux->taux_com_banque_depot_cash_carte; + $data['taux_ag_r_cart'] = $taux->taux_com_ag_retrait_carte_cash; + $data['taux_sup_r_cart'] = $taux->taux_com_sup_retrait_carte_cash; + $data['taux_hyp_r_cart'] = $taux->taux_com_hyp_retrait_carte_cash; + $data['taux_bq_r_cart'] = $taux->taux_com_banque_retrait_carte_cash; + } //Create wallet if it not exist $res = $this->user_model->getWallet($agent_id); @@ -360,48 +402,35 @@ class Hyperviseur_dash extends CI_Controller } } $data["totalCommissionBanque"] = $totalCommissionBanque; - } else { - $data["taux_client_r"] = "N/A"; - $data["taux_client_d"] = "N/A"; - $data["taux_ag_r"] = "N/A"; - $data["taux_ag_d"] = "N/A"; - $data["taux_sup_r"] = "N/A"; - $data["taux_sup_d"] = "N/A"; - $data['taux_bq_d'] = "N/A"; - $data['taux_bq_r'] = "N/A"; - $data['frais_d'] = "N/A"; - $data["commission"] = "N/A"; - $data["principal"] = "N/A"; - $data["totalCommissionBanque"] = "N/A"; - $data["transactions"] = false; - $data['wallet_id'] = null; - } - $res = $this->user_model->getWalletPassword($id_network); - $data['walletPassword'] = $res ? $res->first_row() : null; - $data['alert'] = ""; - $data['active'] = "wallet"; - $data['token'] = $this->session->userdata('token'); - $data['email'] = $this->session->userdata('email'); - $data['firstname'] = $this->session->userdata('firstname'); - $data['lastname'] = $this->session->userdata('lastname'); - $data['code_parrain'] = $this->session->userdata('code_parrain'); - $data['phone'] = $this->session->userdata('phone'); - $data['adresse'] = $this->session->userdata('adresse'); - $data['category'] = $this->session->userdata('category'); - $data['network'] = $this->session->userdata('network'); - $data['network_id'] = $id_network; - $data['country'] = $this->session->userdata('current_pays'); - $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); - $data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code')); - $data['pays'] = $this->user_model->getAllGameCountries(); - $data['networks'] = $this->user_model->getActiveNetwork(); - $data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($id_network); - $this->load->view('header_hyp', $data); - $this->load->view('gestion_wallet_hyp'); - $this->load->view('footer'); + $res = $this->user_model->getWalletPassword($id_network); + $data['walletPassword'] = $res ? $res->first_row() : null; + $data['alert'] = ""; + $data['active'] = "wallet"; + $data['token'] = $this->session->userdata('token'); + $data['email'] = $this->session->userdata('email'); + $data['firstname'] = $this->session->userdata('firstname'); + $data['lastname'] = $this->session->userdata('lastname'); + $data['code_parrain'] = $this->session->userdata('code_parrain'); + $data['phone'] = $this->session->userdata('phone'); + $data['adresse'] = $this->session->userdata('adresse'); + $data['category'] = $this->session->userdata('category'); + $data['network'] = $this->session->userdata('network'); + $data['network_id'] = $id_network; + $data['country'] = $this->session->userdata('current_pays'); + $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); + $data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code')); + $data['pays'] = $this->user_model->getAllGameCountries(); + $data['networks'] = $this->user_model->getActiveNetwork(); + $data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($id_network); + $this->load->view('header_hyp', $data); + if ($data['hasWallet']->first_row()->type == 'uba') + $this->load->view('gestion_wallet_hyp'); + elseif ($data['hasWallet']->first_row()->type == 'ilink') + $this->load->view('gestion_wallet_ilink_hyp'); + $this->load->view('footer'); + } } - } } @@ -420,7 +449,7 @@ class Hyperviseur_dash extends CI_Controller private function historique($network_id ,$startDate ,$endDate, $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 ; diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php index 7addd3a0..b26c0321 100755 --- a/application/language/english/message_lang.php +++ b/application/language/english/message_lang.php @@ -1,154 +1,154 @@ diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index dc364a58..0bf4cf18 100755 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -347,4 +347,12 @@ $lang['rate_com_agent_cart_cash'] = 'Taux de commission de 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 '; + // Gestion de la monnaie +$lang['currency'] = 'Monnaie'; +$lang['currency_code'] = 'Code de la monnaie'; +$lang['currency_management'] = 'Gestion de la monnaie'; +$lang['show_currency_rate_conversion'] = 'Afficher les taux de conversions'; +$lang['conversion_rate'] = 'Taux de conversion'; +$lang['new_rate'] = 'Nouveau taux'; +$lang['save'] = 'Enregistrer'; ?> diff --git a/application/models/User_model.php b/application/models/User_model.php old mode 100644 new mode 100755 index 74122389..24473d4e --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -1863,7 +1863,7 @@ class User_model extends CI_Model } public function getNetworkDetails($id_network){ - $query = $this->db->query("SELECT n.name AS network , c.name AS country FROM networks n INNER JOIN countries c ON n.country_id = c.id WHERE n.id = ".$id_network); + $query = $this->db->query("SELECT n.name AS network , c.name AS country , c.currency_name_fr , c.currency_code , c.currency_name_en FROM networks n INNER JOIN countries_currencies c ON n.country_id = c.id WHERE n.id = ".$id_network); if($query->num_rows()>0){ return $query; }else{ @@ -2078,9 +2078,9 @@ class User_model extends CI_Model } } - public function addConfigWallet($network_id , $taux_client_r , $taux_client_d, $taux_ag_r , $taux_ag_d , $taux_sup_r , $taux_sup_d , $taux_bq_r , $taux_bq_d , $frais_d ){ - $sql='INSERT INTO `configWallet` (`taux_com_client_retrait`, `taux_com_client_depot`, `taux_com_ag_retrait`, `taux_com_ag_depot`, `taux_com_sup_depot`, `taux_com_sup_retrait`, `part_banque_retrait`, `part_banque_depot`, `frais_min_banque_depot`, `id_network`) VALUES ( ?, ?, ?, ?, ?, ?, ? , ? , ? ,?);' ; - $query = $this->db->query($sql , array($taux_client_r,$taux_client_d,$taux_ag_r,$taux_ag_d,$taux_sup_r,$taux_sup_d, $taux_bq_r , $taux_bq_d , $frais_d , $network_id)); + public function addConfigWallet($network_id , $type){ + $sql='INSERT INTO `iLink_test2`.`configWallet` (`id_network`, `type`) VALUES (?,?);' ; + $query = $this->db->query($sql , array($network_id, $type)); return $query; } @@ -2159,8 +2159,8 @@ class User_model extends CI_Model // Mot de passe du wallet public function getAllActivatedWalletNetworks(){ - $query = $this->db->query("SELECT n.name AS network,n.status AS status,n.id,c.name AS country, wp.id AS wallet_password FROM networks n - INNER JOIN countries c ON n.country_id=c.id INNER JOIN configWallet cw ON cw.id_network = n.id + $query = $this->db->query("SELECT n.id AS id_network , n.name AS network,n.status AS status,c.name AS country,c.currency_name_fr,c.currency_code, wp.id AS wallet_password FROM networks n + INNER JOIN countries_currencies c ON n.country_id=c.id INNER JOIN configWallet cw ON cw.id_network = n.id LEFT JOIN walletsPassword wp ON wp.network_id = n.id WHERE status = 1;"); if($query->num_rows()>0){ return $query; @@ -2214,4 +2214,73 @@ class User_model extends CI_Model $query = $this->db->query($sql , array($montant,$wallet_id)); return $query; } + + // Wallet ilink + public function addPalierConfigWallet($type , $idConfig ,$min, $max ,$taux){ + $sql = "INSERT INTO `paliersConfigWallet` (`type`, `min`, `max`, `taux`, `idConfig`) VALUES (?,?,?,?,?);"; + $query = $this->db->query($sql , array($type,$min, $max , $taux ,$idConfig)); + return $query; + } + + public function updatePalierConfigWallet($id ,$min , $max ,$taux){ + $sql = "UPDATE `paliersConfigWallet` SET `min` = ? , `max` = ? , `taux` = ? WHERE (`id` = ?);"; + $query = $this->db->query($sql , array($min, $max , $taux , $id)); + return $query; + } + + public function getPalierConfigWallet($type , $idConfig){ + $sql = "SELECT * FROM `paliersConfigWallet` WHERE (`type` = ? AND `idConfig` = ? );"; + $query = $this->db->query($sql , array($type,$idConfig)); + if($query->num_rows()>0){ + return $query; + }else{ + return false; + } + } + + public function getOnePalierConfigWallet($id){ + $sql = "SELECT * FROM `paliersConfigWallet` WHERE (`id` = ?);"; + $query = $this->db->query($sql , array($id)); + if($query->num_rows()>0){ + return $query; + }else{ + return false; + } + } + + public function deletePalierConfigWallet($type , $idConfig){ + $sql = "DELETE FROM `paliersConfigWallet` WHERE (`type` = ? AND `idConfig` = ? );"; + $query = $this->db->query($sql , array($type,$idConfig)); + return $query; + + } + + public function updateConfigWalletIlink($u_w_w_min,$u_w_w_max,$taux_u_w_w,$u_w_c_min,$u_w_c_max,$taux_u_w_c,$taux_u_w_cart,$taux_u_c_w,$taux_u_c_c,$ag_d_w_min,$ag_d_w_max,$taux_ag_d_w, + $taux_ag_d_c_c,$ag_c_c_min,$ag_c_c_max,$taux_ag_c_c,$taux_ag_cart_c,$taux_ag_cash_c,$taux_ag_s_c,$taux_sup_s_c,$taux_hyp_s_c,$taux_ag_r_c,$taux_sup_r_c,$taux_hyp_r_c, + $taux_ag_d_c,$taux_sup_d_c,$taux_hyp_d_c,$taux_bq_d_c ,$taux_ag_r_cart,$taux_sup_r_cart,$taux_hyp_r_cart,$taux_bq_r_cart ,$idConfig){ + $sql = "UPDATE `configWallet` SET `taux_com_user_wallet_wallet_min` = ? , `taux_com_user_wallet_wallet_max` = ?, `taux_com_user_wallet_wallet` = ?, `taux_com_user_wallet_cash_min` = ?, `taux_com_user_wallet_cash_max` = ?, `taux_com_user_wallet_cash` = ?, `taux_com_user_wallet_carte` = ?, + `taux_com_user_carte_wallet` = ?, `taux_com_user_carte_cash` = ?, `taux_com_wallet_ag_envoi_cash_wallet_min` = ?, `taux_com_wallet_ag_envoi_cash_wallet_max` = ?, `taux_com_wallet_ag_envoi_cash_wallet` = ?, `taux_com_wallet_ag_envoi_cash_carte` = ?, `taux_com_wallet_ag_envoi_cash_cash_min` = ?, + `taux_com_wallet_ag_envoi_cash_cash_max` = ?, `taux_com_wallet_ag_envoi_cash_cash` = ?,`taux_com_wallet_ag_carte_cash` = ?, `taux_com_wallet_ag_depot_carte` = ?, `taux_com_ag_envoi_cash` = ?, `taux_com_sup_envoi_cash` = ?, `taux_com_hyp_envoi_cash` = ?, `taux_com_ag_retrait_cash` = ?, `taux_com_sup_retrait_cash` = ?, `taux_com_hyp_retrait_cash` = ?, + `taux_com_ag_depot_cash_carte` = ?, `taux_com_sup_depot_cash_carte` = ?, `taux_com_hyp_depot_cash_carte` = ?, `taux_com_banque_depot_cash_carte` = ?, `taux_com_ag_retrait_carte_cash` = ?, `taux_com_sup_retrait_carte_cash` = ?, `taux_com_hyp_retrait_carte_cash` = ?, `taux_com_banque_retrait_carte_cash` = ? WHERE (`id` = ?);"; + $query = $this->db->query($sql , array($u_w_w_min,$u_w_w_max,$taux_u_w_w,$u_w_c_min,$u_w_c_max,$taux_u_w_c,$taux_u_w_cart,$taux_u_c_w,$taux_u_c_c,$ag_d_w_min,$ag_d_w_max,$taux_ag_d_w, + $taux_ag_d_c_c,$ag_c_c_min,$ag_c_c_max,$taux_ag_c_c,$taux_ag_cart_c,$taux_ag_cash_c,$taux_ag_s_c,$taux_sup_s_c,$taux_hyp_s_c,$taux_ag_r_c,$taux_sup_r_c,$taux_hyp_r_c, + $taux_ag_d_c,$taux_sup_d_c,$taux_hyp_d_c,$taux_bq_d_c , $taux_ag_r_cart,$taux_sup_r_cart,$taux_hyp_r_cart, $taux_bq_r_cart , $idConfig)); + return $query; + } + + public function getCurrencies($code){ + $sql= "SELECT * FROM currencies WHERE id IN( + SELECT idCurrency FROM countries WHERE id IN ( + SELECT country_id FROM networks WHERE status = 1 + ) + ) AND code <> ? ;"; + $query = $this->db->query($sql, array($code)); + if($query->num_rows()>0){ + return $query; + }else{ + return false; + } + } + + } diff --git a/application/views/gestion_monnaie.php b/application/views/gestion_monnaie.php new file mode 100755 index 00000000..3f11e10f --- /dev/null +++ b/application/views/gestion_monnaie.php @@ -0,0 +1,353 @@ + + + + + + + + + +
+ +
+ +

+ lang->line('currency_management'). ' '. $network .' - '.$country; ?> +

+ +
+ +

Erreur!

+ +
+ + +
+ +

Success!

+ +
+ + + +
+ +
+
+
+
+
+

+

lang->line('currency') ?>

+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+ + + + + + + + + +result() as $row) { +// echo " +// +// +// ".' +// +// '; +// } +// } +// ?> + +
lang->line('currency') ; ?> lang->line('rate') ; ?> (%) Actions
".$row->min."".$row->max."".$row->taux." +// +// +// +//
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/gestion_monnaies.php b/application/views/gestion_monnaies.php new file mode 100755 index 00000000..e0b67307 --- /dev/null +++ b/application/views/gestion_monnaies.php @@ -0,0 +1,143 @@ + + + +
+ +
+ +

+ lang->line('currency_management'); ?> + +

+ +
+ +

Erreur!

+ +
+ + +
+ +

Success!

+ +
+ + +
+ +
+
+
+
+
+

lang->line('activated_wallets'); ?>

+
+
+ + num_rows(); + $num = 0; + if ($numrows > 0) { + ?> + + + + + + + + + + + + + result() as $row) { + $num ++; + //$member_code = randomString1(10); + echo " + + + "; + ?> + + + + + + + +
lang->line('Reseau'); ?>lang->line('Pays'); ?>lang->line('currency'); ?>lang->line('currency_code'); ?> Action
$num$row->network$row->countrycurrency_name_fr; ?>currency_code; ?> + + lang->line('show_currency_rate_conversion'); ?> + +
+ + lang->line('Aucun réseau'); + } + }else { + echo $this->lang->line('Aucun réseau'); + } + ?> +
+
+
+
+ + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/gestion_wallet_ilink.php b/application/views/gestion_wallet_ilink.php new file mode 100755 index 00000000..ca1cf33c --- /dev/null +++ b/application/views/gestion_wallet_ilink.php @@ -0,0 +1,827 @@ + + + + + + +db->query("SELECT id FROM infos_transaction + WHERE network_id='" . $network_id . "' + AND MONTH(date_created) = '" . $months[$i - 1] . "' + AND YEAR(date_created) = '" . $years[$i - 1] . "' + AND type_transac='debit'"); + $retraits_data[] = $retraits_query_mounth->num_rows(); +} + +$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 = $this->db->query("SELECT * FROM infos_transaction + WHERE network_id='" . $network_id . "' + AND date_created BETWEEN '" . $startDate . "' AND '" . $endDate . "' + AND type_transac='debit'"); + +/** + ** Dépots + **/ +$date = date("Y"); + +$depots_data[] = ''; +$depots_data = array(); +for ($i = 1; $i <= 12; $i++) { + $depots_query_mounth = $this->db->query("SELECT id FROM infos_transaction + WHERE network_id='" . $network_id . "' + AND MONTH(date_created) = '" . $months[$i - 1] . "' + AND YEAR(date_created) = '" . $years[$i - 1] . "' + AND type_transac='credit'"); + $depots_data[] = $depots_query_mounth->num_rows(); +} +$depots = $this->db->query("SELECT * FROM infos_transaction + WHERE network_id='" . $network_id . "' + AND date_created BETWEEN '" . $startDate . "' AND '" . $endDate . "' + AND type_transac='credit'"); + +if ($transactions != false) { + $transac = $transactions->num_rows(); + $array_transac = array(); + $num = 0; + if ($transac > 0) { + foreach ($transactions->result() as $row) { + $num++; + $array_transac[] = $row->type_transac; + } + $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('Gestion des wallets'). ' '. $network .' - '.$country; ?> +

+ +
+ +

Erreur!

+ +
+ + +
+ +

Success!

+ +
+ + + +
+ +
+
+
+
+
+

%

+

lang->line('rate_com_user_wallet_cart') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_user_cart_wallet') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_user_cart_cash') ?>

+
+
+ +
+
+
+
+
+
+

%

+

lang->line('rate_com_agent_depot_cash_cart') ?>

+
+
+ +
+
+
+
+
+ +
+
+
+

%

+

lang->line('rate_com_agent_send_cash') ?>

+
+
+ +
+ +
+
+ +
+
+
+

%

+

lang->line('rate_com_sup_send_cash') ?>

+
+
+ +
+ +
+
+ +
+
+
+

%

+

lang->line('rate_com_hyp_send_cash') ?>

+
+
+ +
+ +
+
+ +
+
+
+

%

+

lang->line('rate_com_agent_remove_cash') ?>

+
+
+ +
+ +
+
+ + +
+
+
+

%

+

lang->line('rate_com_sup_remove_cash') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_sup_remove_cash') ?>

+
+
+ +
+
+
+ +
+
+ +
+
+
+

%

+

lang->line('rate_com_agent_cart_cash') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_agent_cash_cart') ?>

+
+
+ +
+ +
+
+ +
+
+
+

%

+

lang->line('rate_com_agent_depot_cart') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_sup_depot_cart') ?>

+
+
+ +
+ +
+
+ + +
+
+
+

%

+

lang->line('rate_com_hyp_depot_cart') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_bq_depot_cart') ?>

+
+
+ +
+
+
+ +
+
+ +
+
+
+

%

+

lang->line('rate_com_agent_remove_cart') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_sup_remove_cart') ?>

+
+
+ +
+
+
+ + +
+
+
+

%

+

lang->line('rate_com_hyp_remove_cart') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_bq_remove_cart') ?>

+
+
+ +
+
+
+ +
+
+
+
+
+

lang->line('rate_com_user_wallet_wallet_international'); ?>

+
+ +
+ + + + + + + + result() as $row) { + echo " + + + ".' + '; + } + } + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($row->min)."".$fmt->format($row->max)."".$row->taux."
+
+ +
+
+
+

lang->line('rate_com_user_wallet_wallet_national'); ?>

+
+ +
+ + + + + + + + + + + ".' + '; + + + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($u_w_w_min)."".$fmt->format($u_w_w_max)."".$taux_u_w_w."
+
+ +
+
+
+
+
+

lang->line('rate_com_user_wallet_cash_international'); ?>

+
+ +
+ + + + + + + + result() as $row) { + echo " + + + ".' + '; + } + } + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($row->min)."".$fmt->format($row->max)."".$row->taux."
+
+ +
+
+
+

lang->line('rate_com_user_wallet_cash_national'); ?>

+
+ +
+ + + + + + + + + + + ".' + '; + + + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($u_w_c_min)."".$fmt->format($u_w_c_max)."".$taux_u_w_c."
+
+ +
+
+
+
+
+

lang->line('rate_com_agent_depot_wallet_international'); ?>

+
+ +
+ + + + + + + + result() as $row) { + echo " + + + ".' + '; + } + } + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($row->min)."".$fmt->format($row->max)."".$row->taux."
+
+ +
+
+
+

lang->line('rate_com_agent_depot_wallet_national'); ?>

+
+ +
+ + + + + + + + + + + ".' + '; + + + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($ag_d_w_min)."".$fmt->format($ag_d_w_max)."".$taux_ag_d_w."
+
+ +
+
+
+
+
+

lang->line('rate_com_agent_cash_cash_international'); ?>

+
+ +
+ + + + + + + + result() as $row) { + echo " + + + ".' + '; + } + } + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($row->min)."".$fmt->format($row->max)."".$row->taux."
+
+ +
+
+
+

lang->line('rate_com_agent_cash_cash_national'); ?>

+
+ +
+ + + + + + + + + + + ".' + '; + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($ag_c_c_min)."".$fmt->format($ag_c_c_max)."".$taux_ag_c_c."
+
+ +
+
+
+
+
+
+
+

+ lang->line('Historique des 12 derniers mois'); ?>

+ +
+
+
+ +
+
+
+
+
+
+
+

+ lang->line("Parts dépots & retraits"); ?>

+
+
+ +
+
+
+ +
+
+
+

lang->line('Commission Hyperviseur') ?>

+
+
+ + + + ".$this->lang->line('Nom')." + + + + + "; + ?> + + + + + + + + "; + + echo " + + "; + + } + ?> + +
".$this->lang->line('Solde Principal')."".$this->lang->line('Solde Commission')."".$this->lang->line('Commission banque')."".$this->lang->line('DEPOT'). 's'."".$this->lang->line('RETRAIT').'s'."
" . $walletHyper->first_row()->lastname . "" . $fmt->format($walletHyper->first_row()->balance_princ) . "" . $fmt->format($walletHyper->first_row()->balance_com) . "" . $fmt->format($totalCommissionBanque) . "" . $depots->num_rows() . "" . $retraits->num_rows() . "
+
+
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/gestion_wallet_ilink_hyp.php b/application/views/gestion_wallet_ilink_hyp.php new file mode 100755 index 00000000..b40850bb --- /dev/null +++ b/application/views/gestion_wallet_ilink_hyp.php @@ -0,0 +1,2047 @@ + + + + + + + + + + + +date)); + $year = date("Y",strtotime($trans->date)); + return $month == $months[$i-1] && $year == $years[$i-1] && $trans->type == 'debit' ; + }); + $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 == 'debit' ; + }); + + /** + ** 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 == 'credit' ; + }); + $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 == 'credit' ; + }); + + if($transactions!=false){ + $transac=sizeof($transactions); + $array_transac = array(); + $num = 0; + if ($transac > 0) { + foreach($transactions as $row) { + $num++; + $array_transac[] = $row->type; + } + $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 ); +?> + +
+ +
+ +

+ Wallet +

+ +
+ +

Erreur!

+ +
+ + +
+ +

Success!

+ +
+ + + +
+ +
+
+
+
+
+

format($principal); ?>FCFA

+

lang->line('Solde Principal') ?>

+
+
+ +
+
+
+ +
+
+
+

format($commission); ?>FCFA

+

lang->line('Solde Commission') ?>

+
+
+ +
+
+
+ +
+
+
+

format($totalCommissionBanque); ?>FCFA

+

lang->line('Total commission de la banque') ?>

+
+
+ +
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+

%

+

lang->line('rate_com_user_wallet_cart') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_user_cart_wallet') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_user_cart_cash') ?>

+
+
+ +
+
+
+
+
+
+

%

+

lang->line('rate_com_agent_depot_cash_cart') ?>

+
+
+ +
+
+
+
+
+ +
+
+
+

%

+

lang->line('rate_com_agent_send_cash') ?>

+
+
+ +
+ +
+
+ +
+
+
+

%

+

lang->line('rate_com_sup_send_cash') ?>

+
+
+ +
+ +
+
+ +
+
+
+

%

+

lang->line('rate_com_hyp_send_cash') ?>

+
+
+ +
+ +
+
+ +
+
+
+

%

+

lang->line('rate_com_agent_remove_cash') ?>

+
+
+ +
+ +
+
+ + +
+
+
+

%

+

lang->line('rate_com_sup_remove_cash') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_sup_remove_cash') ?>

+
+
+ +
+
+
+ +
+
+ +
+
+
+

%

+

lang->line('rate_com_agent_cart_cash') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_agent_cash_cart') ?>

+
+
+ +
+ +
+
+ +
+
+
+

%

+

lang->line('rate_com_agent_depot_cart') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_sup_depot_cart') ?>

+
+
+ +
+ +
+
+ + +
+
+
+

%

+

lang->line('rate_com_hyp_depot_cart') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_bq_depot_cart') ?>

+
+
+ +
+
+
+ +
+
+ +
+
+
+

%

+

lang->line('rate_com_agent_remove_cart') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_sup_remove_cart') ?>

+
+
+ +
+
+
+ + +
+
+
+

%

+

lang->line('rate_com_hyp_remove_cart') ?>

+
+
+ +
+
+
+ +
+
+
+

%

+

lang->line('rate_com_bq_remove_cart') ?>

+
+
+ +
+
+
+ +
+
+
+
+
+

lang->line('rate_com_user_wallet_wallet_international'); ?>

+
+ +
+ + + + + + + + result() as $row) { + echo " + + + ".' + '; + } + } + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($row->min)."".$fmt->format($row->max)."".$row->taux."
+
+ +
+
+
+

lang->line('rate_com_user_wallet_wallet_national'); ?>

+
+ +
+ + + + + + + + + + + ".' + '; + + + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($u_w_w_min)."".$fmt->format($u_w_w_max)."".$taux_u_w_w."
+
+ +
+
+
+
+
+

lang->line('rate_com_user_wallet_cash_international'); ?>

+
+ +
+ + + + + + + + result() as $row) { + echo " + + + ".' + '; + } + } + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($row->min)."".$fmt->format($row->max)."".$row->taux."
+
+ +
+
+
+

lang->line('rate_com_user_wallet_cash_national'); ?>

+
+ +
+ + + + + + + + + + + ".' + '; + + + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($u_w_c_min)."".$fmt->format($u_w_c_max)."".$taux_u_w_c."
+
+ +
+
+
+
+
+

lang->line('rate_com_agent_depot_wallet_international'); ?>

+
+ +
+ + + + + + + + result() as $row) { + echo " + + + ".' + '; + } + } + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($row->min)."".$fmt->format($row->max)."".$row->taux."
+
+ +
+
+
+

lang->line('rate_com_agent_depot_wallet_national'); ?>

+
+ +
+ + + + + + + + + + + ".' + '; + + + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($ag_d_w_min)."".$fmt->format($ag_d_w_max)."".$taux_ag_d_w."
+
+ +
+
+
+
+
+

lang->line('rate_com_agent_cash_cash_international'); ?>

+
+ +
+ + + + + + + + result() as $row) { + echo " + + + ".' + '; + } + } + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($row->min)."".$fmt->format($row->max)."".$row->taux."
+
+ +
+
+
+

lang->line('rate_com_agent_cash_cash_national'); ?>

+
+ +
+ + + + + + + + + + + ".' + '; + ?> + +
Min (FCFA)Max (FCFA)Taux (%)
".$fmt->format($ag_c_c_min)."".$fmt->format($ag_c_c_max)."".$taux_ag_c_c."
+
+ +
+
+
+ +
+
+
+
+

lang->line('Historique des 12 derniers mois'); ?>

+ +
+
+
+ +
+
+
+
+
+
+
+

lang->line("Parts dépots & retraits"); ?>

+
+
+ +
+
+
+ +
+
+
+

lang->line('Commissions Superviseurs') ?>

+
+
+ + + + ".$this->lang->line('Nom')." + + + + + "; + ?> + + + + 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 " + + + "; + $nb_depots = 0; + $nb_retraits = 0; + $commission_banque = 0; + foreach($depots as $depot){ + if($depot->code_parrain == $row->member_code) { + $nb_depots ++; + $commission_banque+= $depot->commission_banque; + } + } + foreach($retraits as $retrait){ + if($retrait->code_parrain == $row->member_code) { + $nb_retraits ++; + $commission_banque+= $retrait->commission_banque; + } + } + echo " + + + "; + } + + } + ?> + +
".$this->lang->line('Solde Principal')."".$this->lang->line('Solde Commission')."".$this->lang->line('Commission banque')."".$this->lang->line('DEPOT'). 's'."".$this->lang->line('RETRAIT').'s'."
".$row->lastname."".$fmt->format($princ)."".$fmt->format($com)."".$fmt->format($commission_banque)."".$nb_depots."".$nb_retraits."
+
+
+
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/gestion_wallets.php b/application/views/gestion_wallets.php index d5dff834..7e85acbe 100755 --- a/application/views/gestion_wallets.php +++ b/application/views/gestion_wallets.php @@ -84,7 +84,7 @@ }else{ ?> lang->line('Inactif'); ?> - + @@ -114,7 +114,6 @@ - + @@ -177,12 +197,13 @@ }) $(document).on("click", ".enableWallet", function () { - const network_id = $(this).data('network-id'); + // const network_id = $(this).data('network-id'); + const type = $(this).val(); $.ajax({ url : '', type : 'POST', dataType : 'json', - data: {"network_id": network_id}, + data: {"network_id": network_id , "type" : type}, success : function(data){ if(data=='200'){ @@ -248,5 +269,4 @@ }); }); - diff --git a/application/views/header_gestion.php b/application/views/header_gestion.php index 94eea329..8a73af02 100755 --- a/application/views/header_gestion.php +++ b/application/views/header_gestion.php @@ -147,11 +147,16 @@ Wallet - + + + + + +
  • "> + + lang->line('currency'); ?> + +
  • diff --git a/application/views/historique_transactions.php b/application/views/historique_transactions.php index 2e9ef400..14b3a638 100755 --- a/application/views/historique_transactions.php +++ b/application/views/historique_transactions.php @@ -113,7 +113,7 @@ if($row->type_transac == 'credit'){ $commission = ( $row->montant * $config->taux_com_client_depot / 100 ) + $config->frais_min_banque_depot; $net = $row->montant - $commission; - $banque = $row->montant - $config->frais_min_banque_depot; + $banque = $row->montant * (1 - ($config->taux_com_client_depot / 100)); }else{ $net = $row->montant ; }