diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php index 46923cd9..4d23a208 100755 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -2052,6 +2052,26 @@ class Hyperviseur_dash extends CI_Controller } } + public function exclusions(){ + if ($this->isLogged()) { + $data['alert'] = ""; + $data['active'] = "wallet_exclusions"; + $data['network'] = $this->session->userdata('network'); + $data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays')); + + $data['currency_code'] = $this->session->userdata('currency_code'); + $data['category'] = $this->session->userdata('category'); + $data['network_id'] = $this->session->userdata('network_id'); + + $data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id')); + $data['exclusion'] = $this->nano_health_model->getConfig($data['network_id']); + + $this->load->view('header_hyp', $data); + $this->load->view('nano_health/hyper/exclusions'); + $this->load->view('footer'); + } + } + public function drugs_and_devices(){ if ($this->isLogged()) { $data['active'] = "wallet_drugs_and_devices"; diff --git a/application/controllers/NanoHealthController.php b/application/controllers/NanoHealthController.php index 47e3759e..53c9ca1a 100644 --- a/application/controllers/NanoHealthController.php +++ b/application/controllers/NanoHealthController.php @@ -76,6 +76,7 @@ class NanoHealthController extends CI_Controller if (isset($_POST)) { $id = $_POST['id'] ?? null; $_POST['nh_network_config_id'] = $_POST['config_id']; + $_POST['amount'] = empty($_POST['amount']) ? null : $_POST['amount']; unset($_POST['config_id']); $exist = $this->db->get_where('nh_acts', ['id !=' => $id , 'nh_network_config_id' => $_POST['nh_network_config_id'] , 'code' => $_POST['code']]); diff --git a/application/language/english/message_lang.php b/application/language/english/message_lang.php index ad77768d..8e0a690d 100755 --- a/application/language/english/message_lang.php +++ b/application/language/english/message_lang.php @@ -900,5 +900,8 @@ $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" +$lang['number_of_fractions'] = "Number of fractions"; +$lang['PARTIALLY_PAID'] = "Partially paid"; +$lang['SUSPENDED'] = "Suspended"; +$lang['amount_required'] = "Amount is required"; ?> diff --git a/application/language/french/message_lang.php b/application/language/french/message_lang.php index cfb321d8..f1e30242 100755 --- a/application/language/french/message_lang.php +++ b/application/language/french/message_lang.php @@ -910,5 +910,8 @@ $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" +$lang['number_of_fractions'] = "Nombre de fractions"; +$lang['PARTIALLY_PAID'] = "Partiellement payée"; +$lang['SUSPENDED'] = "Suspendue"; +$lang['amount_required'] = "Le montant est requis"; ?> diff --git a/application/models/Nano_health_model.php b/application/models/Nano_health_model.php index 2fff4b86..abcb3ff7 100644 --- a/application/models/Nano_health_model.php +++ b/application/models/Nano_health_model.php @@ -185,4 +185,8 @@ class Nano_health_model extends CI_Model } return $query->count_all_results(); } + + public function getExclusion($id_network){ + return $this->db->get_where('nh_exclusions',['network_id'=> $id_network]); + } } diff --git a/application/models/pagination/Insurances_model.php b/application/models/pagination/Insurances_model.php index 0aa5d490..d8d129b8 100644 --- a/application/models/pagination/Insurances_model.php +++ b/application/models/pagination/Insurances_model.php @@ -39,11 +39,8 @@ class Insurances_model extends CI_Model $this->db->from($this->table); $this->db->where('network_id', $postData['id_network']); if (!empty($postData['state'])) { - if($postData['state'] == "STOPPED"){ - $this->db->where_in('state', ["STOPPED","EXPIRED"]); - }else{ - $this->db->where('state', $postData['state']); - } + $state = explode(',',$postData['state']); + $this->db->where_in('state', $state); } return $this->db->count_all_results(); } @@ -73,11 +70,8 @@ class Insurances_model extends CI_Model $this->db->where('created_at <', date('Y-m-d', strtotime($postData['endDate']. "+1 day"))); } if (!empty($postData['state'])) { - if($postData['state'] == "STOPPED"){ - $this->db->where_in('state', ["STOPPED","EXPIRED"]); - }else{ - $this->db->where('state', $postData['state']); - } + $state = explode(',',$postData['state']); + $this->db->where_in('state', $state); } $i = 0; diff --git a/application/views/header_hyp.php b/application/views/header_hyp.php index 0bebe3ef..da3951cb 100755 --- a/application/views/header_hyp.php +++ b/application/views/header_hyp.php @@ -235,6 +235,12 @@ lang->line('invoices'); ?> +
  • "> + + + Exclusions + +
  • ".$this->lang->line('Nom')." ".$this->lang->line('billing_type')." ".$this->lang->line('authorization_type')." + ".$this->lang->line('Montant')." Action"; ?> @@ -373,16 +374,19 @@ $careRequests = []; result() as $i => $row) { ?> + foreach($acts->result() as $i => $row) { + $amount = isset($row->amount) ? Money::of(round($row->amount, 2), $currency_code, $context)->formatTo('fr_FR') : '' + ?> code ?> name ?> lang->line($row->billing_type); ?> lang->line($row->authorization_type); ?> +