Add family coverage sharing
This commit is contained in:
parent
3896576797
commit
6885e4d492
|
@ -44,7 +44,7 @@ class Agent extends CI_Controller
|
||||||
$data['prescriptions'] = $this->nano_health_model->getHealthCareSheetPrescriptions($data['health_care_sheet']->id ?? null);
|
$data['prescriptions'] = $this->nano_health_model->getHealthCareSheetPrescriptions($data['health_care_sheet']->id ?? null);
|
||||||
|
|
||||||
// Calcul par assuré et assurance
|
// Calcul par assuré et assurance
|
||||||
$data['amounts'] = $this->nano_health_model->calculateSheetAmountsParts($data['health_care_sheet']->id ?? null, $data['health_care_sheet']->type ?? null);
|
// $data['amounts'] = $this->nano_health_model->calculateSheetAmountsParts($data['health_care_sheet']->id ?? null, $data['health_care_sheet']->type ?? null);
|
||||||
|
|
||||||
$this->load->view('header_agent', $data);
|
$this->load->view('header_agent', $data);
|
||||||
$this->load->view('nano_health/hyper/infos_health_care_sheet');
|
$this->load->view('nano_health/hyper/infos_health_care_sheet');
|
||||||
|
|
|
@ -426,7 +426,7 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
$data['exams'] = $this->nano_health_model->getHealthCareSheetExams($data['health_care_sheet']->id ?? null);
|
$data['exams'] = $this->nano_health_model->getHealthCareSheetExams($data['health_care_sheet']->id ?? null);
|
||||||
$data['prescriptions'] = $this->nano_health_model->getHealthCareSheetPrescriptions($data['health_care_sheet']->id ?? null);
|
$data['prescriptions'] = $this->nano_health_model->getHealthCareSheetPrescriptions($data['health_care_sheet']->id ?? null);
|
||||||
// Calcul par assuré et assurance
|
// Calcul par assuré et assurance
|
||||||
$data['amounts'] = $this->nano_health_model->calculateSheetAmountsParts($data['health_care_sheet']->id ?? null, $data['health_care_sheet']->type ?? null);
|
// $data['amounts'] = $this->nano_health_model->calculateSheetAmountsParts($data['health_care_sheet']->id ?? null, $data['health_care_sheet']->type ?? null);
|
||||||
|
|
||||||
$this->load->view('header_hyp', $data);
|
$this->load->view('header_hyp', $data);
|
||||||
$this->load->view('nano_health/hyper/infos_health_care_sheet');
|
$this->load->view('nano_health/hyper/infos_health_care_sheet');
|
||||||
|
@ -666,7 +666,7 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
$oldAgent = '';
|
$oldAgent = '';
|
||||||
foreach ($query->result() as $r){
|
foreach ($query->result() as $r){
|
||||||
if($oldAgent != $r->agent)
|
if($oldAgent != $r->agent)
|
||||||
array_push($data,[]);
|
$data[] = [];
|
||||||
|
|
||||||
$row = [];
|
$row = [];
|
||||||
|
|
||||||
|
@ -688,11 +688,11 @@ class Hyperviseur_dash extends CI_Controller
|
||||||
|
|
||||||
foreach ($r as $k => $val){
|
foreach ($r as $k => $val){
|
||||||
if($k == 'type_transac'){
|
if($k == 'type_transac'){
|
||||||
array_push($row,$val =='credit' ? $this->lang->line('DEPOT') : $this->lang->line('RETRAIT'));
|
$row[] = $val == 'credit' ? $this->lang->line('DEPOT') : $this->lang->line('RETRAIT');
|
||||||
} else
|
} else
|
||||||
array_push($row,$val);
|
$row[] = $val;
|
||||||
}
|
}
|
||||||
array_push($data,$row);
|
$data[] = $row;
|
||||||
$oldAgent = $r->agent;
|
$oldAgent = $r->agent;
|
||||||
}
|
}
|
||||||
echo json_encode($data);
|
echo json_encode($data);
|
||||||
|
|
|
@ -867,4 +867,5 @@ $lang['deletion_date'] = "Date of deletion";
|
||||||
$lang['STOP_INSURANCE'] = "Stopping insurance";
|
$lang['STOP_INSURANCE'] = "Stopping insurance";
|
||||||
$lang['RENEWAL'] = "Insurance renewal";
|
$lang['RENEWAL'] = "Insurance renewal";
|
||||||
$lang['expired_insurance'] = "Insurance expired";
|
$lang['expired_insurance'] = "Insurance expired";
|
||||||
|
$lang['family_coverage_sharing'] = "Mutualisation de la couverture familiale"
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -878,4 +878,5 @@ $lang['deletion_date'] = "Date de suppression";
|
||||||
$lang['STOP_INSURANCE'] = "Arrêt de l'assurance";
|
$lang['STOP_INSURANCE'] = "Arrêt de l'assurance";
|
||||||
$lang['RENEWAL'] = "Renouvellement de l'assurance";
|
$lang['RENEWAL'] = "Renouvellement de l'assurance";
|
||||||
$lang['expired_insurance'] = "Assurances arrivées à échéance";
|
$lang['expired_insurance'] = "Assurances arrivées à échéance";
|
||||||
|
$lang['family_coverage_sharing'] = "Mutualisation de la couverture familiale"
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -104,7 +104,7 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row centered">
|
<div class="row centered">
|
||||||
<div class="col-lg-3 col-xs-6">
|
<div class="col-lg-4 col-xs-6">
|
||||||
<div class="small-box bg-red-active">
|
<div class="small-box bg-red-active">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?= $this->lang->line($nh_config->provider_billing_period ?? ''); ?></h3>
|
<h3><?= $this->lang->line($nh_config->provider_billing_period ?? ''); ?></h3>
|
||||||
|
@ -115,7 +115,7 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3 col-xs-6">
|
<div class="col-lg-4 col-xs-6">
|
||||||
<div class="small-box bg-orange">
|
<div class="small-box bg-orange">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?= Money::of(round($nh_config->coverage_limit_per_insured_per_year ?? 0, 2), $curreny_code, $context)->formatTo('fr_FR'); ?></h3>
|
<h3><?= Money::of(round($nh_config->coverage_limit_per_insured_per_year ?? 0, 2), $curreny_code, $context)->formatTo('fr_FR'); ?></h3>
|
||||||
|
@ -126,7 +126,20 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 col-xs-6">
|
<div class="col-lg-4 col-xs-6">
|
||||||
|
<div class="small-box bg-orange">
|
||||||
|
<div class="inner">
|
||||||
|
<h3><?= $this->lang->line($nh_config->family_coverage_sharing ? 'Oui' : 'Non'); ?></h3>
|
||||||
|
<p><?= $this->lang->line('family_coverage_sharing') ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="fa fa-group"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row centered">
|
||||||
|
<div class="col-lg-4 col-xs-6">
|
||||||
<div class="small-box bg-aqua-active">
|
<div class="small-box bg-aqua-active">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?= $nh_config->max_number_of_beneficiaries ?? ''; ?></h3>
|
<h3><?= $nh_config->max_number_of_beneficiaries ?? ''; ?></h3>
|
||||||
|
@ -137,7 +150,7 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 col-xs-6">
|
<div class="col-lg-4 col-xs-6">
|
||||||
<div class="small-box bg-aqua-active">
|
<div class="small-box bg-aqua-active">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?= $nh_config->age_limit_of_insured_and_spouse ?? ''; ?></h3>
|
<h3><?= $nh_config->age_limit_of_insured_and_spouse ?? ''; ?></h3>
|
||||||
|
@ -148,7 +161,7 @@ $careRequests = [];
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 col-xs-6">
|
<div class="col-lg-4 col-xs-6">
|
||||||
<div class="small-box bg-aqua-active">
|
<div class="small-box bg-aqua-active">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3><?= $nh_config->age_limit_of_child_beneficiary ?? ''; ?></h3>
|
<h3><?= $nh_config->age_limit_of_child_beneficiary ?? ''; ?></h3>
|
||||||
|
@ -452,6 +465,10 @@ $careRequests = [];
|
||||||
<input type="number" min="0" step="0.01" required class="form-control"
|
<input type="number" min="0" step="0.01" required class="form-control"
|
||||||
name="coverage_limit_per_insured_per_year" value="<?= $nh_config->coverage_limit_per_insured_per_year ?? 0 ?>">
|
name="coverage_limit_per_insured_per_year" value="<?= $nh_config->coverage_limit_per_insured_per_year ?? 0 ?>">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-form-label" style="margin-right: 5px"><?= $this->lang->line('family_coverage_sharing'); ?></label>
|
||||||
|
<input type="checkbox" name="family_coverage_sharing">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group" style="margin-top: 40px">
|
<div class="form-group" style="margin-top: 40px">
|
||||||
<label class="col-form-label"><?= $this->lang->line('max_number_of_beneficiaries'); ?></label>
|
<label class="col-form-label"><?= $this->lang->line('max_number_of_beneficiaries'); ?></label>
|
||||||
|
@ -796,21 +813,26 @@ $careRequests = [];
|
||||||
var selectedActId = null;
|
var selectedActId = null;
|
||||||
var selectedClassId = null;
|
var selectedClassId = null;
|
||||||
|
|
||||||
|
// Init checkbox
|
||||||
|
$('input[name=family_coverage_sharing]').prop("checked", <?= $nh_config->family_coverage_sharing ?>);
|
||||||
|
|
||||||
$('#updateWallet').click(function () {
|
$('#updateWallet').click(function () {
|
||||||
var network_id = $(this).data('network-id');
|
var network_id = $(this).data('network-id');
|
||||||
|
|
||||||
if ($('#walletForm')[0].checkValidity()) {
|
if ($('#walletForm')[0].checkValidity()) {
|
||||||
var age_limit_of_insured_and_spouse = parseFloat($('input[name=age_limit_of_insured_and_spouse]').val());
|
const family_coverage_sharing = $('input[name=family_coverage_sharing]').prop('checked') ? 1 : 0;
|
||||||
var age_limit_of_child_beneficiary = parseFloat($('input[name=age_limit_of_child_beneficiary]').val());
|
|
||||||
|
|
||||||
var current_affection_percentage_insurer = parseFloat($('input[name=current_affection_percentage_insurer]').val());
|
const age_limit_of_insured_and_spouse = parseFloat($('input[name=age_limit_of_insured_and_spouse]').val());
|
||||||
var current_affection_percentage_insured = parseFloat($('input[name=current_affection_percentage_insured]').val());
|
const age_limit_of_child_beneficiary = parseFloat($('input[name=age_limit_of_child_beneficiary]').val());
|
||||||
|
|
||||||
var long_term_affection_percentage_insurer = parseFloat($('input[name=long_term_affection_percentage_insurer]').val());
|
const current_affection_percentage_insurer = parseFloat($('input[name=current_affection_percentage_insurer]').val());
|
||||||
var long_term_affection_percentage_insured = parseFloat($('input[name=long_term_affection_percentage_insured]').val());
|
const current_affection_percentage_insured = parseFloat($('input[name=current_affection_percentage_insured]').val());
|
||||||
|
|
||||||
var exoneration_percentage_insurer = parseFloat($('input[name=exoneration_percentage_insurer]').val());
|
const long_term_affection_percentage_insurer = parseFloat($('input[name=long_term_affection_percentage_insurer]').val());
|
||||||
var exoneration_percentage_insured = parseFloat($('input[name=exoneration_percentage_insured]').val());
|
const long_term_affection_percentage_insured = parseFloat($('input[name=long_term_affection_percentage_insured]').val());
|
||||||
|
|
||||||
|
const exoneration_percentage_insurer = parseFloat($('input[name=exoneration_percentage_insurer]').val());
|
||||||
|
const exoneration_percentage_insured = parseFloat($('input[name=exoneration_percentage_insured]').val());
|
||||||
|
|
||||||
if(age_limit_of_insured_and_spouse < age_limit_of_child_beneficiary){
|
if(age_limit_of_insured_and_spouse < age_limit_of_child_beneficiary){
|
||||||
toastr.error("<?= $this->lang->line('age_limit_rule')?>", "<?= $this->lang->line('management_rule')?>");
|
toastr.error("<?= $this->lang->line('age_limit_rule')?>", "<?= $this->lang->line('management_rule')?>");
|
||||||
|
@ -832,6 +854,7 @@ $careRequests = [];
|
||||||
"age_limit_of_insured_and_spouse": $("input[name=age_limit_of_insured_and_spouse]").val(),
|
"age_limit_of_insured_and_spouse": $("input[name=age_limit_of_insured_and_spouse]").val(),
|
||||||
"age_limit_of_child_beneficiary": $("input[name=age_limit_of_child_beneficiary]").val(),
|
"age_limit_of_child_beneficiary": $("input[name=age_limit_of_child_beneficiary]").val(),
|
||||||
"coverage_limit_per_insured_per_year": $("input[name=coverage_limit_per_insured_per_year]").val(),
|
"coverage_limit_per_insured_per_year": $("input[name=coverage_limit_per_insured_per_year]").val(),
|
||||||
|
"family_coverage_sharing" : family_coverage_sharing,
|
||||||
"current_affection_percentage_insurer": current_affection_percentage_insurer,
|
"current_affection_percentage_insurer": current_affection_percentage_insurer,
|
||||||
"current_affection_percentage_insured": current_affection_percentage_insured,
|
"current_affection_percentage_insured": current_affection_percentage_insured,
|
||||||
"long_term_affection_percentage_insurer": long_term_affection_percentage_insurer,
|
"long_term_affection_percentage_insurer": long_term_affection_percentage_insurer,
|
||||||
|
|
|
@ -225,7 +225,7 @@
|
||||||
<div class="col-lg-4 col-xs-6">
|
<div class="col-lg-4 col-xs-6">
|
||||||
<div class="small-box bg-blue-active">
|
<div class="small-box bg-blue-active">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3 style="white-space: pre-wrap; font-size: 1.9em;"><?=Money::of(round($amounts[0], 2), $health_care_sheet->currency_code, $this->context)->formatTo('fr_FR')?> </h3>
|
<h3 style="white-space: pre-wrap; font-size: 1.9em;"><?=Money::of(round($health_care_sheet->insured_amount, 2), $health_care_sheet->currency_code, $this->context)->formatTo('fr_FR')?> </h3>
|
||||||
<p><?= $this->lang->line('percentage_insured') ?></p>
|
<p><?= $this->lang->line('percentage_insured') ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
|
@ -237,7 +237,7 @@
|
||||||
<div class="col-lg-4 col-xs-6">
|
<div class="col-lg-4 col-xs-6">
|
||||||
<div class="small-box bg-blue-active">
|
<div class="small-box bg-blue-active">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3 style="white-space: pre-wrap; font-size: 1.9em;"><?= Money::of(round($amounts[1], 2), $health_care_sheet->currency_code, $this->context)->formatTo('fr_FR')?> </h3>
|
<h3 style="white-space: pre-wrap; font-size: 1.9em;"><?= Money::of(round($health_care_sheet->insurance_amount, 2), $health_care_sheet->currency_code, $this->context)->formatTo('fr_FR')?> </h3>
|
||||||
<p><?= $this->lang->line('percentage_insurer') ?></p>
|
<p><?= $this->lang->line('percentage_insurer') ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
|
|
Loading…
Reference in New Issue