Remove coverage limit amount per year
This commit is contained in:
parent
6885e4d492
commit
3961ebd236
|
@ -693,7 +693,7 @@ $lang['add_provider_class'] = "Add a provider class";
|
|||
$lang['edit_provider_class'] = "Edit a class";
|
||||
$lang['delete_provider_class'] = "Delete a provider class";
|
||||
$lang['provider_class_deleted'] = "Deleted provider class";
|
||||
$lang['first_rule_months_price_grid'] = "The minimum amount must not exceed the coverage limit per year";
|
||||
$lang['first_rule_months_price_grid'] = "The minimum amount must not exceed the insurance coverage limit amount";
|
||||
$lang['subscriptions_history'] = "Subscription history";
|
||||
$lang['bonus_amount'] = "Bonus amount";
|
||||
$lang['number_of_beneficiaries'] = "Number of beneficiaries";
|
||||
|
@ -867,5 +867,6 @@ $lang['deletion_date'] = "Date of deletion";
|
|||
$lang['STOP_INSURANCE'] = "Stopping insurance";
|
||||
$lang['RENEWAL'] = "Insurance renewal";
|
||||
$lang['expired_insurance'] = "Insurance expired";
|
||||
$lang['family_coverage_sharing'] = "Mutualisation de la couverture familiale"
|
||||
$lang['family_coverage_sharing'] = "Family coverage pooling";
|
||||
$lang['max_insurance_coverage_amount'] = "Insurance coverage limit amount";
|
||||
?>
|
||||
|
|
|
@ -705,7 +705,7 @@ $lang['add_provider_class'] = "Ajouter une classe de prestataire";
|
|||
$lang['edit_provider_class'] = "Modifier une classe";
|
||||
$lang['delete_provider_class'] = "Suppression d'une classe de prestataire";
|
||||
$lang['provider_class_deleted'] = "Classe de prestataire supprimée";
|
||||
$lang['first_rule_months_price_grid'] = "Le montant minimal ne doit pas être supérieur à la limite de couverture par an";
|
||||
$lang['first_rule_months_price_grid'] = "Le montant minimal ne doit pas être supérieur à la limite de couverture d'assurance";
|
||||
$lang['subscriptions_history'] = "Historique des souscriptions";
|
||||
$lang['bonus_amount'] = "Montant de la prime";
|
||||
$lang['number_of_beneficiaries'] = "Nombre d’ayants droit";
|
||||
|
@ -878,5 +878,6 @@ $lang['deletion_date'] = "Date de suppression";
|
|||
$lang['STOP_INSURANCE'] = "Arrêt de l'assurance";
|
||||
$lang['RENEWAL'] = "Renouvellement de l'assurance";
|
||||
$lang['expired_insurance'] = "Assurances arrivées à échéance";
|
||||
$lang['family_coverage_sharing'] = "Mutualisation de la couverture familiale"
|
||||
$lang['family_coverage_sharing'] = "Mutualisation de la couverture familiale";
|
||||
$lang['max_insurance_coverage_amount'] = "Montant limite de couverture d'assurance";
|
||||
?>
|
||||
|
|
|
@ -279,7 +279,7 @@ class Wallet_model extends CI_Model
|
|||
}
|
||||
|
||||
public function disableConfigWallet($network_id){
|
||||
$query = $this->db->query("UPDATE `configWallet` SET enabled = 0 WHERE `configWallet`.`id_network` = '".$network_id."'");
|
||||
$query = $this->db->query("UPDATE `configWallet` SET enabled = 0 AND type = null WHERE `configWallet`.`id_network` = '".$network_id."'");
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ $careRequests = [];
|
|||
</div>
|
||||
</div>
|
||||
<div class="row centered">
|
||||
<div class="col-lg-4 col-xs-6">
|
||||
<div class="col-lg-3 col-xs-3">
|
||||
<div class="small-box bg-red-active">
|
||||
<div class="inner">
|
||||
<h3><?= $this->lang->line($nh_config->provider_billing_period ?? ''); ?></h3>
|
||||
|
@ -115,18 +115,7 @@ $careRequests = [];
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-xs-6">
|
||||
<div class="small-box bg-orange">
|
||||
<div class="inner">
|
||||
<h3><?= Money::of(round($nh_config->coverage_limit_per_insured_per_year ?? 0, 2), $curreny_code, $context)->formatTo('fr_FR'); ?></h3>
|
||||
<p><?= $this->lang->line('coverage_limit_per_insured_per_year') ?> </p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="ion ion-cash"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-xs-6">
|
||||
<div class="col-lg-3 col-xs-3">
|
||||
<div class="small-box bg-orange">
|
||||
<div class="inner">
|
||||
<h3><?= $this->lang->line($nh_config->family_coverage_sharing ? 'Oui' : 'Non'); ?></h3>
|
||||
|
@ -137,9 +126,7 @@ $careRequests = [];
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row centered">
|
||||
<div class="col-lg-4 col-xs-6">
|
||||
<div class="col-lg-2 col-xs-6">
|
||||
<div class="small-box bg-aqua-active">
|
||||
<div class="inner">
|
||||
<h3><?= $nh_config->max_number_of_beneficiaries ?? ''; ?></h3>
|
||||
|
@ -150,7 +137,7 @@ $careRequests = [];
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-xs-6">
|
||||
<div class="col-lg-2 col-xs-6">
|
||||
<div class="small-box bg-aqua-active">
|
||||
<div class="inner">
|
||||
<h3><?= $nh_config->age_limit_of_insured_and_spouse ?? ''; ?></h3>
|
||||
|
@ -161,7 +148,7 @@ $careRequests = [];
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-xs-6">
|
||||
<div class="col-lg-2 col-xs-6">
|
||||
<div class="small-box bg-aqua-active">
|
||||
<div class="inner">
|
||||
<h3><?= $nh_config->age_limit_of_child_beneficiary ?? ''; ?></h3>
|
||||
|
@ -289,8 +276,9 @@ $careRequests = [];
|
|||
<table class="table table-bordered" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50"><?= $this->lang->line('number_of_months') ?> </th>
|
||||
<th width="80"><?= $this->lang->line('number_of_months') ?> </th>
|
||||
<th><?= $this->lang->line('min_amount') ?> </th>
|
||||
<th width="180"><?= $this->lang->line('max_insurance_coverage_amount') ?> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -300,6 +288,8 @@ $careRequests = [];
|
|||
<tr>
|
||||
<td><?= $row->number_of_months ?></td>
|
||||
<td><?= Money::of(round($row->min_amount, 2), $curreny_code, $context)->formatTo('fr_FR'); ?></td>
|
||||
<td><?= Money::of(round($row->max_insurance_coverage_amount, 2), $curreny_code, $context)->formatTo('fr_FR'); ?></td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
@ -460,11 +450,6 @@ $careRequests = [];
|
|||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label"><?= $this->lang->line('coverage_limit_per_insured_per_year'); ?></label>
|
||||
<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 ?>">
|
||||
</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">
|
||||
|
@ -627,6 +612,7 @@ $careRequests = [];
|
|||
<tr>
|
||||
<th><?= $this->lang->line('number_of_months') ?> </th>
|
||||
<th><?= $this->lang->line('min_amount') ?> </th>
|
||||
<th><?= $this->lang->line('max_insurance_coverage_amount') ?> </th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -637,6 +623,7 @@ $careRequests = [];
|
|||
<tr>
|
||||
<td><?= $row->number_of_months ?></td>
|
||||
<td><?= $row->min_amount ?></td>
|
||||
<td><?= $row->max_insurance_coverage_amount ?></td>
|
||||
<td>
|
||||
<a class="add add2" title="Add" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
<a class="edit edit2" title="Edit" data-toggle="tooltip"><i class="material-icons"></i></a>
|
||||
|
@ -853,7 +840,6 @@ $careRequests = [];
|
|||
"max_number_of_beneficiaries": $("input[name=max_number_of_beneficiaries]").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(),
|
||||
"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_insured": current_affection_percentage_insured,
|
||||
|
@ -958,8 +944,9 @@ $careRequests = [];
|
|||
row.push(parseFloat($(item).html()));
|
||||
});
|
||||
arrayItem.nh_network_config_id = config_id
|
||||
arrayItem.number_of_months = row[0];
|
||||
arrayItem.min_amount = row[1];
|
||||
arrayItem.number_of_months = row[0];
|
||||
arrayItem.min_amount = row[1];
|
||||
arrayItem.max_insurance_coverage_amount = row[2];
|
||||
grid.push(arrayItem);
|
||||
});
|
||||
|
||||
|
@ -1276,7 +1263,6 @@ $careRequests = [];
|
|||
|
||||
//Months Grid
|
||||
var actions2 = $("#months_prices_grid td:last-child").html();
|
||||
let limitAmount = <?= $nh_config->coverage_limit_per_insured_per_year ?? 0 ?>;
|
||||
|
||||
// Append table with add row form on add new button click
|
||||
$(".new2").click(function () {
|
||||
|
@ -1290,6 +1276,7 @@ $careRequests = [];
|
|||
var row = '<tr>' +
|
||||
'<td><input type="number" required min="1" class="form-control" name="number_of_months"></td>' +
|
||||
'<td><input type="number" required min="0" step="0.01" class="form-control" name="min_amount" ></td>' +
|
||||
'<td><input type="number" required min="0" step="0.01" class="form-control" name="max_insurance_coverage_amount" ></td>' +
|
||||
'<td> ' + actions2 + '</td>' +
|
||||
'</tr>';
|
||||
$("#months_prices_grid").append(row);
|
||||
|
@ -1301,10 +1288,11 @@ $careRequests = [];
|
|||
var empty = false;
|
||||
var input = $(this).parents("tr").find('input[type="number"]');
|
||||
var minAmount = parseFloat($(this).parents("tr").find('input[name="min_amount"]').first().val());
|
||||
var maxAmount = parseFloat($(this).parents("tr").find('input[name="max_insurance_coverage_amount"]').first().val());
|
||||
|
||||
input.each(function () {
|
||||
if ($(this).attr('name') == 'min_amount') {
|
||||
if (minAmount > limitAmount) {
|
||||
if (minAmount > maxAmount) {
|
||||
$(this).addClass("error");
|
||||
$(this)[0].reportValidity();
|
||||
empty = true;
|
||||
|
@ -1338,6 +1326,8 @@ $careRequests = [];
|
|||
$(this).html('<input type="number" required class="form-control" min="1" name="number_of_months" value="' + $(this).text() + '">');
|
||||
if (index == 1)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" step="0.01" name="min_amount" value="' + $(this).text() + '">');
|
||||
if (index == 2)
|
||||
$(this).html('<input type="number" required class="form-control" min="0" step="0.01" name="max_insurance_coverage_amount" value="' + $(this).text() + '">');
|
||||
});
|
||||
$(this).parents("tr").find(".add, .edit").toggle();
|
||||
$(".new2").attr("disabled", "disabled");
|
||||
|
|
Loading…
Reference in New Issue