148 lines
7.7 KiB
PHP
148 lines
7.7 KiB
PHP
<?php
|
|
$nbFactAntiDate = $this->nettoyer($avenant['nbFactAntiDate']);
|
|
$taxLabel = (isset($_SESSION['composanteprime']['Taxes'])) ? _($_SESSION['composanteprime']['Taxes']) : _("Taxes");
|
|
?>
|
|
|
|
<div class="card shadow-sm border-0 mb-4 animate__animated animate__fadeIn">
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table id="table_retrait_assures" class="table table-striped table-hover align-middle border" style="width:100%; font-size:8pt;">
|
|
<thead class="table-dark text-nowrap">
|
|
<tr>
|
|
<th class="text-center small"><?= _("Cat") ?></th>
|
|
<th class="text-start"><?= _("Nom & Prénoms") ?></th>
|
|
<th class="text-center">Type</th>
|
|
<th class="text-center">No</th>
|
|
<th class="text-center"><?= _("Entrée") ?></th>
|
|
<th class="text-center"><?= _("Durée") ?></th>
|
|
<th class="text-center"><?= _("Dur Rist") ?></th>
|
|
<th class="text-center"><?= _("Ratio") ?></th>
|
|
<th class="text-center"><?= _("S/P") ?></th>
|
|
<th class="text-center"><?= _("P. Non Acquise") ?></th>
|
|
<th class="text-center"><?= _("P. Nette Rist") ?></th>
|
|
<th class="text-center"><?= $taxLabel ?></th>
|
|
<th class="text-center"><?= _("Ttc Rist") ?></th>
|
|
<th class="text-center no-export" width="5%"><?= _("Choix") ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($beneficiaires as $beneficiaire): ?>
|
|
<tr class="text-nowrap">
|
|
<td class="text-center"><?= $this->nettoyer($beneficiaire['codeProduit']) ?></td>
|
|
<td class="text-start fw-bold"><?= $this->nettoyer($beneficiaire['nomBeneficiaire']) ?></td>
|
|
<td class="text-center"><?= $this->nettoyer($beneficiaire['codeLienParente']) ?></td>
|
|
<td class="text-center text-muted small"><?= $this->nettoyer($beneficiaire['numeroBeneficiaire']) ?></td>
|
|
<td class="text-center"><?= dateLang($this->nettoyer($beneficiaire['dateEntree']), $_SESSION['lang']) ?></td>
|
|
<td class="text-center"><?= $this->nettoyer($beneficiaire['duree']) ?></td>
|
|
<td class="text-center"><?= $this->nettoyer($beneficiaire['duree_non_acquise']) ?></td>
|
|
<td class="text-center small"><?= $this->nettoyer($beneficiaire['ratioNonAcquise']) ?></td>
|
|
<td class="text-center"><?= $this->nettoyer($beneficiaire['rapportsp']) ?>%</td>
|
|
<td class="text-center fw-bold text-danger"><?= format_N($this->nettoyer($beneficiaire['primeNonAcquise'])) ?></td>
|
|
<td class="text-center"><?= format_N($this->nettoyer($beneficiaire['primeHt'])) ?></td>
|
|
<td class="text-center"><?= format_N($this->nettoyer($beneficiaire['taxe'])) ?></td>
|
|
<td class="text-center fw-bold text-primary"><?= format_N($this->nettoyer($beneficiaire['primeTtc'])) ?></td>
|
|
|
|
<td class="text-center">
|
|
<div class="form-check form-switch d-inline-block">
|
|
<input class="form-check-input" type="checkbox"
|
|
value="<?= ($beneficiaire['choix'] == '1') ? '1' : '0' ?>"
|
|
<?= ($beneficiaire['choix'] == '1') ? 'checked' : '' ?>
|
|
onchange="toggleBeneficiaireSelection(this, <?= $beneficiaire['idBeneficiaire_temp'] ?>);">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="bg-light p-3 d-flex flex-wrap gap-2 justify-content-center border-top">
|
|
<button type="button" class="btn btn-outline-info px-4 fw-bold shadow-sm rounded-pill" onclick="pop_afficher_selection_retrait();">
|
|
<i class="fas fa-user-plus me-2"></i><?= _("Sélectionner Assurés") ?>
|
|
</button>
|
|
<button type="button" class="btn btn-danger px-4 fw-bold shadow-sm rounded-pill text-uppercase" onclick="recapituler_retrait();">
|
|
<i class="fas fa-calculator me-2"></i><?= _("Récapituler") ?>
|
|
</button>
|
|
<button type="button" class="btn btn-primary px-4 fw-bold shadow-sm rounded-pill text-uppercase" onclick="enregistrer_retrait();">
|
|
<i class="fas fa-save me-2"></i><?= _("Enregistrer le retrait") ?>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if ($nbFactAntiDate > 1): ?>
|
|
<div class="alert alert-custom-danger d-flex align-items-center animate__animated animate__headShake" role="alert">
|
|
<i class="fas fa-exclamation-triangle fa-2x me-3"></i>
|
|
<div>
|
|
<h5 class="alert-heading mb-1 fw-bold"><?= _("Alerte de cohérence") ?></h5>
|
|
<p class="mb-0"><?= sprintf(_("Attention, cette police possède %d factures plus anciennes que la date de retrait !"), $nbFactAntiDate) ?></p>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="d-flex align-items-center justify-content-between mb-3 mt-5">
|
|
<h5 class="fw-bold text-uppercase mb-0 text-secondary border-start border-4 border-info ps-3">
|
|
<?= _("Détail des assurés à retirer") ?>
|
|
</h5>
|
|
<input type="hidden" id="nbAliment" name="nbAliment" value="<?= $this->nettoyer($avenant['nbAliment']) ?>">
|
|
<span class="badge bg-info shadow-sm px-3 py-2"><?= _("Effectif") ?> : <?= $this->nettoyer($avenant['nbAliment']) ?></span>
|
|
</div>
|
|
|
|
<div class="card shadow-sm border-0">
|
|
<div class="table-responsive py-2">
|
|
<table id="table_retrait_assures" class="table table-hover align-middle border shadow-sm" style="width:100%; font-size: 8.5pt;">
|
|
<thead class="table-dark">
|
|
<tr class="text-center text-nowrap">
|
|
<th><?= _("Cat") ?></th>
|
|
<th><?= _("Nom & Prénoms") ?></th>
|
|
<th><?= _("Type") ?></th>
|
|
<th><?= _("N° Assuré") ?></th>
|
|
<th><?= _("Entrée") ?></th>
|
|
<th><?= _("Durée") ?></th>
|
|
<th><?= _("S/P") ?></th>
|
|
<th class="bg-secondary text-white"><?= _("Non Acquise") ?></th>
|
|
<th class="bg-primary text-white"><?= _("TTC Rist") ?></th>
|
|
<th class="text-center"><?= _("Action") ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($beneficiaires_sel as $b): ?>
|
|
<tr class="text-center">
|
|
<td><?= $this->nettoyer($b['codeProduit']) ?></td>
|
|
<td class="text-start fw-bold"><?= $this->nettoyer($b['nomBeneficiaire']) ?></td>
|
|
<td><span class="badge bg-light text-dark border"><?= $this->nettoyer($b['codeLienParente']) ?></span></td>
|
|
<td class="text-muted"><?= $this->nettoyer($b['numeroBeneficiaire']) ?></td>
|
|
<td><?= dateLang($this->nettoyer($b['dateEntree']), $_SESSION['lang']) ?></td>
|
|
<td><?= $this->nettoyer($b['duree']) ?> <small>j</small></td>
|
|
<td><?= $this->nettoyer($b['rapportsp']) ?>%</td>
|
|
<td class="fw-bold text-danger"><?= format_N($this->nettoyer($b['primeNonAcquise'])) ?></td>
|
|
<td class="fw-bold text-primary"><?= format_N($this->nettoyer($b['primeTtc'])) ?></td>
|
|
<td>
|
|
<div class="form-check form-switch d-inline-block">
|
|
<input class="form-check-input" type="checkbox"
|
|
<?= ($b['choix'] == '1') ? 'checked' : '' ?>
|
|
onclick="beneficiaire_a_retirer(this.checked ? '1' : '0', <?= $b['idBeneficiaire_temp'] ?>);">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
/* Design Alertes */
|
|
.alert-custom-danger { background-color: #fff5f5; border-left: 5px solid #dc3545; color: #842029; box-shadow: 0 2px 10px rgba(220, 53, 69, 0.1); }
|
|
|
|
/* Boutons et Inputs */
|
|
.custom-switch { cursor: pointer; width: 2.5em !important; height: 1.25em !important; }
|
|
.custom-switch:checked { background-color: #0d6efd; border-color: #0d6efd; }
|
|
|
|
/* Table Styling */
|
|
.table-hover tbody tr:hover { background-color: rgba(13, 110, 253, 0.05); }
|
|
.shadow-sm { box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important; }
|
|
|
|
/* Badge contextuel */
|
|
.bg-light-subtle { background-color: #f8f9fa; }
|
|
</style>
|