diff --git a/application/controllers/Gestion.php b/application/controllers/Gestion.php index 863b63ba..648eebce 100755 --- a/application/controllers/Gestion.php +++ b/application/controllers/Gestion.php @@ -1924,6 +1924,7 @@ class Gestion extends CI_Controller $data['currency_name_en'] = $networkDetails->first_row()->currency_name_en; $data['currency_code'] = $networkDetails->first_row()->currency_code; } + $data['id_network'] = $network_id; $this->load->view('header_gestion', $data); if ($type == 'transaction') $this->load->view('historique_transactions'); @@ -2081,6 +2082,8 @@ class Gestion extends CI_Controller if ($this->input->get('history')) { $this->historique_nano_credit($data['network_id'], $this->input->get('d'), $this->input->get('f'), $this->input->get('history')); + } elseif ($this->input->get('group')) { + $this->users_group_details($data['network_id'],$this->input->get('group')); } else { $data['groups'] = $this->nano_credit_model->getUsersGroups($data['network_id']); $data['configWallet'] = $this->wallet_model->getConfigWallet($data['network_id'])->first_row(); @@ -2122,12 +2125,13 @@ class Gestion extends CI_Controller if ($type == 'nano_credit') { $data['transactions'] = $this->nano_credit_model->getUserDemandesCredit($startDate, $endDate, $network_id); } else if ($type == 'savings') { - $data['transactions'] = $this->wallet_model->getIlinkTransactions($startDate, $endDate, $network_id); + $data['transactions'] = $this->nano_credit_model->getUsersSavings($startDate, $endDate, $network_id); } $data['active'] = "nano_credit"; $data['alert'] = ""; $data['networks'] = $this->wallet_model->getAllActivatedNetworks(); $data['game_pays'] = $this->user_model->getGameCountry(); + $data['id_network'] = $network_id; $networkDetails = $this->user_model->getNetworkDetails($network_id); if ($networkDetails) { $data['network'] = $networkDetails->first_row()->network; @@ -2137,13 +2141,51 @@ class Gestion extends CI_Controller $data['currency_code'] = $networkDetails->first_row()->currency_code; } $this->load->view('header_gestion', $data); - if ($type == 'epargne') + if ($type == 'savings') $this->load->view('nano_credit/historique_savings'); else $this->load->view('nano_credit/historique_nano_credit'); $this->load->view('footer'); } + private function users_group_details($network_id , $group_code) + { + $data['active'] = "nano_credit"; + $data['alert'] = ""; + $data['game_pays'] = $this->user_model->getGameCountry(); + + + $networkDetails = $this->user_model->getNetworkDetails($network_id); + if ($networkDetails) { + $data['network'] = $networkDetails->first_row()->network; + $data['country'] = $networkDetails->first_row()->country; + $data['currency_code'] = $networkDetails->first_row()->currency_code; + } + + + $data['category'] = $this->session->userdata('category'); + $data['members'] = $this->nano_credit_model->getGroupMembers($group_code); + $data['group'] = $this->nano_credit_model->getGroup($group_code); + + //Calcul de la capacite d'emprunt + $CE = 0; + if($data['members']){ + $sommeCredits = 0; + $sommeEpargnes = 0; + foreach ($data['members']->result() as $user){ + $sommeCredits += $user->balance_credit; + $sommeEpargnes += $user->balance_epargne; + } + $CE = $sommeEpargnes - $sommeCredits; + } + + $data['CE'] = $CE; + $data['group_code'] = $group_code; + $this->load->view('header_gestion', $data); + $this->load->view('nano_credit/users_group_detail'); + $this->load->view('footer'); + } + public function activate_nano_credit() { if ($this->isLogged()) { diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php index 4fbcb392..24a31d5e 100755 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -463,6 +463,7 @@ class Hyperviseur_dash extends CI_Controller $data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id')); $data['country'] = $this->session->userdata('current_pays'); $data['category'] = $this->session->userdata('category'); + $data['id_network'] = $network_id; $this->load->view('header_hyp', $data); if ($type == 'transaction') diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php index 3dd40316..28200b88 100755 --- a/application/language/english/message_lang.php +++ b/application/language/english/message_lang.php @@ -501,5 +501,6 @@ $lang['max_amount_per_month'] = "Maximum amount per month"; $lang['define_the_limits'] = "Define the limits"; $lang['regulations_updated'] = 'Regulatory limits updated'; $lang['refunded_amount'] = "Amount refunded"; -$lang['remains_to_be_reimbursed'] = "Remainder to reimburse" +$lang['remains_to_be_reimbursed'] = "Remainder to reimburse"; +$lang['end_date'] = "End date"; ?> diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index 40dfed68..d3aaec34 100755 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -513,5 +513,6 @@ $lang['max_amount_per_month'] = "Montant maximum par mois"; $lang['define_the_limits'] = "Definir les limites"; $lang['regulations_updated'] = 'Limites réglementaires mis à jour'; $lang['refunded_amount'] = "Montant remboursé"; -$lang['remains_to_be_reimbursed'] = "Reste à rembourser" +$lang['remains_to_be_reimbursed'] = "Reste à rembourser"; +$lang['end_date'] = "Date de fin"; ?> diff --git a/application/views/config_wallet_ilink_hyp/etat_soldes.php b/application/views/config_wallet_ilink_hyp/etat_soldes.php index c0e7e435..fda0565e 100755 --- a/application/views/config_wallet_ilink_hyp/etat_soldes.php +++ b/application/views/config_wallet_ilink_hyp/etat_soldes.php @@ -8,14 +8,12 @@ lang->line('balance_statement') ?>"+' - Date : ' + moment().format("dddd, Do MMMM YYYY, h:mm:ss") }, { extend: 'csvHtml5', - title: 'Etat des soldes - Date : ' + moment().format("dddd, Do MMMM YYYY, h:mm:ss") + title: "= $this->lang->line('balance_statement') ?>"+' - Date : ' + moment().format("dddd, Do MMMM YYYY, h:mm:ss") }, { extend: 'pdfHtml5', orientation: 'portrait', pageSize: 'LEGAL', - title: 'Etat des soldes - Date : ' + moment().format("dddd, Do MMMM YYYY, h:mm:ss") + title: "= $this->lang->line('balance_statement') ?>"+' - Date : ' + moment().format("dddd, Do MMMM YYYY, h:mm:ss") } ] }); diff --git a/application/views/historique_recharges.php b/application/views/historique_recharges.php index 8bc6c6bc..c56e1186 100755 --- a/application/views/historique_recharges.php +++ b/application/views/historique_recharges.php @@ -5,7 +5,9 @@
" . $this->lang->line('Nom') . " | " . $this->lang->line('creator') . " | " . $this->lang->line('credit_limit') . " | -Sponsor 1 | -Sponsor 2 | -Sponsor 3 | Status | -" . $this->lang->line('created_date') . " | "; - ?> - +" . $this->lang->line('number_of_users') . " | +" . $this->lang->line('created_date') . " | +Action | "; + ?> + - - result() as $row) { - echo "
---|---|---|---|---|---|---|---|---|---|
" . $row->code_groupe . " | " . $row->nom . " | " . $row->createur . " | " . Money::of(round($row->limite_credit, 2), $row->currency_code, $context)->formatTo('fr_FR') . " | -" . $row->sponsor1 . " | -" . $row->sponsor2 . " | -" . $row->sponsor3 . " | "; - ?> - actif) { - ?> -- lang->line('Actif') ?> - | - -- lang->line('Inactif') ?> - | - -= $row->date_creation ?> | -+ lang->line('Actif') ?> + | + ++ lang->line('Inactif') ?> + | - += $row->nombre_utilisateurs?> | + += $row->date_creation ?> | ++ id_network) echo "disabled"?> > + lang->line('Voir plus...'); ?> + + | + + + +