+ Adding iLink World Wallet
This commit is contained in:
parent
5eca91cf60
commit
c37a11d2e9
|
@ -1543,6 +1543,8 @@ class Gestion extends CI_Controller
|
||||||
$taux = $this->user_model->getTaux($network_id);
|
$taux = $this->user_model->getTaux($network_id);
|
||||||
if ($taux != null) {
|
if ($taux != null) {
|
||||||
$taux = $taux->first_row();
|
$taux = $taux->first_row();
|
||||||
|
$data['idConfig'] = $taux->id;
|
||||||
|
if ($taux->type == 'visa'){
|
||||||
$data['taux_client_r'] = $taux->taux_com_client_retrait;
|
$data['taux_client_r'] = $taux->taux_com_client_retrait;
|
||||||
$data['taux_client_d'] = $taux->taux_com_client_depot;
|
$data['taux_client_d'] = $taux->taux_com_client_depot;
|
||||||
$data['taux_ag_r'] = $taux->taux_com_ag_retrait;
|
$data['taux_ag_r'] = $taux->taux_com_ag_retrait;
|
||||||
|
@ -1552,6 +1554,45 @@ class Gestion extends CI_Controller
|
||||||
$data['taux_bq_d'] = $taux->part_banque_depot;
|
$data['taux_bq_d'] = $taux->part_banque_depot;
|
||||||
$data['taux_bq_r'] = $taux->part_banque_retrait;
|
$data['taux_bq_r'] = $taux->part_banque_retrait;
|
||||||
$data['frais_d'] = $taux->frais_min_banque_depot;
|
$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);
|
$data['transactions'] = $this->user_model->getTransactions(null,null,$network_id);
|
||||||
$totalCommissionBanque = 0;
|
$totalCommissionBanque = 0;
|
||||||
if($data['transactions']){
|
if($data['transactions']){
|
||||||
|
@ -1560,20 +1601,7 @@ class Gestion extends CI_Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$data['totalCommissionBanque'] = $totalCommissionBanque ;
|
$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();
|
$hyper = $this->user_model->getNetworkHyper($network_id)->first_row();
|
||||||
$data['walletHyper'] = $this->user_model->getWallet($hyper->agent_id);
|
$data['walletHyper'] = $this->user_model->getWallet($hyper->agent_id);
|
||||||
|
@ -1590,9 +1618,13 @@ class Gestion extends CI_Controller
|
||||||
$data['networks'] = $this->user_model->getActiveNetwork();
|
$data['networks'] = $this->user_model->getActiveNetwork();
|
||||||
|
|
||||||
$this->load->view('header_gestion', $data);
|
$this->load->view('header_gestion', $data);
|
||||||
|
if ($taux->type == 'visa')
|
||||||
$this->load->view('gestion_wallet');
|
$this->load->view('gestion_wallet');
|
||||||
|
elseif ($taux->type == 'ilink')
|
||||||
|
$this->load->view('gestion_wallet_ilink');
|
||||||
$this->load->view('footer');
|
$this->load->view('footer');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -1614,15 +1646,17 @@ class Gestion extends CI_Controller
|
||||||
if (isset($_POST)) {
|
if (isset($_POST)) {
|
||||||
|
|
||||||
$network_id = $_POST['network_id'];
|
$network_id = $_POST['network_id'];
|
||||||
|
$type = $_POST['type'];
|
||||||
if($method == 'create')
|
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)
|
// if($res)
|
||||||
// $this->generateAllWallets($network_id);
|
// $this->generateAllWallets($network_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if($method = 'update'){
|
else if($method = 'update'){
|
||||||
|
|
||||||
|
if($type == 'uba'){
|
||||||
$taux_client_r = $_POST['taux_client_r'];
|
$taux_client_r = $_POST['taux_client_r'];
|
||||||
$taux_client_d = $_POST['taux_client_d'];
|
$taux_client_d = $_POST['taux_client_d'];
|
||||||
$taux_ag_d = $_POST['taux_ag_d'];
|
$taux_ag_d = $_POST['taux_ag_d'];
|
||||||
|
@ -1635,6 +1669,41 @@ class Gestion extends CI_Controller
|
||||||
|
|
||||||
$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) {
|
if ($res != false) {
|
||||||
echo json_encode("200");
|
echo json_encode("200");
|
||||||
|
@ -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()
|
public function delete_config_wallet()
|
||||||
{
|
{
|
||||||
if($this->isLogged()){
|
if($this->isLogged()){
|
||||||
|
@ -1705,6 +1793,7 @@ class Gestion extends CI_Controller
|
||||||
private function historique($network_id ,$startDate ,$endDate, $type)
|
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' ;
|
$format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d' ;
|
||||||
$data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null ;
|
$data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null ;
|
||||||
$data['endDate'] = $endDate ?date($format, strtotime($endDate)): null ;
|
$data['endDate'] = $endDate ?date($format, strtotime($endDate)): null ;
|
||||||
|
@ -1731,7 +1820,38 @@ class Gestion extends CI_Controller
|
||||||
$this->load->view('footer');
|
$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');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -306,6 +306,9 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
$this->load->view('login', $data);
|
$this->load->view('login', $data);
|
||||||
} else {
|
} else {
|
||||||
$id_network = $this->session->userdata('network_id');
|
$id_network = $this->session->userdata('network_id');
|
||||||
|
$data['hasWallet'] = $this->user_model->getConfigWallet($this->session->userdata('network_id'));
|
||||||
|
if ($data['hasWallet']) {
|
||||||
|
|
||||||
if($this->input->get('history')){
|
if($this->input->get('history')){
|
||||||
$this->historique($id_network,$this->input->get('d'),$this->input->get('f'),$this->input->get('history'));
|
$this->historique($id_network,$this->input->get('d'),$this->input->get('f'),$this->input->get('history'));
|
||||||
}else {
|
}else {
|
||||||
|
@ -314,10 +317,11 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
$data["principal"] = "";
|
$data["principal"] = "";
|
||||||
$data["transactions"] = "";
|
$data["transactions"] = "";
|
||||||
$agent_id = $this->session->userdata('agent_id');
|
$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();
|
$taux = $data['hasWallet']->first_row();
|
||||||
|
$data['idConfig'] = $taux->id;
|
||||||
|
if ($data['hasWallet']->first_row()->type == 'uba'){
|
||||||
$data['taux_client_r'] = $taux->taux_com_client_retrait;
|
$data['taux_client_r'] = $taux->taux_com_client_retrait;
|
||||||
$data['taux_client_d'] = $taux->taux_com_client_depot;
|
$data['taux_client_d'] = $taux->taux_com_client_depot;
|
||||||
$data['taux_ag_r'] = $taux->taux_com_ag_retrait;
|
$data['taux_ag_r'] = $taux->taux_com_ag_retrait;
|
||||||
|
@ -327,6 +331,44 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
$data['taux_bq_d'] = $taux->part_banque_depot;
|
$data['taux_bq_d'] = $taux->part_banque_depot;
|
||||||
$data['taux_bq_r'] = $taux->part_banque_retrait;
|
$data['taux_bq_r'] = $taux->part_banque_retrait;
|
||||||
$data['frais_d'] = $taux->frais_min_banque_depot;
|
$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
|
//Create wallet if it not exist
|
||||||
$res = $this->user_model->getWallet($agent_id);
|
$res = $this->user_model->getWallet($agent_id);
|
||||||
|
@ -360,22 +402,6 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$data["totalCommissionBanque"] = $totalCommissionBanque;
|
$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);
|
$res = $this->user_model->getWalletPassword($id_network);
|
||||||
$data['walletPassword'] = $res ? $res->first_row() : null;
|
$data['walletPassword'] = $res ? $res->first_row() : null;
|
||||||
|
@ -398,10 +424,13 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
$data['networks'] = $this->user_model->getActiveNetwork();
|
$data['networks'] = $this->user_model->getActiveNetwork();
|
||||||
$data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($id_network);
|
$data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($id_network);
|
||||||
$this->load->view('header_hyp', $data);
|
$this->load->view('header_hyp', $data);
|
||||||
|
if ($data['hasWallet']->first_row()->type == 'uba')
|
||||||
$this->load->view('gestion_wallet_hyp');
|
$this->load->view('gestion_wallet_hyp');
|
||||||
|
elseif ($data['hasWallet']->first_row()->type == 'ilink')
|
||||||
|
$this->load->view('gestion_wallet_ilink_hyp');
|
||||||
$this->load->view('footer');
|
$this->load->view('footer');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -420,7 +449,7 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
|
|
||||||
private function historique($network_id ,$startDate ,$endDate, $type)
|
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' ;
|
$format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d' ;
|
||||||
$data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null ;
|
$data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null ;
|
||||||
$data['endDate'] = $endDate ?date($format, strtotime($endDate)): null ;
|
$data['endDate'] = $endDate ?date($format, strtotime($endDate)): null ;
|
||||||
|
|
|
@ -303,4 +303,45 @@ $lang['wallet_created'] = 'New wallet created';
|
||||||
$lang['wallet_deleted'] = 'Wallet deleted';
|
$lang['wallet_deleted'] = 'Wallet deleted';
|
||||||
$lang['no_supervisor'] = 'No supervisor';
|
$lang['no_supervisor'] = 'No supervisor';
|
||||||
$lang['no_geolocated_agent'] = 'No geolocated agent';
|
$lang['no_geolocated_agent'] = 'No geolocated agent';
|
||||||
|
$lang ['choose_wallet_type'] = 'Choose the type of wallet';
|
||||||
|
$lang['rate'] = 'Rate';
|
||||||
|
$lang ['rate_com_user_wallet_wallet_international'] = 'Wallet user commission rate to foreign country wallet';
|
||||||
|
$lang ['rate_com_user_wallet_wallet_national'] = 'Wallet user commission rate to national wallet';
|
||||||
|
$lang ['new_level'] = 'New level';
|
||||||
|
$lang ['rate_com_user_wallet_cash_international'] = 'Wallet user commission rate for foreign country cash';
|
||||||
|
$lang ['rate_com_user_wallet_cash_national'] = 'Wallet user commission rate with national cash';
|
||||||
|
$lang ['rate_com_user_wallet_cart'] = 'Wallet to card user commission rate';
|
||||||
|
$lang ['rate_com_user_cart_wallet'] = 'User commission rate card to wallet';
|
||||||
|
$lang ['rate_com_user_cart_cash'] = 'User card to cash commission rate';
|
||||||
|
$lang ['rate_com_agent_depot_wallet_national'] = 'Agent depot commission rate to national wallet';
|
||||||
|
$lang ['rate_com_agent_depot_wallet_international'] = 'Commission rate agent deposit to foreign wallet';
|
||||||
|
$lang ['rate_com_agent_depot_cash_cart'] = 'Agent commission rate deposit cash to card';
|
||||||
|
$lang ['rate_com_agent_cash_cash_national'] = 'Agent commission rate sending cash to national cash';
|
||||||
|
$lang ['rate_com_agent_cash_cash_international'] = 'Agent commission rate sending cash to cash in foreign countries';
|
||||||
|
$lang ['rate_com_agent_send_cash'] = 'Commission rate of the geolocated agent on the operation of sending money';
|
||||||
|
$lang ['rate_com_sup_send_cash'] = 'Supervisor\'s commission rate on sending money';
|
||||||
|
$lang ['rate_com_hyp_send_cash'] = 'Commission rate of the hypervisor on sending money';
|
||||||
|
$lang ['rate_com_agent_remove_cash'] = 'Geolocated agent commission rate on money withdrawal operation';
|
||||||
|
$lang ['rate_com_sup_remove_cash'] = 'Supervisor\'s commission rate on money withdrawal operation';
|
||||||
|
$lang ['rate_com_hyp_remove_cash'] = 'Commission rate of the hypervisor on money withdrawal operation';
|
||||||
|
$lang ['rate_com_agent_depot_cart'] = 'Commission rate of the geolocated agent on deposit to card operation';
|
||||||
|
$lang ['rate_com_sup_depot_cart'] = 'Supervisor commission rate on deposit to card operation';
|
||||||
|
$lang ['rate_com_hyp_depot_cart'] = 'Rate of hypervisor commission on deposit to card operation';
|
||||||
|
$lang ['rate_com_bq_depot_cart'] = 'Bank commission rate on deposit to card operation';
|
||||||
|
$lang ['rate_com_agent_remove_cart'] = 'Commission rate of the geolocated agent on card withdrawal operation';
|
||||||
|
$lang ['rate_com_sup_remove_cart'] = 'Supervisor commission rate on card withdrawal operation';
|
||||||
|
$lang ['rate_com_hyp_remove_cart'] = 'Hypervisor commission rate on card withdrawal operation';
|
||||||
|
$lang ['rate_com_bq_remove_cart'] = 'Bank commission rate on card withdrawal operation';
|
||||||
|
$lang ['rate_com_agent_cart_cash'] = 'Geolocated agent commission rate on cash card withdrawal';
|
||||||
|
$lang ['rate_com_agent_cash_cart'] = 'Commission rate of the geolocated agent on cash deposit to card';
|
||||||
|
|
||||||
|
// Currency management
|
||||||
|
$lang ['currency'] = 'Currency';
|
||||||
|
$lang ['currency_code'] = 'Currency code';
|
||||||
|
$lang ['currency_management'] = 'Currency management';
|
||||||
|
$lang ['show_currency_rate_conversion'] = 'Show conversion rates';
|
||||||
|
$lang ['conversion_rate'] = 'Conversion rate';
|
||||||
|
$lang ['new_rate'] = 'New rate';
|
||||||
|
$lang ['save'] = 'Save';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -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_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 ';
|
$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';
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1863,7 +1863,7 @@ class User_model extends CI_Model
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNetworkDetails($id_network){
|
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){
|
if($query->num_rows()>0){
|
||||||
return $query;
|
return $query;
|
||||||
}else{
|
}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 ){
|
public function addConfigWallet($network_id , $type){
|
||||||
$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 ( ?, ?, ?, ?, ?, ?, ? , ? , ? ,?);' ;
|
$sql='INSERT INTO `iLink_test2`.`configWallet` (`id_network`, `type`) 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));
|
$query = $this->db->query($sql , array($network_id, $type));
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2159,8 +2159,8 @@ class User_model extends CI_Model
|
||||||
|
|
||||||
// Mot de passe du wallet
|
// Mot de passe du wallet
|
||||||
public function getAllActivatedWalletNetworks(){
|
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
|
$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 c ON n.country_id=c.id INNER JOIN configWallet cw ON cw.id_network = n.id
|
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;");
|
LEFT JOIN walletsPassword wp ON wp.network_id = n.id WHERE status = 1;");
|
||||||
if($query->num_rows()>0){
|
if($query->num_rows()>0){
|
||||||
return $query;
|
return $query;
|
||||||
|
@ -2214,4 +2214,73 @@ class User_model extends CI_Model
|
||||||
$query = $this->db->query($sql , array($montant,$wallet_id));
|
$query = $this->db->query($sql , array($montant,$wallet_id));
|
||||||
return $query;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,353 @@
|
||||||
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
|
||||||
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
|
||||||
|
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
|
||||||
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/toastr/toastr.css') ?>">
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round|Open+Sans">
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<style type="text/css">
|
||||||
|
.table-wrapper {
|
||||||
|
width: 700px;
|
||||||
|
margin: 30px auto;
|
||||||
|
background: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
box-shadow: 0 1px 1px rgba(0,0,0,.05);
|
||||||
|
}
|
||||||
|
.table-title {
|
||||||
|
padding-bottom: 10px;
|
||||||
|
margin: 0 0 10px;
|
||||||
|
}
|
||||||
|
.table-title h2 {
|
||||||
|
margin: 6px 0 0;
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
.table-title .add-new {
|
||||||
|
float: right;
|
||||||
|
height: 30px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 12px;
|
||||||
|
text-shadow: none;
|
||||||
|
min-width: 100px;
|
||||||
|
border-radius: 50px;
|
||||||
|
line-height: 13px;
|
||||||
|
}
|
||||||
|
.table-title .add-new i {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
table.table {
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
table.table tr th, table.table tr td {
|
||||||
|
border-color: #e9e9e9;
|
||||||
|
}
|
||||||
|
table.table th i {
|
||||||
|
font-size: 13px;
|
||||||
|
margin: 0 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
table.table th:last-child {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
table.table td a {
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 5px;
|
||||||
|
min-width: 24px;
|
||||||
|
}
|
||||||
|
table.table td a.add {
|
||||||
|
color: #27C46B;
|
||||||
|
}
|
||||||
|
table.table td a.edit {
|
||||||
|
color: #FFC107;
|
||||||
|
}
|
||||||
|
table.table td a.delete {
|
||||||
|
color: #E34724;
|
||||||
|
}
|
||||||
|
table.table td i {
|
||||||
|
font-size: 19px;
|
||||||
|
}
|
||||||
|
table.table td a.add i {
|
||||||
|
font-size: 24px;
|
||||||
|
margin-right: -1px;
|
||||||
|
position: relative;
|
||||||
|
top: 3px;
|
||||||
|
}
|
||||||
|
table.table .form-control {
|
||||||
|
height: 32px;
|
||||||
|
line-height: 32px;
|
||||||
|
box-shadow: none;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
/*table.table .form-control.error {*/
|
||||||
|
/* border-color: #f50000;*/
|
||||||
|
/*}*/
|
||||||
|
.error {
|
||||||
|
border-color: #f50000;
|
||||||
|
}
|
||||||
|
table.table td .add {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
<?php echo $this->lang->line('currency_management'). ' '. $network .' - '.$country; ?>
|
||||||
|
</h1>
|
||||||
|
<?php
|
||||||
|
$site_url = base_url();
|
||||||
|
|
||||||
|
if ($alert == "ok") {
|
||||||
|
|
||||||
|
if (!$success == "ok") {
|
||||||
|
?>
|
||||||
|
<div class='alert alert-danger alert-dismissible col-xs-6'>
|
||||||
|
<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>
|
||||||
|
<h4><i class='icon fa fa-ban'></i> Erreur!</h4>
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success alert-dismissible col-xs-6">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<h4><i class="icon fa fa-check"></i> Success!</h4>
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
<div class="row centered">
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-red-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h4><strong> <?php echo $currency_code.' - '.$currency_name_fr; ?> </strong></h4>
|
||||||
|
<p><?php echo $this->lang->line('currency') ?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<div class="table-title">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<label for="nom"
|
||||||
|
class="col-form-label"><?php echo $this->lang->line('conversion_rate') ; ?></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<button type="button" class="btn btn-info add-new new1"><i class="fa fa-plus"></i> <?php echo $this->lang->line('new_rate') ; ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table id="taux_conversion" class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $this->lang->line('currency') ; ?> </th>
|
||||||
|
<th><?php echo $this->lang->line('rate') ; ?> (%) </th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<!-- --><?php
|
||||||
|
// if($plr_user_wallet_wallet!=false){
|
||||||
|
// foreach($plr_user_wallet_wallet->result() as $row) {
|
||||||
|
// echo "<tr>
|
||||||
|
// <td>".$row->min."</td>
|
||||||
|
// <td>".$row->max."</td>
|
||||||
|
// <td>".$row->taux."</td>".'
|
||||||
|
// <td>
|
||||||
|
// <a class="add add1" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||||
|
// <a class="edit edit1" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||||
|
// <a class="delete delete1" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||||
|
// </td>
|
||||||
|
// </tr>';
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<button type="button" id="save" class="btn btn-primary btn-block" >
|
||||||
|
<b><?php echo $this->lang->line('save'); ?></b>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<!-- jQuery 3 -->
|
||||||
|
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
|
||||||
|
<!-- Bootstrap 3.3.7 -->
|
||||||
|
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
||||||
|
<!-- Slimscroll -->
|
||||||
|
<script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
|
||||||
|
<!-- FastClick -->
|
||||||
|
<script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script>
|
||||||
|
<!-- AdminLTE for demo purposes -->
|
||||||
|
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
|
||||||
|
|
||||||
|
<script src="<?php echo base_url('dist/js/sweetalert2.js') ?>"></script>
|
||||||
|
<script src="<?php echo base_url('bower_components/toastr/toastr.js') ?>"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
toastr.options.closeButton = true;
|
||||||
|
toastr.options.closeMethod = 'fadeOut';
|
||||||
|
toastr.options.closeDuration = 5000;
|
||||||
|
toastr.options.closeEasing = 'swing';
|
||||||
|
|
||||||
|
$('#save').click(function () {
|
||||||
|
// const network_id = $(this).data('network-id');
|
||||||
|
// const id_config = $(this).data('id-config');
|
||||||
|
|
||||||
|
var taux_conversion = [];
|
||||||
|
|
||||||
|
$('#taux_conversion tr').has('td').each(function() {
|
||||||
|
var arrayItem = {};
|
||||||
|
$('td', $(this)).each(function(index, item) {
|
||||||
|
if(index < 3)
|
||||||
|
arrayItem[index] = $(item).html();
|
||||||
|
});
|
||||||
|
taux_conversion.push(arrayItem);
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(taux_conversion)
|
||||||
|
|
||||||
|
//$.ajax({
|
||||||
|
// url: '<?php //echo base_url('index.php/Gestion/taux_converison')?>//',
|
||||||
|
// type: 'POST',
|
||||||
|
// dataType: 'json',
|
||||||
|
// data: {
|
||||||
|
// "type" : "ilink",
|
||||||
|
// "network_id": network_id,"id_config" : id_config,
|
||||||
|
// "taux_conversion" :taux_conversion
|
||||||
|
// },
|
||||||
|
// success: function (data) {
|
||||||
|
// if(data=='200'){
|
||||||
|
// Swal.fire({
|
||||||
|
// icon: 'success',
|
||||||
|
// title: "<?php //echo $this->lang->line('wallet_update')?>//",
|
||||||
|
// text:"<?php //echo $this->lang->line('informations_updated')?>//",
|
||||||
|
// timer: 3000
|
||||||
|
// }).then(()=>{
|
||||||
|
// location.reload();
|
||||||
|
// });
|
||||||
|
// // alert("Les informations ont été mises à jour.") ? "" :
|
||||||
|
// }else{
|
||||||
|
// toastr.error("<?php //echo $this->lang->line('error_message')?>//" , "<?php //echo $this->lang->line('request_error')?>//");
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
//
|
||||||
|
// error: function (resultat, statut, error) {
|
||||||
|
// console.log(resultat + " " + error);
|
||||||
|
// toastr.error("<?php //echo $this->lang->line('error_message')?>//" , "<?php //echo $this->lang->line('request_error')?>//");
|
||||||
|
// }
|
||||||
|
//});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Paliers scripts
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
var actions1 = $("#taux_conversion td:last-child").html();
|
||||||
|
// Append table with add row form on add new button click
|
||||||
|
$(".new1").click(function(){
|
||||||
|
if(!actions1){
|
||||||
|
actions1 = '<a class="add add1" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||||
|
' <a class="edit edit1" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>\n' +
|
||||||
|
' <a class="delete delete1" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a>';
|
||||||
|
}
|
||||||
|
$(this).attr("disabled", "disabled");
|
||||||
|
var index = $("#taux_conversion tbody tr:last-child").index();
|
||||||
|
var row = "<tr> <td>"+
|
||||||
|
<?php
|
||||||
|
$result=$currencies;
|
||||||
|
|
||||||
|
$numrows=$result->num_rows();
|
||||||
|
if ($numrows > 0) {
|
||||||
|
echo '"<select class='.'form-control input-lg'.' id='.'currency'.' required>';
|
||||||
|
foreach($result->result() as $row) {
|
||||||
|
echo "<option value=".$row->code.">".$row->code.' - '.$row->name_fr."</option>";
|
||||||
|
}
|
||||||
|
echo '</select>"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
+"</td>" +
|
||||||
|
"<td><input type='number' required class='form-control' min='0' name='taux' id='taux'></td>" +
|
||||||
|
"<td>" + actions1 + "</td>" +
|
||||||
|
"</tr>";
|
||||||
|
$("#taux_conversion").append(row);
|
||||||
|
$("#taux_conversion tbody tr").eq(index + 1).find(".add, .edit").toggle();
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
});
|
||||||
|
// Add row on add button click
|
||||||
|
$(document).on("click", ".add1", function(){
|
||||||
|
var empty = false;
|
||||||
|
var input = $(this).parents("tr").find('input[type="number"]');
|
||||||
|
var select = $(this).parents("tr").find('select[id="currency"]');
|
||||||
|
input.each(function(){
|
||||||
|
if(!$(this)[0].checkValidity()){
|
||||||
|
$(this).addClass("error");
|
||||||
|
$(this)[0].reportValidity();
|
||||||
|
empty = true;
|
||||||
|
} else{
|
||||||
|
$(this).removeClass("error");
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
$(this).parents("tr").find(".error").first().focus();
|
||||||
|
if(!empty){
|
||||||
|
select.each(function(){
|
||||||
|
$(this).parent("td").html($(this).val());
|
||||||
|
});
|
||||||
|
input.each(function(){
|
||||||
|
$(this).parent("td").html($(this).val());
|
||||||
|
});
|
||||||
|
$(this).parents("tr").find(".add, .edit").toggle();
|
||||||
|
$(".new1").removeAttr("disabled");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// Edit row on edit button click
|
||||||
|
$(document).on("click", ".edit1", function(){
|
||||||
|
$(this).parents("tr").find("td:not(:last-child)").each(function(index){
|
||||||
|
if(index == 0)
|
||||||
|
$(this).html("<?php
|
||||||
|
$result=$currencies;
|
||||||
|
$numrows=$result->num_rows();
|
||||||
|
if ($numrows > 0) {
|
||||||
|
echo "<select class='form-control' id='currency' value='".'EUR'."' required>";
|
||||||
|
foreach($result->result() as $row) {
|
||||||
|
echo "<option value=".$row->code.">".$row->code.' - '.$row->name_fr."</option>";
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
}
|
||||||
|
?>");
|
||||||
|
if(index == 1)
|
||||||
|
$(this).html('<input type="number" required class="form-control" min="0" value="' + $(this).text() + '">');
|
||||||
|
});
|
||||||
|
$(this).parents("tr").find(".add, .edit").toggle();
|
||||||
|
$(".new1").attr("disabled", "disabled");
|
||||||
|
});
|
||||||
|
// Delete row on delete button click
|
||||||
|
$(document).on("click", ".delete1", function(){
|
||||||
|
$(this).parents("tr").remove();
|
||||||
|
$(".new1").removeAttr("disabled");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Page script -->
|
||||||
|
<script src="<?php echo base_url('dist/js/custom.js') ?>"></script>
|
|
@ -0,0 +1,143 @@
|
||||||
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/css/bootstrap-multiselect.css">
|
||||||
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/toastr/toastr.css') ?>">
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
<?php echo $this->lang->line('currency_management'); ?>
|
||||||
|
<input type="button" class="btn btn-primary pull-right" id="Bactiver" value="Activer/Désactiver le(s) réseau(x)" style="display: none;" />
|
||||||
|
</h1>
|
||||||
|
<?php
|
||||||
|
$site_url = base_url();
|
||||||
|
|
||||||
|
if($alert=="ok") {
|
||||||
|
|
||||||
|
if(!$success=="ok"){
|
||||||
|
?>
|
||||||
|
<div class='alert alert-danger alert-dismissible col-xs-6'>
|
||||||
|
<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>
|
||||||
|
<h4><i class='icon fa fa-ban'></i> Erreur!</h4>
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success alert-dismissible col-xs-6">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<h4><i class="icon fa fa-check"></i> Success!</h4>
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line('activated_wallets'); ?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql2 = $networks;
|
||||||
|
if($sql2!=false){
|
||||||
|
$numrows=$sql2->num_rows();
|
||||||
|
$num = 0;
|
||||||
|
if ($numrows > 0) {
|
||||||
|
?>
|
||||||
|
<table id="validated" class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th align='center'>N°</th>
|
||||||
|
<th><?php echo $this->lang->line('Reseau'); ?></th>
|
||||||
|
<th><?php echo $this->lang->line('Pays'); ?></th>
|
||||||
|
<th align='center'><?php echo $this->lang->line('currency'); ?></th>
|
||||||
|
<th align='center'><?php echo $this->lang->line('currency_code'); ?></th>
|
||||||
|
<th align='center'> Action </th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
foreach($sql2->result() as $row) {
|
||||||
|
$num ++;
|
||||||
|
//$member_code = randomString1(10);
|
||||||
|
echo "<tr>
|
||||||
|
<td align='center'>$num</td>
|
||||||
|
<td >$row->network</td>
|
||||||
|
<td>$row->country</td>";
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
?>
|
||||||
|
<td><?php echo $row->currency_name_fr; ?></td>
|
||||||
|
<td><?php echo $row->currency_code; ?></td>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
?>
|
||||||
|
<td>
|
||||||
|
<a href="<?php echo current_url().($row->id_network ? '?id='.$row->id_network : '')?>" class="btn btn-primary btn-block">
|
||||||
|
<b><?php echo $this->lang->line('show_currency_rate_conversion'); ?></b>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
echo $this->lang->line('Aucun réseau');
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
echo $this->lang->line('Aucun réseau');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="alert alert-info alert-dismissible" aria-hidden="true">-->
|
||||||
|
<!-- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
|
||||||
|
<!-- <h4><i class="icon fa fa-info"></i>Info!</h4>-->
|
||||||
|
<!-- Data is Saved-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- jQuery 3 -->
|
||||||
|
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
|
||||||
|
<!-- Bootstrap 3.3.7 -->
|
||||||
|
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
||||||
|
<!-- DataTables -->
|
||||||
|
<script src="<?php echo base_url('bower_components/datatables.net/js/jquery.dataTables.min.js') ?>"></script>
|
||||||
|
<script src="<?php echo base_url('bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') ?>"></script>
|
||||||
|
<!-- Slimscroll -->
|
||||||
|
<script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
|
||||||
|
<!-- FastClick -->
|
||||||
|
<script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script>
|
||||||
|
<!-- AdminLTE for demo purposes -->
|
||||||
|
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
|
||||||
|
<script src="<?php echo base_url('bower_components/toastr/toastr.js') ?>"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/js/bootstrap-multiselect.js"></script>
|
||||||
|
<script src="<?php echo base_url('dist/js/sweetalert2.js') ?>"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$('#validated').DataTable();
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
|
@ -0,0 +1,827 @@
|
||||||
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/jvectormap/jquery-jvectormap.css') ?>">
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="<?php echo base_url('bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') ?>">
|
||||||
|
<link rel="stylesheet" href="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.css') ?>">
|
||||||
|
<link rel="stylesheet" href="<?php echo base_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>">
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="<?php echo base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
function convertDate($date)
|
||||||
|
{
|
||||||
|
$month = null;
|
||||||
|
switch ($date) {
|
||||||
|
case "Jan":
|
||||||
|
$month = 1;
|
||||||
|
break;
|
||||||
|
case "Feb":
|
||||||
|
$month = 2;
|
||||||
|
break;
|
||||||
|
case "Mar":
|
||||||
|
$month = 3;
|
||||||
|
break;
|
||||||
|
case "Apr":
|
||||||
|
$month = 4;
|
||||||
|
break;
|
||||||
|
case "May":
|
||||||
|
$month = 5;
|
||||||
|
break;
|
||||||
|
case "Jun":
|
||||||
|
$month = 6;
|
||||||
|
break;
|
||||||
|
case "Jul":
|
||||||
|
$month = 7;
|
||||||
|
break;
|
||||||
|
case "Aug":
|
||||||
|
$month = 8;
|
||||||
|
break;
|
||||||
|
case "Sep":
|
||||||
|
$month = 9;
|
||||||
|
break;
|
||||||
|
case "Oct":
|
||||||
|
$month = 10;
|
||||||
|
break;
|
||||||
|
case "Nov":
|
||||||
|
$month = 11;
|
||||||
|
break;
|
||||||
|
case "Dec":
|
||||||
|
$month = 12;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $month;
|
||||||
|
}
|
||||||
|
|
||||||
|
$month = time();
|
||||||
|
$months[] = convertDate(date("M"));
|
||||||
|
$label_months [] = date("M") . " " . date("Y");
|
||||||
|
$years[] = date("Y");
|
||||||
|
for ($i = 1; $i <= 11; $i++) {
|
||||||
|
$month = strtotime('last month', $month);
|
||||||
|
$months [] = convertDate(date("M", $month));
|
||||||
|
$years[] = date("Y", $month);
|
||||||
|
$label_months [] = date("M", $month) . " " . date("Y", $month);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
** Retraits
|
||||||
|
**/
|
||||||
|
$date = date("Y");
|
||||||
|
|
||||||
|
$retraits_data[] = '';
|
||||||
|
$retraits_data = array();
|
||||||
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
|
$retraits_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='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 );
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
<?php echo $this->lang->line('Gestion des wallets'). ' '. $network .' - '.$country; ?>
|
||||||
|
</h1>
|
||||||
|
<?php
|
||||||
|
$site_url = base_url();
|
||||||
|
|
||||||
|
if ($alert == "ok") {
|
||||||
|
|
||||||
|
if (!$success == "ok") {
|
||||||
|
?>
|
||||||
|
<div class='alert alert-danger alert-dismissible col-xs-6'>
|
||||||
|
<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>
|
||||||
|
<h4><i class='icon fa fa-ban'></i> Erreur!</h4>
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success alert-dismissible col-xs-6">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
<h4><i class="icon fa fa-check"></i> Success!</h4>
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
<div class="row centered">
|
||||||
|
<div class="col-lg-2 col-lg-offset-2 col-xs-6">
|
||||||
|
<div class="small-box bg-aqua-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_u_w_cart; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_user_wallet_cart') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-aqua-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_u_c_w; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_user_cart_wallet') ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-aqua-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_u_c_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_user_cart_cash') ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-aqua-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_ag_d_c_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_agent_depot_cash_cart') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<!-- répartition commission du réseau opération envoi et retrait de cash-->
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-yellow-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_ag_s_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_agent_send_cash') ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_client_d" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-yellow-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_sup_s_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_sup_send_cash') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="frais_d" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-yellow-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_hyp_s_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_hyp_send_cash') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_ag_d" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-red-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_ag_r_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_agent_remove_cash') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-down"></i>
|
||||||
|
</div>
|
||||||
|
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_sup_d" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-red-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_sup_r_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_sup_remove_cash') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-down"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-red-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_hyp_r_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_sup_remove_cash') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-down"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<!--Taux commission wallet agent carte client et Taux commission wallet agent carte client-->
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-green">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_ag_cart_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_agent_cart_cash') ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-green">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_ag_cash_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_agent_cash_cart') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="frais_d" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-olive-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_ag_d_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_agent_depot_cart') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-down"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-olive-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_sup_d_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_sup_depot_cart') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-down"></i>
|
||||||
|
</div>
|
||||||
|
<!-- <a href="#" data-toggle="modal" data-target="#modal-update" data-type="taux_sup_d" class="small-box-footer openModal">Modifier <i class="fa fa-arrow-circle-right"></i></a>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-olive-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_hyp_d_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_hyp_depot_cart') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-down"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-olive-active">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_bq_d_c; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_bq_depot_cart') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-down"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<!--Taux commission wallet agent carte client et Taux commission wallet agent carte client-->
|
||||||
|
<div class="col-lg-2 col-lg-offset-2 col-xs-6">
|
||||||
|
<div class="small-box bg-orange">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_ag_r_cart; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_agent_remove_cart') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-orange">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_sup_r_cart; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_sup_remove_cart') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-orange">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_hyp_r_cart; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_hyp_remove_cart') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-xs-6">
|
||||||
|
<div class="small-box bg-orange">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?php echo $taux_bq_r_cart; ?><sup style="font-size: 20px">%</sup></h3>
|
||||||
|
<p><?php echo $this->lang->line('rate_com_bq_remove_cart') ?> </p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-arrow-up"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row centered">
|
||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line('rate_com_user_wallet_wallet_international'); ?></h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<div class="box-body table-responsive">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Min (FCFA)</th>
|
||||||
|
<th>Max (FCFA)</th>
|
||||||
|
<th>Taux (%)</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
if($plr_user_wallet_wallet!=false){
|
||||||
|
foreach($plr_user_wallet_wallet->result() as $row) {
|
||||||
|
echo "<tr>
|
||||||
|
<td>".$fmt->format($row->min)."</td>
|
||||||
|
<td>".$fmt->format($row->max)."</td>
|
||||||
|
<td>".$row->taux."</td>".'
|
||||||
|
</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line('rate_com_user_wallet_wallet_national'); ?></h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<div class="box-body table-responsive">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Min (FCFA)</th>
|
||||||
|
<th>Max (FCFA)</th>
|
||||||
|
<th>Taux (%)</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
echo "<tr>
|
||||||
|
<td>".$fmt->format($u_w_w_min)."</td>
|
||||||
|
<td>".$fmt->format($u_w_w_max)."</td>
|
||||||
|
<td>".$taux_u_w_w."</td>".'
|
||||||
|
</tr>';
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line('rate_com_user_wallet_cash_international'); ?></h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<div class="box-body table-responsive">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Min (FCFA)</th>
|
||||||
|
<th>Max (FCFA)</th>
|
||||||
|
<th>Taux (%)</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
if($plr_user_wallet_cash!=false){
|
||||||
|
foreach($plr_user_wallet_cash->result() as $row) {
|
||||||
|
echo "<tr>
|
||||||
|
<td>".$fmt->format($row->min)."</td>
|
||||||
|
<td>".$fmt->format($row->max)."</td>
|
||||||
|
<td>".$row->taux."</td>".'
|
||||||
|
</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line('rate_com_user_wallet_cash_national'); ?></h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<div class="box-body table-responsive">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Min (FCFA)</th>
|
||||||
|
<th>Max (FCFA)</th>
|
||||||
|
<th>Taux (%)</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
echo "<tr>
|
||||||
|
<td>".$fmt->format($u_w_c_min)."</td>
|
||||||
|
<td>".$fmt->format($u_w_c_max)."</td>
|
||||||
|
<td>".$taux_u_w_c."</td>".'
|
||||||
|
</tr>';
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line('rate_com_agent_depot_wallet_international'); ?></h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<div class="box-body table-responsive">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Min (FCFA)</th>
|
||||||
|
<th>Max (FCFA)</th>
|
||||||
|
<th>Taux (%)</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
if($plr_agent_depot_wallet!=false){
|
||||||
|
foreach($plr_agent_depot_wallet->result() as $row) {
|
||||||
|
echo "<tr>
|
||||||
|
<td>".$fmt->format($row->min)."</td>
|
||||||
|
<td>".$fmt->format($row->max)."</td>
|
||||||
|
<td>".$row->taux."</td>".'
|
||||||
|
</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line('rate_com_agent_depot_wallet_national'); ?></h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<div class="box-body table-responsive">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Min (FCFA)</th>
|
||||||
|
<th>Max (FCFA)</th>
|
||||||
|
<th>Taux (%)</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
echo "<tr>
|
||||||
|
<td>".$fmt->format($ag_d_w_min)."</td>
|
||||||
|
<td>".$fmt->format($ag_d_w_max)."</td>
|
||||||
|
<td>".$taux_ag_d_w."</td>".'
|
||||||
|
</tr>';
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-xs-12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line('rate_com_agent_cash_cash_international'); ?></h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<div class="box-body table-responsive">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Min (FCFA)</th>
|
||||||
|
<th>Max (FCFA)</th>
|
||||||
|
<th>Taux (%)</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
if($plr_agent_cash_cash!=false){
|
||||||
|
foreach($plr_agent_cash_cash->result() as $row) {
|
||||||
|
echo "<tr>
|
||||||
|
<td>".$fmt->format($row->min)."</td>
|
||||||
|
<td>".$fmt->format($row->max)."</td>
|
||||||
|
<td>".$row->taux."</td>".'
|
||||||
|
</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
|
</div>
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line('rate_com_agent_cash_cash_national'); ?></h3>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
<div class="box-body table-responsive">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Min (FCFA)</th>
|
||||||
|
<th>Max (FCFA)</th>
|
||||||
|
<th>Taux (%)</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
echo "<tr>
|
||||||
|
<td>".$fmt->format($ag_c_c_min)."</td>
|
||||||
|
<td>".$fmt->format($ag_c_c_max)."</td>
|
||||||
|
<td>".$taux_ag_c_c."</td>".'
|
||||||
|
</tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-body -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="box box-success">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<h3 class="box-title">
|
||||||
|
<?php echo $this->lang->line('Historique des 12 derniers mois'); ?></h3>
|
||||||
|
<div class="box-tools">
|
||||||
|
<a class="btn btn-primary" href="<?php echo current_url().($network_id ? '?id='.$network_id . '&history=transaction' : '')?>">
|
||||||
|
<?php echo $this->lang->line('transactions_historic'); ?>
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-info" href="<?php echo current_url().($network_id ? '?id='.$network_id . '&history=recharge' : '')?>">
|
||||||
|
<?php echo $this->lang->line('recharge_historic'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="chart" id="chart">
|
||||||
|
<canvas id="barChart" style="height:230px"></canvas>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="box box-danger">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<h3 class="box-title">
|
||||||
|
<?php echo $this->lang->line("Parts dépots & retraits"); ?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="box-body" id="chart2">
|
||||||
|
<canvas id="pieChart" style="height:250px"></canvas>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?php echo $this->lang->line('Commission Hyperviseur') ?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<table id="example1" class="table table-bordered table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
echo "<th>".$this->lang->line('Nom')."</th>
|
||||||
|
<th>".$this->lang->line('Solde Principal')."</th>
|
||||||
|
<th>".$this->lang->line('Solde Commission')."</th>
|
||||||
|
<th>".$this->lang->line('Commission banque')."</th>
|
||||||
|
<th>".$this->lang->line('DEPOT'). 's'."</th>
|
||||||
|
<th>".$this->lang->line('RETRAIT').'s'."</th>";
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
if ($walletHyper) {
|
||||||
|
$fmt = new NumberFormatter( 'fr_FR', NumberFormatter::DECIMAL );
|
||||||
|
echo "<tr>
|
||||||
|
<td>" . $walletHyper->first_row()->lastname . "</td>
|
||||||
|
<td>" . $fmt->format($walletHyper->first_row()->balance_princ) . "</td>
|
||||||
|
<td>" . $fmt->format($walletHyper->first_row()->balance_com) . "</td>
|
||||||
|
<td>" . $fmt->format($totalCommissionBanque) . "</td>";
|
||||||
|
|
||||||
|
echo "<td>" . $depots->num_rows() . "</td>
|
||||||
|
<td>" . $retraits->num_rows() . "</td>
|
||||||
|
</tr>";
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<!-- jQuery 3 -->
|
||||||
|
<script src="<?php echo base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
|
||||||
|
<!-- Bootstrap 3.3.7 -->
|
||||||
|
<script src="<?php echo base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
||||||
|
<!-- DataTables -->
|
||||||
|
<script src="<?php echo base_url('bower_components/datatables.net/js/jquery.dataTables.min.js') ?>"></script>
|
||||||
|
<script src="<?php echo base_url('bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') ?>"></script>
|
||||||
|
<!-- Slimscroll -->
|
||||||
|
<script src="<?php echo base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
|
||||||
|
<!-- FastClick -->
|
||||||
|
<script src="<?php echo base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="<?php echo base_url('dist/js/adminlte.min.js') ?>"></script>
|
||||||
|
<!-- AdminLTE for demo purposes -->
|
||||||
|
<script src="<?php echo base_url('dist/js/demo.js') ?>"></script>
|
||||||
|
|
||||||
|
<script src="<?php echo base_url('bower_components/moment/min/moment.min.js') ?>"></script>
|
||||||
|
<script src="<?php echo base_url('bower_components/bootstrap-daterangepicker/daterangepicker.js') ?>"></script>
|
||||||
|
<script
|
||||||
|
src="<?php echo base_url('bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js') ?>"></script>
|
||||||
|
<scriptf
|
||||||
|
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></scriptf>
|
||||||
|
<!-- ChartJS -->
|
||||||
|
<script src="<?php echo base_url('bower_components/chart.js/Chart.js') ?>"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
$('#example1').DataTable();
|
||||||
|
// $('#example1').DataTable({
|
||||||
|
// "aLengthMenu": [[5, 10, 15, -1], [5, 10, 5, "All"]],
|
||||||
|
// "iDisplayLength": 5
|
||||||
|
// });
|
||||||
|
// $('#example2').DataTable({
|
||||||
|
// 'paging' : true,
|
||||||
|
// 'lengthChange': false,
|
||||||
|
// 'searching' : false,
|
||||||
|
// 'ordering' : true,
|
||||||
|
// 'info' : true,
|
||||||
|
// 'autoWidth' : false
|
||||||
|
// })
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var areaChartData = {
|
||||||
|
labels: <?php echo json_encode($label_months) ?>,
|
||||||
|
datasets: [
|
||||||
|
{
|
||||||
|
label: 'Electronics',
|
||||||
|
fillColor: 'rgba(255, 162, 0, 1)',
|
||||||
|
strokeColor: 'rgba(255, 162, 0, 1)',
|
||||||
|
pointColor: 'rgba(255, 162, 0, 1)',
|
||||||
|
pointStrokeColor: '#ffa200',
|
||||||
|
pointHighlightFill: '#fff',
|
||||||
|
pointHighlightStroke: 'rgba(220,220,220,1)',
|
||||||
|
data: <?php echo json_encode($depots_data) ?>
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Digital Goods',
|
||||||
|
fillColor: 'rgba(0, 187, 255, 1)',
|
||||||
|
strokeColor: 'rgba(0, 187, 255, 1)',
|
||||||
|
pointColor: '#00bbff',
|
||||||
|
pointStrokeColor: 'rgba(0, 187, 255, 1)',
|
||||||
|
pointHighlightFill: '#fff',
|
||||||
|
pointHighlightStroke: 'rgba(0, 187, 255, 1)',
|
||||||
|
data: <?php echo json_encode($retraits_data) ?>
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
var Pie = '<?php echo json_encode($pieChart) ?>';
|
||||||
|
if (Pie === '[]') {
|
||||||
|
var select = document.getElementById('chart2');
|
||||||
|
$(select.children).hide();
|
||||||
|
$(select).append("<p>Aucune transaction</p>");
|
||||||
|
} else {
|
||||||
|
Pie = JSON.parse(Pie);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<!-- Page script -->
|
||||||
|
<script src="<?php echo base_url('dist/js/custom.js') ?>"></script>
|
File diff suppressed because it is too large
Load Diff
|
@ -84,7 +84,7 @@
|
||||||
}else{
|
}else{
|
||||||
?>
|
?>
|
||||||
<td><span class="label label-danger"><?php echo $this->lang->line('Inactif'); ?></span></td>
|
<td><span class="label label-danger"><?php echo $this->lang->line('Inactif'); ?></span></td>
|
||||||
<td><button type="button" data-network-id="<?php echo $row->id ?>" class="btn btn-primary enableWallet" ><?php echo $this->lang->line('Activer'); ?></button></td>
|
<td><button type="button" data-network-id="<?php echo $row->id ?>" data-toggle="modal" data-target="#enableWallet" class="btn btn-primary openModal" ><?php echo $this->lang->line('Activer'); ?></button></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -114,7 +114,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" id="disableWallet" tabindex="-1" role="dialog" aria-hidden="true">
|
<div class="modal fade" id="disableWallet" tabindex="-1" role="dialog" aria-hidden="true">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -131,6 +130,27 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="modal fade" id="enableWallet" tabindex="-1" role="dialog" aria-hidden="true">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h3 class="modal-title"><?php echo $this->lang->line('choose_wallet_type'); ?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="login-box">
|
||||||
|
<div class="login-box-body">
|
||||||
|
<button type="button" class="btn btn-primary enableWallet" style="width: 100% ; margin-bottom: 15px" value="visa" data-dismiss="modal">VISA</button>
|
||||||
|
<button type="button" class="btn btn-primary enableWallet" value="ilink" style="width: 100%" data-dismiss="modal">ILINK WORLD</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo $this->lang->line('Fermer'); ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- <div class="alert alert-info alert-dismissible" aria-hidden="true">-->
|
<!-- <div class="alert alert-info alert-dismissible" aria-hidden="true">-->
|
||||||
<!-- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
|
<!-- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
|
||||||
<!-- <h4><i class="icon fa fa-info"></i>Info!</h4>-->
|
<!-- <h4><i class="icon fa fa-info"></i>Info!</h4>-->
|
||||||
|
@ -177,12 +197,13 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on("click", ".enableWallet", function () {
|
$(document).on("click", ".enableWallet", function () {
|
||||||
const network_id = $(this).data('network-id');
|
// const network_id = $(this).data('network-id');
|
||||||
|
const type = $(this).val();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : '<?php echo base_url('index.php/Gestion/config_wallet/create')?>',
|
url : '<?php echo base_url('index.php/Gestion/config_wallet/create')?>',
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
dataType : 'json',
|
dataType : 'json',
|
||||||
data: {"network_id": network_id},
|
data: {"network_id": network_id , "type" : type},
|
||||||
success : function(data){
|
success : function(data){
|
||||||
if(data=='200'){
|
if(data=='200'){
|
||||||
|
|
||||||
|
@ -248,5 +269,4 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -147,11 +147,16 @@
|
||||||
<i class="glyphicon glyphicon-credit-card"></i> <span>Wallet</span>
|
<i class="glyphicon glyphicon-credit-card"></i> <span>Wallet</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<!--<li class="<?php //if($active=="map"){echo "active";} ?>">
|
<!-- <li class="--><?php ////if($active=="map"){echo "active";} ?><!--">-->
|
||||||
<a href="<?php //echo base_url('index.php/Gestion/map') ?>">
|
<!-- <a href="--><?php ////echo base_url('index.php/Gestion/map') ?><!--">-->
|
||||||
<i class="glyphicon glyphicon-map-marker"></i> <span>Carte</span>
|
<!-- <i class="glyphicon glyphicon-map-marker"></i> <span>Carte</span>-->
|
||||||
|
<!-- </a>-->
|
||||||
|
<!-- </li>-->
|
||||||
|
<li class="<?php if($active=="currency"){echo "active";} ?>">
|
||||||
|
<a href="<?php echo base_url('index.php/Gestion/currency') ?>">
|
||||||
|
<i class="ion ion-cash"></i> <span><?php echo $this->lang->line('currency'); ?></span>
|
||||||
</a>
|
</a>
|
||||||
</li>-->
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
<!-- /.sidebar -->
|
<!-- /.sidebar -->
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
if($row->type_transac == 'credit'){
|
if($row->type_transac == 'credit'){
|
||||||
$commission = ( $row->montant * $config->taux_com_client_depot / 100 ) + $config->frais_min_banque_depot;
|
$commission = ( $row->montant * $config->taux_com_client_depot / 100 ) + $config->frais_min_banque_depot;
|
||||||
$net = $row->montant - $commission;
|
$net = $row->montant - $commission;
|
||||||
$banque = $row->montant - $config->frais_min_banque_depot;
|
$banque = $row->montant * (1 - ($config->taux_com_client_depot / 100));
|
||||||
}else{
|
}else{
|
||||||
$net = $row->montant ;
|
$net = $row->montant ;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue