105 lines
6.1 KiB
PHP
105 lines
6.1 KiB
PHP
<div id="div_facture_detail" class="mt-3">
|
|
<?php $actVisible = "0"; //$_SESSION['actVisible']; ?>
|
|
|
|
<div class="d-flex align-items-center bg-primary text-white p-2 rounded-top shadow-sm" style="background: linear-gradient(45deg, #0d6efd, #004085);">
|
|
<i class="fa-solid fa-hand-holding-medical me-2 ms-1"></i>
|
|
<span class="fw-bold text-uppercase small"><?= _("Prestations de la facture") ?></span>
|
|
</div>
|
|
|
|
<div class="table-responsive shadow-sm border rounded-bottom bg-white">
|
|
<table class="table table-hover align-middle mb-0" style="font-size: 0.85rem;">
|
|
<thead class="table-light">
|
|
<tr class="text-uppercase small text-muted">
|
|
<th width="12%" class="ps-3 text-center"><?= _("Date / Heure") ?></th>
|
|
<th width="8%" class="text-center"><?= _("Type") ?></th>
|
|
<th><?= _("Désignation de l'acte") ?></th>
|
|
<th class="text-center"><?= _("P.U / Valeur") ?></th>
|
|
<th class="text-center"><?= _("Qté") ?></th>
|
|
<th class="text-end"><?= _("Frais Réels") ?></th>
|
|
<th class="text-end"><?= _("Part Patient") ?></th>
|
|
<th class="text-end text-primary fw-bold"><?= _("A Rembourser") ?></th>
|
|
<th width="5%" class="text-center pe-3">Val.</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($prestations as $prestation):
|
|
$codeType = $this->nettoyer($prestation['codeTypePrestation']);
|
|
$entente = $this->nettoyer($prestation['ententePrealable']);
|
|
$auto = $this->nettoyer($prestation['autorisation']);
|
|
$valide = $this->nettoyer($prestation['valide']);
|
|
|
|
$codeActe = $this->nettoyer($prestation['codeActe']);
|
|
$libelleActe = est_anglophone() ? $this->nettoyer($prestation['libelleActeEng']) : $this->nettoyer($prestation['libelleActe']);
|
|
|
|
if($actVisible != "1") { $libelleActe = $codeActe; }
|
|
|
|
// Logique de statut (Entente ou Autorisation)
|
|
$rowClass = "";
|
|
$statusIcon = "";
|
|
|
|
if($entente == '9' || $auto == '9') {
|
|
$rowClass = "table-danger opacity-75";
|
|
$statusIcon = '<i class="fa-solid fa-circle-xmark text-danger me-2" title="'._("Refusé").'"></i>';
|
|
} elseif($entente == '2' || $auto == '2') {
|
|
$rowClass = "table-warning bg-opacity-10";
|
|
$statusIcon = '<i class="fa-solid fa-circle-exclamation text-warning me-2" title="'._("En attente").'"></i>';
|
|
} elseif($entente == '1' || $auto == '1') {
|
|
$statusIcon = '<i class="fa-solid fa-circle-check text-success me-2" title="'._("Accordé").'"></i>';
|
|
}
|
|
?>
|
|
<tr class="<?= $rowClass ?>">
|
|
<td class="ps-3 text-center small text-muted">
|
|
<?= dateheureLang($this->nettoyer($prestation['dateSysteme'])) ?>
|
|
</td>
|
|
<td class="text-center">
|
|
<span class="badge bg-secondary-subtle text-dark border fw-normal small"><?= $codeType ?></span>
|
|
</td>
|
|
<td>
|
|
<div class="d-flex align-items-center">
|
|
<?= $statusIcon ?>
|
|
<div class="text-truncate" style="max-width: 300px;">
|
|
<span class="fw-bold"><?= $libelleActe ?></span>
|
|
<?php if($actVisible == "1"): ?>
|
|
<div class="extra-small text-muted italic">Code: <?= $codeActe ?></div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td class="text-center text-monospace small"><?= format_N($this->nettoyer($prestation['valeurActe'])) ?></td>
|
|
<td class="text-center fw-bold"><?= $this->nettoyer($prestation['quantite']) ?></td>
|
|
<td class="text-end text-monospace"><?= format_N($this->nettoyer($prestation['fraisReel'])) ?></td>
|
|
<td class="text-end text-monospace text-danger small"><?= format_N($this->nettoyer($prestation['montantTm'])) ?></td>
|
|
<td class="text-end text-monospace fw-bold text-primary">
|
|
<?= format_N($this->nettoyer($prestation['montantArembourser'])) ?>
|
|
</td>
|
|
<td class="text-center pe-3">
|
|
<?php if($valide == '1'): ?>
|
|
<i class="fa-solid fa-shield-check text-success fs-5"></i>
|
|
<?php else: ?>
|
|
<span class="text-muted small"><?= $valide ?></span>
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="mt-2 d-flex justify-content-between align-items-center px-1">
|
|
<div class="d-flex gap-3 extra-small text-muted">
|
|
<span><i class="fa-solid fa-circle-check text-success"></i> <?= _("Accordé / Autorisé") ?></span>
|
|
<span><i class="fa-solid fa-circle-exclamation text-warning"></i> <?= _("En attente") ?></span>
|
|
<span><i class="fa-solid fa-circle-xmark text-danger"></i> <?= _("Refusé") ?></span>
|
|
</div>
|
|
<div class="extra-small italic text-muted">
|
|
<i class="fa-solid fa-info-circle me-1"></i><?= _("Les montants sont exprimés en monnaie locale.") ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.extra-small { font-size: 0.7rem; }
|
|
.text-monospace { font-family: 'Courier New', Courier, monospace; }
|
|
.italic { font-style: italic; }
|
|
.table-hover tbody tr:hover { background-color: rgba(13, 110, 253, 0.05) !important; }
|
|
</style>
|