107 lines
5.8 KiB
PHP
Executable File
107 lines
5.8 KiB
PHP
Executable File
<?php
|
|
$adminProd = $_SESSION['adminProd'];
|
|
?>
|
|
|
|
<?php if(count($garantielienparente) > 0): ?>
|
|
<div class="table-responsive shadow-sm rounded border">
|
|
<table class="table table-sm table-hover align-middle mb-0 text-nowrap">
|
|
<thead class="table-light">
|
|
<tr class="text-center text-uppercase small fw-bold">
|
|
<th rowspan="2" class="border-end text-center"><?= _("Effet") ?></th>
|
|
<th rowspan="2" class="border-end text-center"><?= _("Lien Parenté") ?></th>
|
|
<th colspan="4" class="bg-primary bg-opacity-10 text-primary border-bottom border-primary text-center"><?= _("Plafonds & Quotas") ?></th>
|
|
<th rowspan="2" class="border-end text-center"><?= _("Remboursement") ?></th>
|
|
<th rowspan="2" class="text-center"><?= _("Carence") ?></th>
|
|
<th colspan="2" class="bg-secondary bg-opacity-10 border-bottom border-secondary text-center"><?= _("TM / Forfait") ?></th>
|
|
<th colspan="2" class="bg-light border-bottom text-center"><?= _("Âges") ?></th>
|
|
<th rowspan="2" class="text-center"><?= _("Actif") ?></th>
|
|
<th rowspan="2" class="text-center"><?= _("Action") ?></th>
|
|
</tr>
|
|
<tr class="text-center small bg-light-subtle">
|
|
<th class="border-start"><?= _("Plafond") ?></th>
|
|
<th><?= _("Fréq. Plafond") ?></th>
|
|
<th><?= _("Quota") ?></th>
|
|
<th class="border-end"><?= _("Fréq. Quota") ?></th>
|
|
|
|
<th class="border-start"><?= _("Taux %") ?></th>
|
|
<th class="border-end"><?= _("Montant") ?></th>
|
|
|
|
<th class="border-start"><?= _("Min") ?></th>
|
|
<th class="border-end"><?= _("Max") ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($garantielienparente as $v):
|
|
$idGarantie = $v['id'];
|
|
$supprime = $v['supprime'];
|
|
$isActif = ($this->nettoyer($v['actif']) == "1");
|
|
|
|
$plafond = ($this->nettoyer($v['forfaitPlafond'])=="9999999999") ? _("Illimité"): format_N($this->nettoyer($v['forfaitPlafond']));
|
|
$transac = ($this->nettoyer($v['nbreTransaction'])=="999") ? _("Illimité"): format_N($this->nettoyer($v['nbreTransaction']));
|
|
|
|
$lienparente = est_anglophone() ? $this->nettoyer($v['lienparenteEng']) : $this->nettoyer($v['lienparente']);
|
|
$periodicitePlafond = est_anglophone() ? $this->nettoyer($v['periodicitePlafondEng']) : $this->nettoyer($v['periodicitePlafond']);
|
|
$periodicite = est_anglophone() ? $this->nettoyer($v['periodiciteEng']) : $this->nettoyer($v['periodicite']);
|
|
?>
|
|
|
|
<tr class="text-center <?= ($supprime == '1') ? 'table-danger opacity-50' : ''; ?>">
|
|
<td class="fw-bold text-nowrap border-end"><?= dateLang($this->nettoyer($v['dateEffet']), $_SESSION['lang']); ?></td>
|
|
<td class="border-end">
|
|
<span class="badge bg-info bg-opacity-10 text-info border border-info-subtle px-2">
|
|
<?= $lienparente;?>
|
|
</span>
|
|
</td>
|
|
|
|
<td class="fw-bold text-nowrap"><?= $plafond;?></td>
|
|
<td class="text-muted"><?= $periodicitePlafond;?></td>
|
|
<td><?= $transac;?></td>
|
|
<td class="text-muted border-end"><?= $periodicite; ?></td>
|
|
|
|
<td class="fw-bold text-primary"><?= $this->nettoyer($v['codeTypeRemboursement']); ?></td>
|
|
<td><?= $this->nettoyer($v['delaiCarenceFamilleActe']);?> m</td>
|
|
|
|
<td class="fw-bold"><?= intval($this->nettoyer($v['ticketModerateur']));?> %</td>
|
|
<td class="border-end"><?= format_N($this->nettoyer($v['forfaitTm']));?></td>
|
|
|
|
<td><?= $this->nettoyer($v['ageMinimum']);?></td>
|
|
<td class="border-end"><?= $this->nettoyer($v['ageMaximum']);?></td>
|
|
|
|
<td>
|
|
<?php if($isActif): ?>
|
|
<span class="text-success"><i class="fas fa-check-circle"></i></span>
|
|
<?php else: ?>
|
|
<span class="text-muted"><i class="fas fa-times-circle"></i></span>
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<td class="px-2">
|
|
<?php if($supprime == '0'): ?>
|
|
<button type="button" class="btn btn-link text-danger p-0"
|
|
onclick="javascript:supprimer_baremegarantielienparente('<?= $adminProd?>', <?= $idGarantie ?>);"
|
|
title="<?= _("Supprimer") ?>">
|
|
<i class="fas fa-trash-alt"></i>
|
|
</button>
|
|
<?php else: ?>
|
|
<span class="badge bg-secondary text-uppercase" style="font-size: 0.6rem;"><?= _("Supprimé") ?></span>
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<?php else: ?>
|
|
<div class="alert alert-warning border-dashed text-center p-4 text-uppercase">
|
|
<i class="fas fa-info-circle fa-2x mb-2 d-block opacity-50"></i>
|
|
<?= _("Aucune règle sur Garantie par Lien de Parenté enregistrée.") ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<style>
|
|
.border-dashed { border: 2px dashed #dee2e6 !important; background: none; }
|
|
.table-hover tbody tr:hover { background-color: rgba(0, 136, 207, 0.05); }
|
|
.table td {font-size:0.75rem !important;}
|
|
.opacity-50 { text-decoration: line-through rgba(255, 0, 0, 0.4); }
|
|
</style>
|
|
|