newdesigngestionnaire/Vue/Ajaxbaremelettrecle/detailactes.php
2026-04-09 11:00:31 +00:00

106 lines
6.0 KiB
PHP

<?php
$adminProd = $_SESSION['adminProd'];
$lettreCle = $_SESSION['lettreCle'];
?>
<input type="hidden" id="idActesbaremeinitiallettrecle" name="idActesbaremeinitiallettrecle" value="<?= $_SESSION['idActesbaremeinitiallettrecle'] ?>">
<input type="hidden" id="lettreCle" name="lettreCle" value="<?= $lettreCle ?>">
<div class="modal-dialog modal-xl modal-dialog-centered" role="document">
<div class="modal-content shadow-lg border-0">
<div class="modal-header bg-light border-bottom-0 py-3">
<h5 class="modal-title d-flex align-items-center fw-bold">
<span class="badge bg-primary me-2 px-3 py-2"><?= $lettreCle ?></span>
<span class="text-dark small text-uppercase"><?= _("Détail des actes impactés") ?></span>
</h5>
<button type="button" class="btn-close shadow-none" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body p-4">
<input class="sr-only" type="text" id="datejour" name="datejour" value="<?= datelang(date('Y/m/d'), $_SESSION['lang']); ?>">
<div class="mb-3 border-start border-4 border-primary ps-3 py-1">
<p class="text-muted small mb-0 fw-bold">
<?= _("Liste chronologique des actes associés à cette lettre clé pour ce barème.") ?>
</p>
</div>
<?php if(count($detailactes) > 0): ?>
<div class="table-responsive rounded border shadow-sm">
<table class="table table-sm table-hover align-middle mb-0" style="font-size: 0.85rem;">
<thead class="table-dark">
<tr class="text-center small">
<th class="py-2 ps-3 text-start"><?= _("Libellé de l'Acte") ?></th>
<th><?= _("Coefficient") ?></th>
<th><?= _("Plafond Acte") ?></th>
<th><?= _("Ticket Mod.") ?></th>
<th><?= _("Statut") ?></th>
<th class="pe-3"><?= _("Actions") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($detailactes as $v):
$idActe = $this->nettoyer($v['id']);
$supprime = $v['supprime'];
$libelle = est_anglophone() ? $this->nettoyer($v['libelleEng']) : $this->nettoyer($v['libelle']);
$isActif = ($this->nettoyer($v['actif']) == "1");
?>
<tr class="text-center <?= ($supprime == '1') ? 'table-danger opacity-50' : ''; ?>">
<td class="text-start ps-3 fw-bold text-dark border-end"><?= $libelle ?></td>
<td class="fw-bold"><?= $this->nettoyer($v['coefficient']); ?></td>
<td class="text-primary fw-bold"><?= format_N($this->nettoyer($v['forfaitPlafond']));?></td>
<td class="text-danger"><?= $this->nettoyer($v['ticketModerateur']);?>%</td>
<td>
<?php if($isActif): ?>
<span class="badge bg-success-subtle text-success rounded-pill px-2" style="font-size: 0.7rem;">
<?= _("Oui") ?>
</span>
<?php else: ?>
<span class="badge bg-secondary-subtle text-secondary rounded-pill px-2" style="font-size: 0.7rem;">
<?= _("Non") ?>
</span>
<?php endif; ?>
</td>
<td class="pe-3">
<?php if($supprime == '0'): ?>
<button type="button" class="btn btn-sm btn-outline-danger border-0"
onClick="javascript:supprimer_baremeacte_lettre_cle_detail('<?= $adminProd?>', <?= $idActe ?>);"
title="<?= _("Supprimer") ?>">
<i class="fas fa-trash-alt"></i>
</button>
<?php else: ?>
<span class="text-muted small italic" style="font-size: 0.7rem;"><?= _("Supprimé") ?></span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php else: ?>
<div class="alert alert-warning border-dashed text-center p-5">
<i class="fas fa-search fa-3x mb-3 opacity-25"></i>
<p class="mb-0 fw-bold"><?= _("Aucun acte trouvé pour ce détail.") ?></p>
</div>
<?php endif; ?>
</div>
<div class="modal-footer bg-light border-top-0">
<button type="button" class="btn btn-secondary px-4 fw-bold shadow-sm" data-bs-dismiss="modal">
<i class="fas fa-times me-2"></i><?= _("Fermer") ?>
</button>
</div>
</div>
</div>
<style>
.border-dashed { border: 2px dashed #dee2e6 !important; background: none; }
.opacity-50 { text-decoration: line-through rgba(220, 53, 69, 0.3); }
.modal-xl { max-width: 90% !important; }
.btn-outline-danger:hover { background-color: #dc3545; color: white; }
</style>