diff --git a/application/controllers/ControllerDoctor.php b/application/controllers/ControllerDoctor.php new file mode 100755 index 00000000..099d4cd9 --- /dev/null +++ b/application/controllers/ControllerDoctor.php @@ -0,0 +1,77 @@ +load->model('nano_health_model'); + } + + public function index() + { + if ($this->isLogged()){ + $data['active'] = "dashboard"; + $data['network_id'] = $data['id_network'] = $this->session->userdata('network_id'); + + if ($this->input->get('history')) { + $history_type = $this->input->get('history'); + $id = $this->input->get('id'); + if($history_type == 'invoices' && !empty($id)){ + $data['active'] = "invoices"; + $data['invoice'] = $this->nano_health_model->getInfosInvoiceById($id); + $data['agent'] = $this->db->get_where('agent_plus',['code_membre'=> $data['invoice']->institution_code ?? null])->first_row(); + $data['health_care_sheets'] = $this->db->get_where('nh_infos_health_care_sheets',['invoice_id'=> $id]); + $this->load->view('nano_health/controller_doctor/header', $data); + $this->load->view('nano_health/controller_doctor/infos_invoice', $data); + $this->load->view('footer'); + }else{ + $this->historique($this->input->get('d'), $this->input->get('f'), $this->input->get('history'), $data); + } + }else{ + + $data['count_accepted'] = $this->nano_health_model->getCountInvoices(null,$this->session->userdata('agent_id'), 'ACCEPTED'); + $data['count_accepted_modified'] = $this->nano_health_model->getCountInvoices(null, $this->session->userdata('agent_id'), 'ACCEPTED_MODIFIED'); + $data['count_rejected'] = $this->nano_health_model->getCountInvoices(null,$this->session->userdata('agent_id'), 'REJECTED'); + $data['count_under_validation'] = $this->nano_health_model->getCountInvoices($data['network_id'],null, 'UNDER_VALIDATION'); + + $this->load->view('nano_health/controller_doctor/header', $data); + $this->load->view('nano_health/controller_doctor/dashboard', $data); + $this->load->view('footer'); + } + } + + } + + private function historique($startDate, $endDate,$type , $data) + { + + $format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d'; + $data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null; + $data['endDate'] = $endDate ? date($format, strtotime($endDate)) : null; + $endDate = Date('Y-m-d', strtotime($endDate . "+1 day")); + + if ($type == 'invoices') + $data['active'] = 'invoices'; + + $this->load->view('nano_health/controller_doctor/header', $data); + if ($type == 'invoices') + $this->load->view('nano_health/controller_doctor/invoices'); + $this->load->view('footer'); + } + + private function isLogged() + { + if (!$this->session->userdata('email')) { + $this->session->set_flashdata('error', 'log in first'); + + $data['alert'] = "ok"; + $data['message'] = "Login first!"; + + redirect('index.php', $data); + return false; + } + return true; + } +} diff --git a/application/controllers/Gestion.php b/application/controllers/Gestion.php index 7c4b1c9b..17c23245 100755 --- a/application/controllers/Gestion.php +++ b/application/controllers/Gestion.php @@ -1,5 +1,5 @@ isLogged()) { + { + if ($this->isLogged()) { if (isset($_POST)) { $villes = $this->input->post('villes'); @@ -69,7 +70,7 @@ class Gestion extends CI_Controller public function update() { -if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $id_country = $this->input->post('id_country'); @@ -89,7 +90,7 @@ if($this->isLogged()) { public function activer_desactiver() { -if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $aVilles = $this->input->post('aVilles'); @@ -126,7 +127,8 @@ if($this->isLogged()) { } public function desactiver() - {if($this->isLogged()) { + { + if ($this->isLogged()) { if (isset($_POST)) { $villes = $this->input->post('villes'); @@ -148,7 +150,8 @@ if($this->isLogged()) { } public function suppress() - {if($this->isLogged()) { + { + if ($this->isLogged()) { if (isset($_POST)) { $villes = $this->input->post('ville'); @@ -243,7 +246,7 @@ if($this->isLogged()) { public function creat_network() { -if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $network = $this->input->post('new_network'); @@ -263,13 +266,13 @@ if($this->isLogged()) { public function assignation() { -if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $network = $this->input->post('network'); $existe = 0; $this->db->trans_begin(); - foreach ($_POST['id_country'] AS $country) { + foreach ($_POST['id_country'] as $country) { $res = $this->user_model->checkIfAssignationExiste($country, $network); if ($res == false) { @@ -298,7 +301,7 @@ if($this->isLogged()) { public function update_network() { -if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $old_network = $this->input->post('old_name'); @@ -317,7 +320,7 @@ if($this->isLogged()) { public function change_status_network() { -if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $activations = $this->input->post('activations'); @@ -325,7 +328,7 @@ if($this->isLogged()) { $this->db->trans_begin(); if (!empty($_POST['activations'])) { - foreach ($_POST['activations'] AS $network) { + foreach ($_POST['activations'] as $network) { $data = array('status' => 1); $this->db->where('id', $network); @@ -334,7 +337,7 @@ if($this->isLogged()) { } } if (!empty($_POST['desactivations'])) { - foreach ($_POST['desactivations'] AS $network) { + foreach ($_POST['desactivations'] as $network) { $data = array('status' => 0); $this->db->where('id', $network); @@ -385,7 +388,7 @@ if($this->isLogged()) { public function create_admin() { - if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $category = 1; $firstname = $this->input->post('prenom'); @@ -437,7 +440,7 @@ if($this->isLogged()) { public function modif_admin() { -if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $id = $this->input->post('id'); @@ -462,7 +465,7 @@ if($this->isLogged()) { public function delete_admin() { - if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $id = $this->input->post('id'); @@ -480,7 +483,7 @@ if($this->isLogged()) { public function codes() { - if($this->isLogged()) { + if ($this->isLogged()) { $ville = $this->session->userdata('current_ville'); $hyper = $this->session->userdata('current_hyper'); $pays = $this->session->userdata('current_pays'); @@ -562,7 +565,7 @@ if($this->isLogged()) { private function randomString($length = 10) { - do{ + do { $str = ""; $characters = array_merge(range('A', 'Z'), range('a', 'z'), range('0', '9')); $max = count($characters) - 1; @@ -570,8 +573,8 @@ if($this->isLogged()) { $rand = mt_rand(0, $max); $str .= $characters[$rand]; } - $q = $this->db->get_where('codeGenerer',['code_membre' => $str]); - }while($q->num_rows() != 0); + $q = $this->db->get_where('codeGenerer', ['code_membre' => $str]); + } while ($q->num_rows() != 0); return $str; } @@ -601,7 +604,7 @@ if($this->isLogged()) { $network_geolocalisation = array(); $count = 0; - if($data['networks']) { + if ($data['networks']) { foreach ($data['networks']->result() as $row) { $number_geolocalisation[$count] = $this->user_model->getPointGeolocalised($row->id, $data['current_agent']); $network_geolocalisation[$count] = $row->name; @@ -622,7 +625,7 @@ if($this->isLogged()) { public function infos_geolocalisation() { -if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $pays = $this->input->post('pays'); @@ -643,7 +646,7 @@ if($this->isLogged()) { $network_geolocalisation = array(); $count = 0; - if($data['networks']) { + if ($data['networks']) { foreach ($data['networks']->result() as $row) { $number_geolocalisation[$count] = $this->user_model->getPointGeolocalised($row->id, $lastname); $network_geolocalisation[$count] = $row->name; @@ -756,12 +759,12 @@ if($this->isLogged()) { $networks_name[] = null; if ($data['agent'] != false) { - foreach ($data['agent']->result() AS $row1) { + foreach ($data['agent']->result() as $row1) { if (!strstr($row1->lastname, "Super -") and !strstr($row1->lastname, "Airtel")) { $totalGeo = 0; $totalGeoCorrect = 0; $agent[$countA][0] = $row1->lastname; - foreach ($data['networks']->result() AS $row2) { + foreach ($data['networks']->result() as $row2) { $number_geolocalisation [$countA][$count] = $this->user_model->getPointGeolocalisedByDate($row2->id, $row1->lastname, $debut, $fin); $number_correct [$countA][$count] = $this->user_model->getCorrectPointGeolocalisedByDate($row2->id, $row1->lastname, $debut, $fin); $network_geolocalisation [$countA][$count] = $row2->name; @@ -780,7 +783,7 @@ if($this->isLogged()) { } } - foreach ($data['networks']->result() AS $row) { + foreach ($data['networks']->result() as $row) { $networks_compte[$network_count] = $this->user_model->getPointGeolocalisedByNetwork($row->id, $debut, $fin); $networks_name[$network_count] = $row->name; $network_count++; @@ -813,7 +816,7 @@ if($this->isLogged()) { public function redirect_info_agent() { -if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_GET)) { $lastname = $this->input->get('agent'); @@ -834,7 +837,7 @@ if($this->isLogged()) { $network_geolocalisation = array(); $count = 0; - foreach ($data['networks']->result() AS $row) { + foreach ($data['networks']->result() as $row) { $number_geolocalisation[$count] = $this->user_model->getPointGeolocalisedByDate($row->id, $lastname, $debut, $fin); $network_geolocalisation[$count] = $row->name; $count++; @@ -902,7 +905,7 @@ if($this->isLogged()) { $data['q2'] = $this->user_model->getQuota(2); $data['q3'] = $this->user_model->getQuota(3); $data['q4'] = $this->user_model->getQuota(4); - $data['list'] = $this->user_model->getMembers($pays,$data['q1']); + $data['list'] = $this->user_model->getMembers($pays, $data['q1']); $data['quota1'] = $this->user_model->getCoutForQuota($pays, $data['q1'], $data['q2']); $data['quota2'] = $this->user_model->getCoutForQuota($pays, $data['q2'], $data['q3']); $data['quota3'] = $this->user_model->getCoutForQuota($pays, $data['q3'], $data['q4']); @@ -919,7 +922,8 @@ if($this->isLogged()) { } public function activerGame() - {if($this->isLogged()) { + { + if ($this->isLogged()) { if (isset($_POST)) { $pays = $this->input->post('pays'); @@ -951,7 +955,8 @@ if($this->isLogged()) { } public function desactiverGame() - {if($this->isLogged()) { + { + if ($this->isLogged()) { if (isset($_POST)) { $pays = $this->input->post('pays'); @@ -1030,7 +1035,8 @@ if($this->isLogged()) { } public function modifierPalier() - {if($this->isLogged()) { + { + if ($this->isLogged()) { if (isset($_POST)) { $n1 = $this->input->post('n1'); @@ -1134,7 +1140,7 @@ if($this->isLogged()) { public function get_user() { - if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $nom = $this->input->post('nom'); @@ -1226,7 +1232,7 @@ if($this->isLogged()) { public function update_info_user() { -if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $id = $_POST['user_id']; $phone = $_POST['contact']; @@ -1247,7 +1253,7 @@ if($this->isLogged()) { public function update_info_geolocated() { -if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $id_agent = $_POST['user_id']; $id_netAg = $_POST['id_netAg']; @@ -1256,9 +1262,9 @@ if($this->isLogged()) { $adresse = $_POST['adresse']; $email = $_POST['email']; $nom = $_POST['nom']; - if($this->user_model->isAgentPhoneExist($id_netAg,$phone,$transac)){ + if ($this->user_model->isAgentPhoneExist($id_netAg, $phone, $transac)) { echo json_encode("400"); - }else{ + } else { $res = $this->user_model->update_geolocated_infos($nom, $adresse, $email, $id_agent, $transac, $phone, $id_netAg); if ($res != false) { echo json_encode("200"); @@ -1297,7 +1303,7 @@ if($this->isLogged()) { public function changePubState() { -if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $id_pub = $_POST['pub_id']; $etat = $_POST['etat']; @@ -1318,7 +1324,8 @@ if($this->isLogged()) { } public function addPubRow() - {if($this->isLogged()) { + { + if ($this->isLogged()) { if (isset($_POST)) { $id_country = $_POST['country_id']; $res = $this->user_model->createPubRow($id_country); @@ -1347,16 +1354,16 @@ if($this->isLogged()) { if ($this->input->get('id')) { $network_id = $this->input->get('id'); - if($this->input->get('history')){ - $this->historique($network_id,$this->input->get('d'),$this->input->get('f'),$this->input->get('history')); - }else{ + if ($this->input->get('history')) { + $this->historique($network_id, $this->input->get('d'), $this->input->get('f'), $this->input->get('history')); + } else { $taux = $this->user_model->getTaux($network_id); $data['currency'] = $this->wallet_model->getCurrency($network_id); if ($taux != null) { $taux = $taux->first_row(); $data['idConfig'] = $taux->id; $data['type'] = $taux->type; - if ($taux->type == 'visa'){ + if ($taux->type == 'visa') { $data['taux_client_r'] = $taux->taux_com_client_retrait; $data['taux_client_d'] = $taux->taux_com_client_depot; $data['taux_ag_r'] = $taux->taux_com_ag_retrait; @@ -1367,26 +1374,26 @@ if($this->isLogged()) { $data['taux_bq_r'] = $taux->part_banque_retrait; $data['frais_d'] = $taux->frais_min_banque_depot; - $data['transactions'] = $this->user_model->getTransactions(null,null,$network_id); + $data['transactions'] = $this->user_model->getTransactions(null, null, $network_id); $totalCommissionBanque = 0; - if($data['transactions']){ + if ($data['transactions']) { foreach ($data['transactions']->result() as $row) { $totalCommissionBanque += $row->commission_banque; } } - $data['totalCommissionBanque'] = $totalCommissionBanque ; + $data['totalCommissionBanque'] = $totalCommissionBanque; - } elseif ($taux->type == 'ilink'){ + } elseif ($taux->type == 'ilink') { $data['plr_user_wallet_wallet'] = $this->wallet_model->getPalierConfigWallet("user_wallet_wallet_international", $data['idConfig']); $data['plr_user_wallet_cash'] = $this->wallet_model->getPalierConfigWallet("user_wallet_cash_international", $data['idConfig']); - $data['plr_agent_depot_wallet_ilink'] = $this->wallet_model->getPalierConfigWallet("agent_depot_wallet_ilink_international" , $data['idConfig']); - $data['plr_agent_depot_autre_wallet'] = $this->wallet_model->getPalierConfigWallet("agent_depot_autre_wallet_international" , $data['idConfig']); + $data['plr_agent_depot_wallet_ilink'] = $this->wallet_model->getPalierConfigWallet("agent_depot_wallet_ilink_international", $data['idConfig']); + $data['plr_agent_depot_autre_wallet'] = $this->wallet_model->getPalierConfigWallet("agent_depot_autre_wallet_international", $data['idConfig']); $data['plr_agent_cash_cash'] = $this->wallet_model->getPalierConfigWallet("agent_cash_cash_international", $data['idConfig']); $data['plr_user_wallet_wallet_national'] = $this->wallet_model->getPalierConfigWallet("user_wallet_wallet_national", $data['idConfig']); $data['plr_user_wallet_cash_national'] = $this->wallet_model->getPalierConfigWallet("user_wallet_cash_national", $data['idConfig']); - $data['plr_agent_depot_wallet_ilink_national'] = $this->wallet_model->getPalierConfigWallet("agent_depot_wallet_ilink_national" , $data['idConfig']); - $data['plr_agent_depot_autre_wallet_national'] = $this->wallet_model->getPalierConfigWallet("agent_depot_autre_wallet_national" , $data['idConfig']); + $data['plr_agent_depot_wallet_ilink_national'] = $this->wallet_model->getPalierConfigWallet("agent_depot_wallet_ilink_national", $data['idConfig']); + $data['plr_agent_depot_autre_wallet_national'] = $this->wallet_model->getPalierConfigWallet("agent_depot_autre_wallet_national", $data['idConfig']); $data['plr_agent_cash_cash_national'] = $this->wallet_model->getPalierConfigWallet("agent_cash_cash_national", $data['idConfig']); $data['taxes'] = $this->wallet_model->getTaxes($data['idConfig']); @@ -1423,43 +1430,43 @@ if($this->isLogged()) { } $data["totalCommissionBanque"] = $totalCommissionBanque; - }elseif ($taux->type == 'autre') { + } elseif ($taux->type == 'autre') { $res = $this->wallet_model->getSharingRateByNetwork($network_id); - $data['commission'] = $res ? $res->first_row()->balance_com : 0 ; - }elseif($taux->type == 'ilink_sante'){ + $data['commission'] = $res ? $res->first_row()->balance_com : 0; + } elseif ($taux->type == 'ilink_sante') { $nh_config = $this->nano_health_model->getConfig($network_id); - $data['nh_config'] = $nh_config ? $nh_config->first_row() : null ; - $data['config_id'] = $data['nh_config'] ? $data['nh_config']->id : null ; + $data['nh_config'] = $nh_config ? $nh_config->first_row() : null; + $data['config_id'] = $data['nh_config'] ? $data['nh_config']->id : null; $data['years_prices_grid'] = $this->nano_health_model->getConfigYearsPricesGrid($data['config_id']); $data['months_prices_grid'] = $this->nano_health_model->getConfigMonthsPricesGrid($data['config_id']); $data['acts'] = $this->nano_health_model->getConfigActs($data['config_id']); } - $hyper = $this->wallet_model->getNetworkHyper($network_id)->first_row(); - $data['walletHyper'] = $this->wallet_model->getWallet($hyper->agent_id); - $data['network_id'] = $network_id; - $networkDetails = $this->user_model->getNetworkDetails($network_id); - if($networkDetails){ - $data['network'] = $networkDetails->first_row()->network; - $data['country'] = $networkDetails->first_row()->country; - } + $hyper = $this->wallet_model->getNetworkHyper($network_id)->first_row(); + $data['walletHyper'] = $this->wallet_model->getWallet($hyper->agent_id); + $data['network_id'] = $network_id; + $networkDetails = $this->user_model->getNetworkDetails($network_id); + if ($networkDetails) { + $data['network'] = $networkDetails->first_row()->network; + $data['country'] = $networkDetails->first_row()->country; + } // $data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($network_id); - $data['active'] = "wallet"; - $data['alert'] = ""; - $data['game_pays'] = $this->user_model->getGameCountry(); - $data['networks'] = $this->user_model->getActiveNetwork(); + $data['active'] = "wallet"; + $data['alert'] = ""; + $data['game_pays'] = $this->user_model->getGameCountry(); + $data['networks'] = $this->user_model->getActiveNetwork(); - $this->load->view('header_gestion', $data); - if ($taux->type == 'visa') - $this->load->view('gestion_wallet'); - elseif ($taux->type == 'ilink') - $this->load->view('gestion_wallet_ilink'); - elseif ($taux->type == 'ilink_sante') - $this->load->view('nano_health/admin/gestion_wallet'); - elseif ($taux->type == 'autre') - $this->load->view('gestion_wallet_autre'); - $this->load->view('footer'); + $this->load->view('header_gestion', $data); + if ($taux->type == 'visa') + $this->load->view('gestion_wallet'); + elseif ($taux->type == 'ilink') + $this->load->view('gestion_wallet_ilink'); + elseif ($taux->type == 'ilink_sante') + $this->load->view('nano_health/admin/gestion_wallet'); + elseif ($taux->type == 'autre') + $this->load->view('gestion_wallet_autre'); + $this->load->view('footer'); } } @@ -1479,28 +1486,28 @@ if($this->isLogged()) { public function config_wallet($method = 'create') { - if($this->isLogged()){ + if ($this->isLogged()) { if (isset($_POST)) { $type = $_POST['type']; $res = false; - if($method == 'create') { + if ($method == 'create') { $country_id = $_POST['country_id']; $network_id = $_POST['network_id']; - if($type == 'ilink'){ - $exist = $this->wallet_model->verifyConfigWalletInCountry($type,$country_id); - if($exist){ + if ($type == 'ilink') { + $exist = $this->wallet_model->verifyConfigWalletInCountry($type, $country_id); + if ($exist) { echo json_encode("403"); return; } } - $res = $this->wallet_model->addConfigWallet($network_id , $type); + $res = $this->wallet_model->addConfigWallet($network_id, $type); - } else if($method == 'update'){ + } else if ($method == 'update') { $idConfig = $_POST['id_config']; - if($type == 'visa'){ + if ($type == 'visa') { $taux_client_r = $_POST['taux_client_r']; $taux_client_d = $_POST['taux_client_d']; $taux_ag_d = $_POST['taux_ag_d']; @@ -1511,9 +1518,9 @@ if($this->isLogged()) { $taux_bq_r = $_POST['taux_bq_r']; $frais_d = $_POST['frais_d']; - $res = $this->wallet_model->updateConfigWallet($idConfig , $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->wallet_model->updateConfigWallet($idConfig, $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'){ + } else if ($type == 'ilink') { $config = $_POST['config']; $fields = isset($_POST['fields']) ? $_POST['fields'] : []; @@ -1522,10 +1529,10 @@ if($this->isLogged()) { //Convert fields to simple array foreach ($fields as $field) { $array = json_decode(json_encode($field), true); - $i=0; + $i = 0; $name = ""; - foreach ($array as $key => $value){ - if($i == 0) + foreach ($array as $key => $value) { + if ($i == 0) $name = $value; else $rows[$name] = $value; @@ -1533,62 +1540,62 @@ if($this->isLogged()) { } } - switch ($config){ + switch ($config) { case 'user_wallet_wallet': - $plr_user_wallet_wallet = isset($_POST['plr_user_wallet_wallet']) ? $_POST['plr_user_wallet_wallet'] : null ; - $plr_user_wallet_wallet_national = isset($_POST['plr_user_wallet_wallet_national']) ? $_POST['plr_user_wallet_wallet_national'] : null ; - $this->insertPalier($plr_user_wallet_wallet,"user_wallet_wallet_international", $idConfig); - $this->insertPalier($plr_user_wallet_wallet_national,"user_wallet_wallet_national", $idConfig); + $plr_user_wallet_wallet = isset($_POST['plr_user_wallet_wallet']) ? $_POST['plr_user_wallet_wallet'] : null; + $plr_user_wallet_wallet_national = isset($_POST['plr_user_wallet_wallet_national']) ? $_POST['plr_user_wallet_wallet_national'] : null; + $this->insertPalier($plr_user_wallet_wallet, "user_wallet_wallet_international", $idConfig); + $this->insertPalier($plr_user_wallet_wallet_national, "user_wallet_wallet_national", $idConfig); break; case 'user_wallet_carte': - $this->wallet_model->updateConfigWalletIlink_u_w_cart($rows['taux_u_w_cart'],$rows['taux_hyp_s_wallet_cart_ilink'],$rows['taux_bq_s_wallet_cart_ilink'],$idConfig); + $this->wallet_model->updateConfigWalletIlink_u_w_cart($rows['taux_u_w_cart'], $rows['taux_hyp_s_wallet_cart_ilink'], $rows['taux_bq_s_wallet_cart_ilink'], $idConfig); break; case 'user_wallet_cash': - $plr_user_wallet_cash = isset($_POST['plr_user_wallet_cash']) ? $_POST['plr_user_wallet_cash'] : null ; - $plr_user_wallet_cash_national = isset($_POST['plr_user_wallet_cash_national']) ? $_POST['plr_user_wallet_cash_national'] : null ; - $this->insertPalier($plr_user_wallet_cash,"user_wallet_cash_international", $idConfig); - $this->insertPalier($plr_user_wallet_cash_national,"user_wallet_cash_national", $idConfig); + $plr_user_wallet_cash = isset($_POST['plr_user_wallet_cash']) ? $_POST['plr_user_wallet_cash'] : null; + $plr_user_wallet_cash_national = isset($_POST['plr_user_wallet_cash_national']) ? $_POST['plr_user_wallet_cash_national'] : null; + $this->insertPalier($plr_user_wallet_cash, "user_wallet_cash_international", $idConfig); + $this->insertPalier($plr_user_wallet_cash_national, "user_wallet_cash_national", $idConfig); break; case 'user_carte_wallet': - $this->wallet_model->updateConfigWalletIlink_u_c_w($rows['taux_u_c_w'],$rows['taux_u_c_c'], $rows['taux_hyp_r_cart_ilink'],$rows['taux_bq_r_cart_ilink'],$idConfig); + $this->wallet_model->updateConfigWalletIlink_u_c_w($rows['taux_u_c_w'], $rows['taux_u_c_c'], $rows['taux_hyp_r_cart_ilink'], $rows['taux_bq_r_cart_ilink'], $idConfig); break; case 'agent_remove_cash': - $this->wallet_model->updateConfigWalletIlink_a_r_c($rows['taux_ag_r_c'],$rows['taux_sup_r_c'], - $rows['taux_hyp_r_c'],$idConfig); + $this->wallet_model->updateConfigWalletIlink_a_r_c($rows['taux_ag_r_c'], $rows['taux_sup_r_c'], + $rows['taux_hyp_r_c'], $idConfig); break; case 'agent_remove_carte_cash': - $this->wallet_model->updateConfigWalletIlink_a_r_cart($rows['taux_ag_cart_c'], $rows['taux_ag_r_cart'],$rows['taux_sup_r_cart'], - $rows['taux_hyp_r_cart'],$rows['taux_bq_r_cart'],$idConfig); + $this->wallet_model->updateConfigWalletIlink_a_r_cart($rows['taux_ag_cart_c'], $rows['taux_ag_r_cart'], $rows['taux_sup_r_cart'], + $rows['taux_hyp_r_cart'], $rows['taux_bq_r_cart'], $idConfig); break; case 'agent_send_cash_carte': - $this->wallet_model->updateConfigWalletIlink_a_s_cc($rows['taux_ag_d_c_c'],$rows['taux_ag_d_c'],$rows['taux_sup_d_c'],$rows['taux_hyp_d_c'],$rows['taux_bq_d_c'],$idConfig); + $this->wallet_model->updateConfigWalletIlink_a_s_cc($rows['taux_ag_d_c_c'], $rows['taux_ag_d_c'], $rows['taux_sup_d_c'], $rows['taux_hyp_d_c'], $rows['taux_bq_d_c'], $idConfig); break; case 'agent_send_cash_canal': $plr_agent_depot_wallet_ilink = isset($_POST['plr_agent_depot_wallet_ilink']) ? $_POST['plr_agent_depot_wallet_ilink'] : null; $plr_agent_depot_autre_wallet = isset($_POST['plr_agent_depot_autre_wallet']) ? $_POST['plr_agent_depot_autre_wallet'] : null; - $plr_agent_cash_cash = isset($_POST['plr_agent_cash_cash']) ? $_POST['plr_agent_cash_cash'] : null ; + $plr_agent_cash_cash = isset($_POST['plr_agent_cash_cash']) ? $_POST['plr_agent_cash_cash'] : null; $plr_agent_depot_wallet_ilink_national = isset($_POST['plr_agent_depot_wallet_ilink_national']) ? $_POST['plr_agent_depot_wallet_ilink_national'] : null; $plr_agent_depot_autre_wallet_national = isset($_POST['plr_agent_depot_autre_wallet_national']) ? $_POST['plr_agent_depot_autre_wallet_national'] : null; - $plr_agent_cash_cash_national = isset($_POST['plr_agent_cash_cash_national']) ? $_POST['plr_agent_cash_cash_national'] : null ; + $plr_agent_cash_cash_national = isset($_POST['plr_agent_cash_cash_national']) ? $_POST['plr_agent_cash_cash_national'] : null; - $this->insertPalier($plr_agent_depot_wallet_ilink,"agent_depot_wallet_ilink_international", $idConfig); - $this->insertPalier($plr_agent_depot_autre_wallet,"agent_depot_autre_wallet_international", $idConfig); - $this->insertPalier($plr_agent_cash_cash,"agent_cash_cash_international", $idConfig); + $this->insertPalier($plr_agent_depot_wallet_ilink, "agent_depot_wallet_ilink_international", $idConfig); + $this->insertPalier($plr_agent_depot_autre_wallet, "agent_depot_autre_wallet_international", $idConfig); + $this->insertPalier($plr_agent_cash_cash, "agent_cash_cash_international", $idConfig); - $this->insertPalier($plr_agent_depot_wallet_ilink_national,"agent_depot_wallet_ilink_national", $idConfig); - $this->insertPalier($plr_agent_depot_autre_wallet_national,"agent_depot_autre_wallet_national", $idConfig); - $this->insertPalier($plr_agent_cash_cash_national,"agent_cash_cash_national", $idConfig); + $this->insertPalier($plr_agent_depot_wallet_ilink_national, "agent_depot_wallet_ilink_national", $idConfig); + $this->insertPalier($plr_agent_depot_autre_wallet_national, "agent_depot_autre_wallet_national", $idConfig); + $this->insertPalier($plr_agent_cash_cash_national, "agent_cash_cash_national", $idConfig); - $this->wallet_model->updateConfigWalletIlink_a_s_c($rows['taux_ag_s_c'],$rows['taux_sup_s_c'],$rows['taux_hyp_s_c'],$idConfig); + $this->wallet_model->updateConfigWalletIlink_a_s_c($rows['taux_ag_s_c'], $rows['taux_sup_s_c'], $rows['taux_hyp_s_c'], $idConfig); break; } $res = true; - }else if($type == 'ilink_sante'){ - unset($_POST['id_config'],$_POST['type']); - $this->nano_health_model->updateConfig($idConfig,$_POST); + } else if ($type == 'ilink_sante') { + unset($_POST['id_config'], $_POST['type']); + $this->nano_health_model->updateConfig($idConfig, $_POST); $res = true; } @@ -1603,9 +1610,10 @@ if($this->isLogged()) { } - public function saveTaxes(){ - if($this->isLogged()) { - if(isset($_POST)) { + public function saveTaxes() + { + if ($this->isLogged()) { + if (isset($_POST)) { $idConfig = $_POST['id_config']; $taxes = isset($_POST['taxes']) ? $_POST['taxes'] : null; $categorie = isset($_POST['categorie']) ? $_POST['categorie'] : 'wallet'; @@ -1621,14 +1629,15 @@ if($this->isLogged()) { } } - private function insertPalier($palier , $name , $idConfig){ + private function insertPalier($palier, $name, $idConfig) + { - $exist = $this->wallet_model->getPalierConfigWallet($name , $idConfig); - if($exist){ - $this->wallet_model->deletePalierConfigWallet($name , $idConfig); + $exist = $this->wallet_model->getPalierConfigWallet($name, $idConfig); + if ($exist) { + $this->wallet_model->deletePalierConfigWallet($name, $idConfig); } - if($palier) { + if ($palier) { foreach ($palier as $p) { $array = json_decode(json_encode($p), true); $row = []; @@ -1665,7 +1674,7 @@ if($this->isLogged()) { public function delete_config_wallet() { - if($this->isLogged()){ + if ($this->isLogged()) { if (isset($_POST)) { $network_id = $_POST['network_id']; $res = $this->wallet_model->deleteConfigWallet($network_id); @@ -1681,7 +1690,7 @@ if($this->isLogged()) { public function disable_config_wallet() { - if($this->isLogged()){ + if ($this->isLogged()) { if (isset($_POST)) { $network_id = $_POST['network_id']; $res = $this->wallet_model->disableConfigWallet($network_id); @@ -1709,24 +1718,25 @@ if($this->isLogged()) { return true; } - public function generateAllWallets(){ + public function generateAllWallets() + { // Asynchrous method $network_id = $_POST['network_id']; $type = $_POST['type']; - if($type != 'autre'){ + if ($type != 'autre') { $pool = Pool::create(); $pool->add(function () use ($network_id) { // Fetch all agents , hyperviseur , superviseur - $f_agents = $this->wallet_model->getAllAgentsForNetwork($network_id) ; - if ($f_agents){ - foreach($f_agents->result() AS $row){ + $f_agents = $this->wallet_model->getAllAgentsForNetwork($network_id); + if ($f_agents) { + foreach ($f_agents->result() as $row) { //Create wallet if it not exist $res = $this->wallet_model->getWallet($row->agent_id); - if($res){ + if ($res) { // Reinitialize the wallet // $this->wallet_model->reinitializeWallet($res->first_row()->wallet_id); - }else{ + } else { $this->wallet_model->addWallet($row->agent_id); } } @@ -1739,14 +1749,14 @@ if($this->isLogged()) { } - private function historique($network_id ,$startDate ,$endDate, $type) + private function historique($network_id, $startDate, $endDate, $type) { $data['configWallet'] = $this->wallet_model->getConfigWallet($network_id); - $format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d' ; - $data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null ; - $data['endDate'] = $endDate ?date($format, strtotime($endDate)): null ; - $endDate = Date('Y-m-d', strtotime($endDate."+1 day")); + $format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d'; + $data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null; + $data['endDate'] = $endDate ? date($format, strtotime($endDate)) : null; + $endDate = Date('Y-m-d', strtotime($endDate . "+1 day")); if ($type == 'recharge') $data['transactions'] = $this->wallet_model->getRecharges($startDate, $endDate, $network_id); @@ -1755,7 +1765,7 @@ if($this->isLogged()) { $data['networks'] = $this->wallet_model->getAllActivatedNetworks(); $data['game_pays'] = $this->user_model->getGameCountry(); $networkDetails = $this->user_model->getNetworkDetails($network_id); - if($networkDetails){ + if ($networkDetails) { $data['network'] = $networkDetails->first_row()->network; $data['country'] = $networkDetails->first_row()->country; $data['currency_name_fr'] = $networkDetails->first_row()->currency_name_fr; @@ -1778,7 +1788,7 @@ if($this->isLogged()) { public function currency() { - if($this->isLogged()){ + if ($this->isLogged()) { $data['active'] = "currency"; $data['alert'] = ""; $data['game_pays'] = $this->user_model->getGameCountry(); @@ -1787,17 +1797,17 @@ if($this->isLogged()) { $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['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->wallet_model->getWalletsCountriesCurrencies($data['currency_code']); $this->load->view('header_gestion', $data); $this->load->view('gestion_monnaie'); $this->load->view('footer'); - }else{ + } else { $data['networks'] = $this->wallet_model->getAllActivatedWalletNetworks(); @@ -1808,27 +1818,28 @@ if($this->isLogged()) { } } - public function fetchExchangeRates(){ + public function fetchExchangeRates() + { if ($this->isLogged()) { - $api="c4e31fe540cd49c98abffc06cc5948c8"; ///// Provide your openexchangerates.org api key here - $string = file_get_contents("https://openexchangerates.org/api/latest.json?app_id=$api"); - $json = json_decode($string, true); + $api = "c4e31fe540cd49c98abffc06cc5948c8"; ///// Provide your openexchangerates.org api key here + $string = file_get_contents("https://openexchangerates.org/api/latest.json?app_id=$api"); + $json = json_decode($string, true); - $res= false; + $res = false; - foreach ($json['rates'] as $key => $value) { - if($this->wallet_model->getExchangeRate($key)) - $this->wallet_model->updateExchangeRate($key , $value); - else - $this->wallet_model->insertExchangeRate($key , $value); - } - $res = true; - if ($res) { - echo json_encode("200"); - } else { - echo json_encode("500"); - } + foreach ($json['rates'] as $key => $value) { + if ($this->wallet_model->getExchangeRate($key)) + $this->wallet_model->updateExchangeRate($key, $value); + else + $this->wallet_model->insertExchangeRate($key, $value); + } + $res = true; + if ($res) { + echo json_encode("200"); + } else { + echo json_encode("500"); + } } @@ -1836,12 +1847,12 @@ if($this->isLogged()) { public function cancelTransation() { - if($this->isLogged()) { + if ($this->isLogged()) { if (isset($_POST)) { $id_transacton = $_POST['id_transaction']; /* API URL */ - $url = WALLET_SERVICE_URL.'/transactions/'.$id_transacton; + $url = WALLET_SERVICE_URL . '/transactions/' . $id_transacton; /* Init cURL resource */ $ch = curl_init($url); @@ -1851,8 +1862,8 @@ if($this->isLogged()) { /* set the content type json */ curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type:application/json', - 'Authorization:'.WALLET_SERVICE_TOKEN, - 'X-localization:'. $this->session->userdata('site_lang') == 'french' ? 'fr' : 'en' + 'Authorization:' . WALLET_SERVICE_TOKEN, + 'X-localization:' . $this->session->userdata('site_lang') == 'french' ? 'fr' : 'en' )); /* set return type json */ @@ -1890,8 +1901,8 @@ if($this->isLogged()) { /* set the content type json */ curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type:application/json', - 'Authorization:'.WALLET_SERVICE_TOKEN, - 'X-localization:'. $this->session->userdata('site_lang') == 'french' ? 'fr' : 'en' + 'Authorization:' . WALLET_SERVICE_TOKEN, + 'X-localization:' . $this->session->userdata('site_lang') == 'french' ? 'fr' : 'en' )); /* set return type json */ @@ -1925,7 +1936,7 @@ if($this->isLogged()) { 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')); + $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(); @@ -1990,7 +2001,7 @@ if($this->isLogged()) { $this->load->view('footer'); } - private function users_group_details($network_id , $group_code) + private function users_group_details($network_id, $group_code) { $data['active'] = "nano_credit"; $data['alert'] = ""; @@ -2011,10 +2022,10 @@ if($this->isLogged()) { //Calcul de la capacite d'emprunt $CE = 0; - if($data['members']){ + if ($data['members']) { $sommeCredits = 0; $sommeEpargnes = 0; - foreach ($data['members']->result() as $user){ + foreach ($data['members']->result() as $user) { $sum_credit = $this->nano_credit_model->sumGroupCredit($user->id_user) ? $this->nano_credit_model->sumGroupCredit($user->id_user)->credit : 0; $sommeCredits += $sum_credit; $sommeEpargnes += $user->balance_epargne; @@ -2068,7 +2079,7 @@ if($this->isLogged()) { public function regulations() { - if($this->isLogged()){ + if ($this->isLogged()) { $data['active'] = "regulations"; $data['alert'] = ""; $data['game_pays'] = $this->user_model->getGameCountry(); @@ -2078,16 +2089,16 @@ if($this->isLogged()) { $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['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['currency_name_fr'] = $networkDetails->first_row()->currency_name_fr; + $data['currency_name_en'] = $networkDetails->first_row()->currency_name_en; $data['currencies'] = $this->wallet_model->getWalletsCountriesCurrencies($data['currency_code']); $this->load->view('header_gestion', $data); $this->load->view('gestion_monnaie'); $this->load->view('footer'); - }else{ + } else { $data['countries'] = $this->wallet_model->getRegulationsCountries(); @@ -2098,7 +2109,8 @@ if($this->isLogged()) { } } - public function setRegulationsLimits(){ + public function setRegulationsLimits() + { if ($this->isLogged()) { if (isset($_POST)) { @@ -2112,12 +2124,12 @@ if($this->isLogged()) { $max_month_international = $_POST['max_month_international']; $limits = $this->wallet_model->getRegulationsLimits($country_id); - if($limits){ - $this->wallet_model->updateRegulationsLimits($country_id,$max_day_national,$max_week_national,$max_month_national, - $max_day_international,$max_week_international,$max_month_international); - }else{ - $this->wallet_model->insertRegulationsLimits($country_id,$max_day_national,$max_week_national,$max_month_national, - $max_day_international,$max_week_international,$max_month_international); + if ($limits) { + $this->wallet_model->updateRegulationsLimits($country_id, $max_day_national, $max_week_national, $max_month_national, + $max_day_international, $max_week_international, $max_month_international); + } else { + $this->wallet_model->insertRegulationsLimits($country_id, $max_day_national, $max_week_national, $max_month_national, + $max_day_international, $max_week_international, $max_month_international); } $res = true; if ($res) { @@ -2155,7 +2167,7 @@ if($this->isLogged()) { $data = array( 'nom' => $this->input->post('name'), 'type' => $this->input->post('type') - ); + ); $query = $this->db->insert('operators', $data); if ($query) { @@ -2172,11 +2184,11 @@ if($this->isLogged()) { if ($this->isLogged()) { if (isset($_POST)) { - $query = $this->db->get_where('type_operators', array('code' => $this->input->post('code')), 1); + $query = $this->db->get_where('type_operators', array('code' => $this->input->post('code')), 1); $exist = $query->num_rows() > 0; - if($exist){ + if ($exist) { echo json_encode(422); - }else{ + } else { $data = array( 'code' => $this->input->post('code'), 'description_fr' => $this->input->post('description_fr'), @@ -2219,10 +2231,10 @@ if($this->isLogged()) { $id_operator = $this->input->post('id_operator'); $existe = 0; $this->db->trans_begin(); - foreach ($_POST['id_country'] AS $country) { + foreach ($_POST['id_country'] as $country) { $res = $this->wallet_model->checkIfOperatorAssignationExist($country, $id_operator); if ($res == false) { - $data = array('id_country' => $country , 'id_operator' => $id_operator); + $data = array('id_country' => $country, 'id_operator' => $id_operator); $this->db->insert('operators_countries', $data); } else { $existe = $existe + 1; @@ -2253,7 +2265,7 @@ if($this->isLogged()) { $address = $this->input->post('address'); $code = $this->input->post('code'); - $res = $this->wallet_model->updateOperator($id_operator, $id_country ,$name , $address , $code); + $res = $this->wallet_model->updateOperator($id_operator, $id_country, $name, $address, $code); if ($res == true) { echo json_encode("completed"); @@ -2273,7 +2285,7 @@ if($this->isLogged()) { $this->db->trans_begin(); if (!empty($_POST['activations'])) { - foreach ($_POST['activations'] AS $row) { + foreach ($_POST['activations'] as $row) { $data = array('status' => 1); $this->db->where('id_operator', $row['id_operator']); @@ -2283,7 +2295,7 @@ if($this->isLogged()) { } } if (!empty($_POST['desactivations'])) { - foreach ($_POST['desactivations'] AS $row) { + foreach ($_POST['desactivations'] as $row) { $data = array('status' => 0); $this->db->where('id_operator', $row['id_operator']); @@ -2304,13 +2316,14 @@ if($this->isLogged()) { } } - public function settings(){ + public function settings() + { if ($this->isLogged()) { $data['active'] = "settings"; $data['alert'] = ""; $data['game_pays'] = $this->user_model->getGameCountry(); - $data['pas_chargement'] = $this->user_model->getAdminConfig('pas_chargement'); - $data['active_pub'] = $this->user_model->getAdminConfig('active_pub', 'bool'); + $data['pas_chargement'] = $this->user_model->getAdminConfig('pas_chargement'); + $data['active_pub'] = $this->user_model->getAdminConfig('active_pub', 'bool'); // $data['enable_sms_notifications'] = $this->user_model->getAdminConfig('enable_sms_notifications', 'bool'); // $data['towns'] = $this->user_model->getAllVilles(); @@ -2320,7 +2333,8 @@ if($this->isLogged()) { } } - public function update_settings(){ + public function update_settings() + { if ($this->isLogged()) { $pas = $this->input->post('pas'); @@ -2331,33 +2345,33 @@ if($this->isLogged()) { $office_penalty_percent = $this->input->post('office_penalty_percent'); $month_delay_penalty_percent = $this->input->post('month_delay_penalty_percent'); $payment_deadline_date = $this->input->post('payment_deadline_date'); - if(isset($pas)){ + if (isset($pas)) { $result = $this->user_model->insertAdminConfig('pas_chargement', $pas); } - if(isset($jours)){ + if (isset($jours)) { $result = $this->user_model->insertAdminConfig('jours_calendaires', $jours); } - if(isset($default_locality)){ - $result = $this->user_model->insertAdminConfig('default_locality', $default_locality,''); + if (isset($default_locality)) { + $result = $this->user_model->insertAdminConfig('default_locality', $default_locality, ''); } - if(isset($enable_sms_notifications)){ + if (isset($enable_sms_notifications)) { $result = $this->user_model->insertAdminConfig('enable_sms_notifications', $enable_sms_notifications, 'bool'); } - if(isset($office_penalty_percent)){ + if (isset($office_penalty_percent)) { $result = $this->user_model->insertAdminConfig('office_penalty_percent', $office_penalty_percent); } - if(isset($month_delay_penalty_percent)){ + if (isset($month_delay_penalty_percent)) { $result = $this->user_model->insertAdminConfig('month_delay_penalty_percent', $month_delay_penalty_percent); } - if(isset($payment_deadline_date)){ + if (isset($payment_deadline_date)) { $result = $this->user_model->insertAdminConfig('payment_deadline_date', $payment_deadline_date, 'date'); } diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php index efef4392..21db2a14 100755 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -508,6 +508,8 @@ class Hyperviseur_dash extends CI_Controller $data['nh_config'] = $nh_config ? $nh_config->first_row() : null ; $data['config_id'] = $data['nh_config'] ? $data['nh_config']->id : null ; $data['provider_billing_periods'] = $this->user_model->getEnumValues('nh_networks_configs','provider_billing_period'); + $data['password_validation_types'] = $this->user_model->getEnumValues('nh_networks_configs','password_validation'); + $data['payment_periods'] = $this->user_model->getEnumValues('nh_months_prices_grid','payment_period'); $data['years_prices_grid'] = $this->nano_health_model->getConfigYearsPricesGrid($data['config_id']); $data['months_prices_grid'] = $this->nano_health_model->getConfigMonthsPricesGrid($data['config_id']); $data['acts'] = $this->nano_health_model->getConfigActs($data['config_id']); @@ -2019,9 +2021,12 @@ class Hyperviseur_dash extends CI_Controller public function validating_agents($role = null){ if ($this->isLogged()) { $data['alert'] = ""; - if($role == 'doctors'){ + if($role == 'doctors') { $data['active'] = "wallet_validating_doctors"; $data['role'] = 'DOCTOR'; + }else if($role == 'controllers'){ + $data['active'] = "wallet_validating_controllers"; + $data['role'] = 'CONTROLLER'; }else{ $data['active'] = "wallet_validating_agents"; $data['role'] = 'AGENT'; diff --git a/application/controllers/NanoHealthController.php b/application/controllers/NanoHealthController.php index d095576c..01d13012 100644 --- a/application/controllers/NanoHealthController.php +++ b/application/controllers/NanoHealthController.php @@ -17,12 +17,19 @@ class NanoHealthController extends CI_Controller $configId = $_POST['config_id']; $grid = $_POST['grid'] ?? []; - $this->db->delete('nh_years_prices_grid',['nh_network_config_id' => $configId]); - if(sizeof($grid) > 0){ - $this->db->insert_batch('nh_years_prices_grid',$grid); + try{ + $this->db->trans_begin(); + $this->db->delete('nh_years_prices_grid',['nh_network_config_id' => $configId]); + if(sizeof($grid) > 0){ + $this->db->insert_batch('nh_years_prices_grid',$grid); + } + $this->db->trans_commit(); + echo json_encode("200"); + }catch (Throwable $exception){ + $this->db->trans_rollback(); + var_dump($exception->getMessage()); + echo json_encode("500"); } - - echo json_encode("200"); } } } @@ -32,12 +39,36 @@ class NanoHealthController extends CI_Controller if (isset($_POST)) { $configId = $_POST['config_id']; $grid = $_POST['grid'] ?? []; - - $this->db->delete('nh_months_prices_grid',['nh_network_config_id' => $configId]); - if(sizeof($grid) > 0){ - $this->db->insert_batch('nh_months_prices_grid',$grid); + foreach ($grid as $i => $row){ + foreach ($row as $k => $v){ + if(empty($v)){ + $grid[$i][$k] = null; + } + } + } + + try{ + $this->db->trans_begin(); + foreach ($grid as $row){ + $n = $row['payment_period'] == 'DAILY' ? 22 : 1 ; + if($row['payment_period'] == 'ONE_TIME'){ + $row['payment_duration_months'] = null; + } + $row['number_of_fractions'] = $n * ($row['payment_duration_months'] ?? 1); + if(!empty($row['id'])){ + $this->db->where('id',$row['id']); + $this->db->update('nh_months_prices_grid', $row); + }else{ + $this->db->insert('nh_months_prices_grid',$row); + } + } + $this->db->trans_commit(); + echo json_encode("200"); + }catch (Throwable $exception){ + $this->db->trans_rollback(); + var_dump($exception->getMessage()); + echo json_encode("500"); } - echo json_encode("200"); } } } @@ -166,76 +197,14 @@ class NanoHealthController extends CI_Controller } } - public function validateSubscription() + public function validateSubscription($subscription_id) { - if($this->isLogged()) { - if (isset($_POST)) { - $subscription_id = $_POST['subscription_id']; - $url = NANO_SANTE_SERVICE_URL.'/insurances/subscriptions/'.$subscription_id.'/validate'; - $ch = curl_init($url); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); - /* set the content type json */ - curl_setopt($ch, CURLOPT_HTTPHEADER, array( - 'Content-Type:application/json', - 'Authorization:'.NANO_SANTE_SERVICE_TOKEN, - 'X-localization:'. $this->session->userdata('site_lang') == 'french' ? 'fr' : 'en' - )); - /* set return type json */ - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - $body = new \stdClass(); - $body->agent_id = $this->input->post('agent_id'); - $body->nh_validating_agent_id = $this->input->post('nh_validating_agent_id'); - curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body)); - - /* execute request */ - $result = curl_exec($ch); - /* close cURL resource */ - curl_close($ch); - - if ($result) { - echo $result; - } else { - echo json_encode(['status' => 500]); - } - } - } + echo $this->makeRequest('PUT','/insurances/subscriptions/'.$subscription_id.'/validate', $_POST); } - public function rejectSubscription() + public function rejectSubscription($subscription_id) { - if($this->isLogged()) { - if (isset($_POST)) { - $subscription_id = $_POST['subscription_id']; - $url = NANO_SANTE_SERVICE_URL.'/insurances/subscriptions/'.$subscription_id.'/reject'; - $ch = curl_init($url); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); - /* set the content type json */ - curl_setopt($ch, CURLOPT_HTTPHEADER, array( - 'Content-Type:application/json', - 'Authorization:'.NANO_SANTE_SERVICE_TOKEN, - 'X-localization:'. $this->session->userdata('site_lang') == 'french' ? 'fr' : 'en' - )); - /* set return type json */ - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - $body = new \stdClass(); - $body->agent_id = $this->input->post('agent_id'); - $body->nh_validating_agent_id = $this->input->post('nh_validating_agent_id'); - $body->type = $this->input->post('type'); - $body->reason = $this->input->post('reason'); - curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body)); - - /* execute request */ - $result = curl_exec($ch); - /* close cURL resource */ - curl_close($ch); - - if ($result) { - echo $result; - } else { - echo json_encode(['status' => 500]); - } - } - } + echo $this->makeRequest('PUT','/insurances/subscriptions/'.$subscription_id.'/reject', $_POST); } @@ -392,6 +361,11 @@ class NanoHealthController extends CI_Controller } } + public function getSingleHealthCareSheet($id) + { + echo $this->makeRequest('GET','/health-care-sheets/'.$id); + } + public function generateInvoice() { if($this->isLogged()) { @@ -429,7 +403,12 @@ class NanoHealthController extends CI_Controller echo $this->makeRequest('PUT','/authorizations-care-requests', $_POST); } - private function makeRequest($method , $path , $request_body){ + public function validateInvoice($id) + { + echo $this->makeRequest('PUT','/invoices/'.$id, $_POST); + } + + private function makeRequest($method , $path , $request_body = []){ if($this->isLogged()) { $url = NANO_SANTE_SERVICE_URL.$path; $ch = curl_init($url); diff --git a/application/controllers/Users.php b/application/controllers/Users.php index 737038ec..47fdcc34 100755 --- a/application/controllers/Users.php +++ b/application/controllers/Users.php @@ -97,6 +97,8 @@ $this->session->set_userdata('current_pays', $agent->country); if($agent->role == 'DOCTOR'){ redirect('ValidatingDoctor'); + }else if($agent->role == 'CONTROLLER'){ + redirect('ControllerDoctor'); }else{ redirect('ValidatingAgent'); } diff --git a/application/controllers/ValidatingAgent.php b/application/controllers/ValidatingAgent.php index d34668b8..8b0f15d1 100755 --- a/application/controllers/ValidatingAgent.php +++ b/application/controllers/ValidatingAgent.php @@ -13,9 +13,10 @@ class ValidatingAgent extends CI_Controller if ($this->isLogged()){ $data['active'] = "dashboard"; $data['agent_id'] = $this->session->userdata('agent_id'); + $data['id_network'] = $this->session->userdata('network_id'); $data['acceptedRequests'] = $this->nano_health_model->getNhValidatingAgentSubscriptionHistory($data['agent_id'], 'ACCEPTED'); $data['rejectedRequests'] = $this->nano_health_model->getNhValidatingAgentSubscriptionHistory($data['agent_id'], 'REJECTED'); - $data['untreatedRequests'] = $this->nano_health_model->getNhInsurancesSubscriptionCount('UNDER_VALIDATION'); + $data['untreatedRequests'] = $this->nano_health_model->getNhInsurancesSubscriptionCount($data['id_network'],'UNDER_VALIDATION'); $this->load->view('nano_health/validating_agent/header', $data); $this->load->view('nano_health/validating_agent/dashboard', $data); diff --git a/application/controllers/pagination/ControllerDoctorInvoices.php b/application/controllers/pagination/ControllerDoctorInvoices.php new file mode 100755 index 00000000..71b9a30d --- /dev/null +++ b/application/controllers/pagination/ControllerDoctorInvoices.php @@ -0,0 +1,75 @@ +load->model('pagination/Invoices_model', 'model'); + + // set to whatever your rates are relative to + $baseCurrency = 'USD'; + + // use your own credentials, or re-use your existing PDO connection + $pdo = new PDO('mysql:host=' . $this->db->hostname . ';dbname=' . $this->db->database, $this->db->username, $this->db->password); + + $configuration = new PDOProviderConfiguration(); + + $configuration->tableName = 'exchange_rate'; + $configuration->exchangeRateColumnName = 'exchange_rate'; + $configuration->targetCurrencyColumnName = 'target_currency'; + $configuration->sourceCurrencyCode = $baseCurrency; + + // this provider loads exchange rates from your database + $provider = new PDOProvider($pdo, $configuration); + + // this provider calculates exchange rates relative to the base currency + $provider = new BaseCurrencyProvider($provider, $baseCurrency); + + // this currency converter can now handle any currency pair + $this->context = new AutoContext(); + } + + + function getLists() + { + $data = $row = array(); + + // Fetch member's records + $witData = $this->model->getRows($_POST); + + $i = $_POST['start']; + $current_url = $_POST['currentURL']; + foreach ($witData as $row) { + $amount = Money::of(round($row->amount, 2), $row->currency_code, $this->context)->formatTo('fr_FR'); + $insured_amount = Money::of(round($row->insured_amount, 2), $row->currency_code, $this->context)->formatTo('fr_FR'); + $insurer_amount = Money::of(round($row->insurer_amount, 2), $row->currency_code, $this->context)->formatTo('fr_FR'); + + $data[] = array($row->invoice_id , $row->institution_name , $amount , $insured_amount, $insurer_amount, + $row->period_start_at, $row->period_end_at, mb_strtoupper($this->lang->line($row->state) ,'UTF-8'), ' '.$this->lang->line('Voir plus...').''); + } + + $output = array( + "draw" => $_POST['draw'], + "recordsTotal" => $this->model->countAll($_POST), + "recordsFiltered" => $this->model->countFiltered($_POST), + "data" => $data, + ); + + // Output to JSON format + echo json_encode($output); + } + +} diff --git a/application/controllers/pagination/Invoices.php b/application/controllers/pagination/Invoices.php index 0fb68f9a..b23a4a1d 100755 --- a/application/controllers/pagination/Invoices.php +++ b/application/controllers/pagination/Invoices.php @@ -58,7 +58,7 @@ class Invoices extends CI_Controller $insurer_amount = Money::of(round($row->insurer_amount, 2), $row->currency_code, $this->context)->formatTo('fr_FR'); $data[] = array($row->invoice_id , $row->institution_name , $amount , $insured_amount, $insurer_amount, - $row->period_start_at, $row->period_end_at, ' '.$this->lang->line('Voir plus...').''); + $row->period_start_at, $row->period_end_at, mb_strtoupper($this->lang->line($row->state),'UTF-8'), ' '.$this->lang->line('Voir plus...').''); } $output = array( diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php index 550078ad..ad77768d 100755 --- a/application/language/english/message_lang.php +++ b/application/language/english/message_lang.php @@ -870,4 +870,35 @@ $lang['expired_insurance'] = "Insurance expired"; $lang['family_coverage_sharing'] = "Family coverage pooling"; $lang['max_insurance_coverage_amount'] = "Insurance coverage limit amount"; $lang['service_providers_per_town'] = "Prestataires par ville"; +$lang['controllers_doctors'] = "Controllers doctors"; +$lang['manage_controllers_doctors'] = "Manage controller doctors"; +$lang['controller_doctor'] = "Controller doctor"; +$lang['add_controller_doctor'] = "Add a controller doctor"; +$lang['controller_doctor_updated'] = "Controller doctor updated"; +$lang['controller_doctor_deleted'] = "Controller doctor deleted"; +$lang['controller_doctor_deleted'] = "Controller doctor deleted"; +$lang['accepted_invoices'] = "Accepted invoices"; +$lang['rejected_invoices'] = "Rejected invoices"; +$lang['rejected_invoices'] = "Rejected invoices"; +$lang['accepted_modified_invoices'] = "Accepted invoices modified"; +$lang['under_validation_invoices'] = "Invoices under validation"; +$lang['invoice_detail'] = "Invoice detail"; +$lang['issuer_information'] = "Issuer information"; +$lang['download'] = "Download"; +$lang['reject_invoice'] = "Reject the invoice"; +$lang['institution'] = "Institution"; +$lang['accept_and_update'] = "Accept and Modify"; +$lang['accept_and_update_invoice'] = "Accept and Modify the invoice"; +$lang['ACCEPTED_MODIFIED'] = "Accepted Modified"; +$lang['waiting_period_days'] = "Waiting period (in days)"; +$lang['password_validation'] = "Password validation"; +$lang['MIN'] = "Minimum"; +$lang['MAX'] = "Maximum"; +$lang['payment_period'] = "Payment period"; +$lang['payment_period'] = "Payment period"; +$lang['payment_duration_months'] = "Payment duration (in months)"; +$lang['ONE_TIME'] = "One time only"; +$lang['DAILY'] = "Daily"; +$lang['undefined'] = "Not defined"; +$lang['number_of_fractions'] = "Number of fractions" ?> diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index 51d89afc..cfb321d8 100755 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -881,4 +881,34 @@ $lang['expired_insurance'] = "Assurances arrivées à échéance"; $lang['family_coverage_sharing'] = "Mutualisation de la couverture familiale"; $lang['max_insurance_coverage_amount'] = "Montant limite de couverture d'assurance"; $lang['service_providers_per_town'] = "Prestataires par ville"; +$lang['controllers_doctors'] = "Médécins controlleurs"; +$lang['manage_controllers_doctors'] = "Gestion des médécins controleurs"; +$lang['controller_doctor'] = "Médécin controleur"; +$lang['add_controller_doctor'] = "Ajouter un médécin controleur"; +$lang['controller_doctor_updated'] = "Médécin controleur modifié"; +$lang['controller_doctor_deleted'] = "Médécin controleur supprimé"; +$lang['controller_doctor_deleted'] = "Médécin controleur supprimé"; +$lang['accepted_invoices'] = "Factures acceptées"; +$lang['rejected_invoices'] = "Factures rejetées"; +$lang['accepted_modified_invoices'] = "Factures acceptées modifiées"; +$lang['under_validation_invoices'] = "Factures en cours de validation"; +$lang['invoice_detail'] = "Detail de la facture"; +$lang['issuer_information'] = "Informations sur l'émetteur"; +$lang['download'] = "Télécharger"; +$lang['reject_invoice'] = "Rejecter la facture"; +$lang['institution'] = "Etablissement"; +$lang['accept_and_update'] = "Accepter et Modifier"; +$lang['accept_and_update_invoice'] = "Accepter et Modifier la facture"; +$lang['ACCEPTED_MODIFIED'] = "Acceptée Modifiée"; +$lang['waiting_period_days'] = "Delai de carence (en jours)"; +$lang['password_validation'] = "Validation par mot de passe"; +$lang['MIN'] = "Minimale"; +$lang['MAX'] = "Maximale"; +$lang['payment_period'] = "Periode de paiement"; +$lang['payment_period'] = "Periode de paiement"; +$lang['payment_duration_months'] = "Durée du paiment (en mois)"; +$lang['ONE_TIME'] = "Une seule fois"; +$lang['DAILY'] = "Journalier"; +$lang['undefined'] = "Non défini"; +$lang['number_of_fractions'] = "Nombre de fractions" ?> diff --git a/application/models/Nano_health_model.php b/application/models/Nano_health_model.php index 2653d5c8..87b52d2e 100644 --- a/application/models/Nano_health_model.php +++ b/application/models/Nano_health_model.php @@ -22,6 +22,7 @@ class Nano_health_model extends CI_Model public function updateConfig($configId, $data){ $this->db->where('id', $configId); +// $data = formatDBData($data); return $this->db->update('nh_networks_configs', $data); } @@ -30,7 +31,7 @@ class Nano_health_model extends CI_Model } public function getConfigMonthsPricesGrid($configId){ - return $this->db->get_where('nh_months_prices_grid',['nh_network_config_id'=> $configId]); + return $this->db->order_by('id','ASC')->get_where('nh_months_prices_grid',['nh_network_config_id'=> $configId]); } public function getConfigActs($configId){ @@ -52,8 +53,8 @@ class Nano_health_model extends CI_Model ->where('insurance_subscription_state', $state)->count_all_results(); } - public function getNhInsurancesSubscriptionCount($state){ - return $this->db->from('nh_insurances_subscriptions') + public function getNhInsurancesSubscriptionCount($networkId, $state){ + return $this->db->from('nh_insurances_subscriptions')->where('network_id', $networkId) ->where('state', $state)->count_all_results(); } @@ -157,4 +158,20 @@ class Nano_health_model extends CI_Model ->where('i.deleted_at IS NOT NULL') ->where('i.insurance_id',$insuranceId)->order_by('i.deleted_at','desc')->get(); } + + public function getInfosInvoiceById($id){ + return $this->db->get_where('nh_infos_invoices',['id'=> $id])->first_row(); + } + + public function getCountInvoices($network_id , $validating_agent_id, $state){ + $query = $this->db->from('nh_infos_invoices')->where('state',$state); + if(!empty($validating_agent_id)){ + $query = $query->where('validating_agent_id', $validating_agent_id); + } + + if(!empty($network_id)){ + $query = $query->where('network_id', $network_id); + } + return $query->count_all_results(); + } } diff --git a/application/views/header_hyp.php b/application/views/header_hyp.php index 4cbea4a8..0bebe3ef 100755 --- a/application/views/header_hyp.php +++ b/application/views/header_hyp.php @@ -205,6 +205,12 @@ lang->line('validating_doctors'); ?> +
  • "> + + + lang->line('controllers_doctors'); ?> + +
  • "> diff --git a/application/views/nano_health/agent/health_care_sheet_update_consultation_form.php b/application/views/nano_health/agent/health_care_sheet_update_consultation_form.php index ae873010..bebd4316 100755 --- a/application/views/nano_health/agent/health_care_sheet_update_consultation_form.php +++ b/application/views/nano_health/agent/health_care_sheet_update_consultation_form.php @@ -7,7 +7,6 @@ - + + + + + + + db->query("SELECT id FROM nh_infos_invoices + WHERE MONTH(created_at) = '".$months[$i-1]."' AND YEAR(created_at) = ".$years[$i-1]." + AND network_id='".$network_id."'" + ); + $demandes_data[] = $demandes_query_mounth->num_rows(); + } + + $pieChart = array(); + ?> + +
    + + +
    +

    + lang->line('controller_doctor'); ?> + lang->line('Tableau de bord'); ?> +

    +
    + +
    + +
    +
    + +
    +
    +

    + +

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

    +
    +
    + +
    +
    +
    +
    + +
    +
    +

    + +

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

    +
    +
    + +
    +
    +
    +
    + +
    +
    +

    + +

    lang->line("rejected_invoices"); ?>

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

    + +

    lang->line("under_validation_invoices"); ?>

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

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

    +
    +
    +
    + +
    +
    + +
    + +
    + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/nano_health/controller_doctor/header.php b/application/views/nano_health/controller_doctor/header.php new file mode 100755 index 00000000..960dd057 --- /dev/null +++ b/application/views/nano_health/controller_doctor/header.php @@ -0,0 +1,131 @@ + + + + + + + iLink | <?= $this->lang->line('controller_doctor');?> + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + diff --git a/application/views/nano_health/controller_doctor/infos_invoice.php b/application/views/nano_health/controller_doctor/infos_invoice.php new file mode 100755 index 00000000..88b64d77 --- /dev/null +++ b/application/views/nano_health/controller_doctor/infos_invoice.php @@ -0,0 +1,1476 @@ + + + + + + + + + + + + + +
    +
    + +

    + lang->line('invoice_detail') . ' - ' . $invoice->invoice_id; ?> + +
    + + lang->line('download') ?> + + state == 'UNDER_VALIDATION') { ?> + + + + +
    +

    + + + + db->hostname . ';dbname=' . $this->db->database, $this->db->username, $this->db->password); + + $configuration = new PDOProviderConfiguration(); + + $configuration->tableName = 'exchange_rate'; + $configuration->exchangeRateColumnName = 'exchange_rate'; + $configuration->targetCurrencyColumnName = 'target_currency'; + $configuration->sourceCurrencyCode = $baseCurrency; + + // this provider loads exchange rates from your database + $provider = new PDOProvider($pdo, $configuration); + + // this provider calculates exchange rates relative to the base currency + $provider = new BaseCurrencyProvider($provider, $baseCurrency); + + // this currency converter can now handle any currency pair + $this->converter = new CurrencyConverter($provider); + $this->context = new AutoContext(); + $fmt = new NumberFormatter('fr_FR', NumberFormatter::DECIMAL); + ?> +
    + +
    +
    +
    +

    lang->line('issuer_information')?>

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    lang->line('Nom'); ?>lastname ?? ''?>
    lang->line('Adresse')?>code_membre ?>
    lang->line('Contact')?>phone." | ".$agent->email ?>
    +
    +
    + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    +

    insured_amount, 2), $invoice->currency_code, $this->context)->formatTo('fr_FR')?>

    +

    lang->line('percentage_insured') ?>

    +
    +
    + +
    +
    +
    + +
    +
    +
    +

    insurer_amount, 2), $invoice->currency_code, $this->context)->formatTo('fr_FR')?>

    +

    lang->line('percentage_insurer') ?>

    +
    +
    + +
    +
    +
    + +
    +
    +
    +

    lang->line($invoice->state) ?>

    +

    lang->line('state') ?>

    +
    +
    + +
    +
    +
    + +
    + + state != 'ACCEPTED' && !empty($invoice->reason)) { ?> +
    +
    +
    +
    +

    reason?>

    +

    lang->line('reason') ?>

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

    lang->line('health_care_sheets') ?>

    +
    +
    + + + + + + + + + + + + + + + + result() as $i => $row) { + $amount = Money::of(round($row->insurance_amount + $row->insured_amount, 2), $invoice->currency_code, $this->context)->formatTo('fr_FR'); + $insurance_amount = Money::of(round($row->insurance_amount, 2), $invoice->currency_code, $this->context)->formatTo('fr_FR'); + $insured_amount = Money::of(round($row->insured_amount, 2), $invoice->currency_code, $this->context)->formatTo('fr_FR'); + + echo " + + + + + + + + "; + ?> + + + + + +
    IDTypePatientlang->line('practitioner'); ?>lang->line('insured_id'); ?>lang->line('total_amount'); ?>lang->line('total_insured_part'); ?>lang->line('total_insurance_part'); ?>Actions
    " . ($row->health_care_sheet_id) . "" . $row->type . "" . $row->patient_lastname.' '.$row->patient_firstname . "" . $row->practitioner_lastname.' '.$row->practitioner_firstname . "".$row->insured_id."".$amount."".$insured_amount."" . $insurance_amount. " + +
    +
    +
    + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +state == 'UNDER_VALIDATION') { ?> + + + + + + + diff --git a/application/views/nano_health/controller_doctor/invoices.php b/application/views/nano_health/controller_doctor/invoices.php new file mode 100755 index 00000000..9e35454e --- /dev/null +++ b/application/views/nano_health/controller_doctor/invoices.php @@ -0,0 +1,244 @@ + + + + + +
    + + +
    +

    + lang->line('invoices_history') ?> + + +

    +
    +
    +
    +
    +
    + +
    + lang->line('Période') ?> + + + + + Format : session->userdata('site_lang') === 'french' ? 'Jour - Mois - Année ' : 'Year - Month - Day' ?> +
    +
    +
    + + +
    +
    +
    +
    +
    +

    lang->line('export_invoices_list') ?>

    +
    +
    +
    +
    + + + + + + + + + + + + + + + +
    lang->line('invoice_id') ?>Emetteurlang->line('total_amount') ?>lang->line('total_insured_part') ?>lang->line('total_insurance_part') ?>Date debutDate finlang->line('state') ?>Action
    +
    +
    +
    +
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/nano_health/hyper/gestion_wallet.php b/application/views/nano_health/hyper/gestion_wallet.php index e312fba3..26ba685a 100755 --- a/application/views/nano_health/hyper/gestion_wallet.php +++ b/application/views/nano_health/hyper/gestion_wallet.php @@ -104,7 +104,7 @@ $careRequests = [];
    -
    +

    lang->line($nh_config->provider_billing_period ?? ''); ?>

    @@ -115,7 +115,7 @@ $careRequests = [];
    -
    +

    lang->line($nh_config->family_coverage_sharing ? 'Oui' : 'Non'); ?>

    @@ -126,7 +126,20 @@ $careRequests = [];
    -
    +
    +
    +
    +

    lang->line($nh_config->password_validation) ?>

    +

    lang->line('password_validation') ?>

    +
    +
    + +
    +
    +
    +
    +
    +

    max_number_of_beneficiaries ?? ''; ?>

    @@ -137,7 +150,7 @@ $careRequests = [];
    -
    +

    age_limit_of_insured_and_spouse ?? ''; ?>

    @@ -148,7 +161,7 @@ $careRequests = [];
    -
    +

    age_limit_of_child_beneficiary ?? ''; ?>

    @@ -232,7 +245,7 @@ $careRequests = [];
    -
    +

    lang->line('years_price_grid') ?>

    @@ -253,7 +266,7 @@ $careRequests = []; min_age ?> max_age ?> - markup_percentage.'%' ?> + markup_percentage).'%' ?>
    -
    +

    lang->line('months_price_grid') ?>

    @@ -276,9 +289,13 @@ $careRequests = []; - + - + + + + + @@ -289,7 +306,10 @@ $careRequests = []; - + + + + -
    @@ -470,6 +490,17 @@ $careRequests = [];
    +
    + + +
    @@ -558,7 +589,7 @@ $careRequests = [];
    - +
    lang->line('number_of_months') ?> lang->line('number_of_months') ?> lang->line('min_amount') ?> lang->line('max_insurance_coverage_amount') ?> lang->line('max_insurance_coverage_amount') ?> lang->line('waiting_period_days') ?> lang->line('payment_period') ?> lang->line('payment_duration_months') ?> lang->line('number_of_fractions') ?>
    number_of_months ?> min_amount, 2), $currency_code, $context)->formatTo('fr_FR'); ?> max_insurance_coverage_amount, 2), $currency_code, $context)->formatTo('fr_FR'); ?>waiting_period_days ?? '' ?> lang->line($row->payment_period) ?> payment_duration_months ?> number_of_fractions ?>
    min_age ?> max_age ?>markup_percentage?>markup_percentage)?> @@ -584,7 +615,7 @@ $careRequests = [];