diff --git a/application/controllers/Admin_dash.php b/application/controllers/Admin_dash.php index 81ae1cbd..d5849640 100755 --- a/application/controllers/Admin_dash.php +++ b/application/controllers/Admin_dash.php @@ -205,7 +205,7 @@ class Admin_dash extends CI_Controller $data["commission"] = Money::of(round($row->balance_com, 2), $this->session->userdata('currency_code'), $context)->formatTo('fr_FR'); $data["principal"] = Money::of(round($row->balance_princ, 2), $this->session->userdata('currency_code'), $context)->formatTo('fr_FR'); $data['wallet_id'] = $row->wallet_id; - $data['curreny_code'] = $this->session->userdata('currency_code'); + $data['currency_code'] = $this->session->userdata('currency_code'); $res = $this->wallet_model->getWalletPassword($id_network); diff --git a/application/controllers/Hyperviseur_dash.php b/application/controllers/Hyperviseur_dash.php index 7eb63dea..efef4392 100755 --- a/application/controllers/Hyperviseur_dash.php +++ b/application/controllers/Hyperviseur_dash.php @@ -527,7 +527,7 @@ class Hyperviseur_dash extends CI_Controller $data["commission"] = Money::of(round($row->balance_com, 2), $this->session->userdata('currency_code'), $context)->formatTo('fr_FR'); $data["principal"] = Money::of(round($row->balance_princ, 2), $this->session->userdata('currency_code'), $context)->formatTo('fr_FR'); $data['wallet_id'] = $row->wallet_id; - $data['curreny_code'] = $this->session->userdata('currency_code'); + $data['currency_code'] = $this->session->userdata('currency_code'); $this->load->view('header_hyp', $data); if ($data['hasWallet']->first_row()->type == 'visa') diff --git a/application/controllers/Superviseur_dash.php b/application/controllers/Superviseur_dash.php index 9dc65c3e..bee090cb 100755 --- a/application/controllers/Superviseur_dash.php +++ b/application/controllers/Superviseur_dash.php @@ -195,13 +195,7 @@ class Superviseur_dash extends CI_Controller // Wallet public function wallet() { - if (!$this->session->userdata('email')) { - $this->session->set_flashdata('error', 'log in first'); - - $data['alert'] = "ok"; - $data['message'] = "Login first!"; - $this->load->view('login', $data); - } else { + if ($this->isLogged()) { $id_network = $this->session->userdata('network_id'); $data["commission"] = ""; $data["principal"] = ""; @@ -232,6 +226,7 @@ class Superviseur_dash extends CI_Controller //Fetch all transactions of any geolocated agent of the network $data["transactions"] = array(); + $transactions = []; if ($agents_g) { foreach ($agents_g->result() as $row) { $wallet = $this->wallet_model->getWallet($row->agent_id); @@ -244,7 +239,7 @@ class Superviseur_dash extends CI_Controller if ($transactions) { foreach ($transactions->result() as $trans) { $trans->agent_id = $row->agent_id; // Add agent id to transaction - array_push($data['transactions'], $trans); + $data['transactions'][] = $trans; } } } @@ -257,7 +252,18 @@ class Superviseur_dash extends CI_Controller $data["transactions"] = false; } + if($data['hasWallet']->first_row()->type == 'ilink_sante') { + $nh_config = $this->nano_health_model->getConfig($id_network); + $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['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']); + $data['provider_classes'] = $this->nano_health_model->getProviderClasses($data['config_id']); + } + $data['country'] = $this->session->userdata('current_pays'); $data['currency_code'] = $this->session->userdata('currency_code'); $data['alert'] = ""; $data['active'] = "wallet"; @@ -275,6 +281,8 @@ class Superviseur_dash extends CI_Controller $this->load->view('gestion_wallet_sup'); elseif ($data['hasWallet']->first_row()->type == 'ilink') $this->load->view('gestion_wallet_sup_ilink'); + elseif ($data['hasWallet']->first_row()->type == 'ilink_sante') + $this->load->view('nano_health/super/gestion_wallet'); $this->load->view('footer'); } diff --git a/application/views/config_wallet_ilink_hyp/etat_soldes.php b/application/views/config_wallet_ilink_hyp/etat_soldes.php index 44246ad6..8649bd66 100755 --- a/application/views/config_wallet_ilink_hyp/etat_soldes.php +++ b/application/views/config_wallet_ilink_hyp/etat_soldes.php @@ -81,9 +81,11 @@

lang->line('export_balance_statement') ?>

- - lang->line('commission_payments_history'); ?> - + session->userdata('category') != 'super') { ?> + + lang->line('commission_payments_history'); ?> + +
@@ -111,7 +113,6 @@ session->userdata('category') != 'super') { ?> Action - lang->line('registration_date')?> @@ -142,7 +143,6 @@ - agent_registration_date?> $(function () { - anElement = new AutoNumeric('#montant', '', {digitGroupSeparator: ' ', decimalPlaces:'0', minimumValue : '1' , maximumValue: '99999999999999999999999999'}); $("#show_hide_password a").on('click', function(event) { event.preventDefault(); if($('#show_hide_password input').attr("type") == "text"){ @@ -271,14 +270,14 @@ var table = $('#transactions').DataTable({ "aaSorting": [[0, "asc"]], "columnDefs": [ - { - targets: [8], - render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format), - }, - { - "targets": [8], - "visible": false - } + // { + // targets: [8], + // render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format), + // }, + // { + // "targets": [8], + // "visible": false + // } ], dom: 'Bfrtip', "buttons": [ @@ -381,9 +380,12 @@ }); var id_wallet_agent = null; + var anElement = null; $('.payCommissionBtn').click(function () { id_wallet_agent = $(this).data('id_wallet_agent'); + anElement = new AutoNumeric('#montant', '', {digitGroupSeparator: ' ', decimalPlaces:'0', minimumValue : '1' , maximumValue: '99999999999999999999999999'}); + }) $('#resetPassword').click(function () { @@ -391,7 +393,7 @@ const network = $(this).data('network'); const country = $(this).data('country'); const email = $(this).data('email'); - let button = $(this) + let button = $(this); button.prop("disabled",true); $.ajax({ url: '', diff --git a/application/views/header_hyp.php b/application/views/header_hyp.php index 110a04f8..4cbea4a8 100755 --- a/application/views/header_hyp.php +++ b/application/views/header_hyp.php @@ -134,42 +134,44 @@ -
  • " - style="height: auto;"> - - - lang->line('Demandes de crédits'); ?> - - - - - +
  • -
  • "> - - - lang->line('Demandes adhésion'); ?> - -
  • +
  • "> + + + lang->line('Demandes adhésion'); ?> + +
  • +
  • " style="height: auto;"> diff --git a/application/views/header_sup.php b/application/views/header_sup.php index 71377dc7..1642a041 100755 --- a/application/views/header_sup.php +++ b/application/views/header_sup.php @@ -118,6 +118,7 @@
  • + first_row()->type != 'ilink_sante') { ?>
  • " style="height: auto;"> @@ -150,6 +151,7 @@ lang->line('Demandes adhésion'); ?> +
  • result() as $i => $row) { ?> number_of_months ?> - min_amount, 2), $curreny_code, $context)->formatTo('fr_FR'); ?> - max_insurance_coverage_amount, 2), $curreny_code, $context)->formatTo('fr_FR'); ?> + min_amount, 2), $currency_code, $context)->formatTo('fr_FR'); ?> + max_insurance_coverage_amount, 2), $currency_code, $context)->formatTo('fr_FR'); ?> "> + + + + + + +db->query("SELECT id FROM nh_insurances_subscriptions + WHERE MONTH(created_at) = '".$months[$i-1]."' AND YEAR(created_at) = '".$years[$i-1]."' + AND network_id ='".$this->session->userdata('network_id')."'"); + array_push($insuranceSubcriptions, $monthQuery->num_rows()); +} + +$careRequests = []; + +//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(); +//} + +?> + +
    + +
    +

    + lang->line('Gestion des wallets'). ' '. $network .' - '.$country; ?> +

    + +
    + +
    +
    +
    +
    +
    +

    +

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

    +
    +
    + +
    +
    +
    + +
    +
    +
    +

    +

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

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

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

    +

    lang->line('provider_billing_period') ?>

    +
    +
    + +
    +
    +
    +
    +
    +
    +

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

    +

    lang->line('family_coverage_sharing') ?>

    +
    +
    + +
    +
    +
    +
    +
    +
    +

    max_number_of_beneficiaries ?? ''; ?>

    +

    lang->line('max_number_of_beneficiaries') ?>

    +
    +
    + +
    +
    +
    +
    +
    +
    +

    age_limit_of_insured_and_spouse ?? ''; ?>

    +

    lang->line('age_limit_of_insured_and_spouse') ?>

    +
    +
    + +
    +
    +
    +
    +
    +
    +

    age_limit_of_child_beneficiary ?? ''; ?>

    +

    lang->line('age_limit_of_child_beneficiary') ?>

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

    current_affection_percentage_insurer ?? ''; ?>%

    +

    lang->line('current_affection').' : '.$this->lang->line('percentage_insurer') ?>

    +
    +
    + +
    +
    +
    + +
    +
    +
    +

    current_affection_percentage_insured ?? ''; ?>%

    +

    lang->line('current_affection').' : '.$this->lang->line('percentage_insured') ?>

    +
    +
    + +
    +
    +
    +
    +
    +
    +

    long_term_affection_percentage_insurer ?? ''; ?>%

    +

    lang->line('long_term_affection').' : '.$this->lang->line('percentage_insurer') ?>

    +
    +
    + +
    +
    +
    + +
    +
    +
    +

    long_term_affection_percentage_insured ?? ''; ?>%

    +

    lang->line('long_term_affection').' : '.$this->lang->line('percentage_insured') ?>

    +
    +
    + +
    +
    +
    +
    +
    +
    +

    exoneration_percentage_insurer ?? ''; ?>%

    +

    lang->line('exoneration').' : '.$this->lang->line('percentage_insurer') ?>

    +
    +
    + +
    +
    +
    + +
    +
    +
    +

    exoneration_percentage_insured ?? ''; ?>%

    +

    lang->line('exoneration').' : '.$this->lang->line('percentage_insured') ?>

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

    lang->line('years_price_grid') ?>

    +
    +
    + + + + + + + + + + result() as $i => $row) { ?> + + + + + + + +
    lang->line('min_age')?>lang->line('max_age') ?> lang->line('markup_percentage') ; ?>
    min_age ?>max_age ?>markup_percentage.'%' ?>
    +
    +
    +
    +
    +
    +
    +

    lang->line('months_price_grid') ?>

    +
    +
    + + + + + + + + + + result() as $i => $row) { ?> + + + + + + + + +
    lang->line('number_of_months') ?> lang->line('min_amount') ?> lang->line('max_insurance_coverage_amount') ?>
    number_of_months ?>min_amount, 2), $currency_code, $context)->formatTo('fr_FR'); ?>max_insurance_coverage_amount, 2), $currency_code, $context)->formatTo('fr_FR'); ?>
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +

    lang->line('list_of_acts') ?>

    +
    +
    +
    +
    + + + + # + + + + + "; + ?> + + + + result() as $i => $row) { ?> + + + + + + + + + +
    Code".$this->lang->line('Nom')."".$this->lang->line('billing_type')."".$this->lang->line('authorization_type')."
    code ?>name ?>lang->line($row->billing_type); ?>lang->line($row->authorization_type); ?>
    +
    +
    +
    +
    +
    +
    +

    lang->line('provider_classes') ?>

    +
    + +
    +
    +
    + + + + # + + "; + ?> + + + + result() as $i => $row) { ?> + + + + + + +
    ".$this->lang->line('Nom')."
    name ?>
    +
    +
    +
    +
    + + load->view('include/loader') ?> +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +