71 lines
3.3 KiB
PHP
71 lines
3.3 KiB
PHP
<div id="div_dossiers" class="card shadow-sm border-0">
|
|
<div class="table-responsive">
|
|
<table class="table table-hover align-middle mb-0" style="font-size: 0.85rem;">
|
|
<thead class="table-dark">
|
|
<tr>
|
|
<th class="ps-3"><?= _("Type") ?></th>
|
|
<th><?= _("Référence / Bon") ?></th>
|
|
<th class="text-center"><?= _("ID Fact") ?></th>
|
|
<th><?= _("Date") ?></th>
|
|
<th><?= _("Prestataire / Bénéficiaire") ?></th>
|
|
<th class="text-end"><?= _("Frais Réel") ?></th>
|
|
<th class="text-end"><?= _("Part Patient (TM)") ?></th>
|
|
<th class="text-end text-warning"><?= _("A Rembourser") ?></th>
|
|
<th class="text-end pe-3 small text-uppercase opacity-75"><?= _("Exclu/Ret") ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($factures as $facture):
|
|
$idFacture = $this->nettoyer($facture['idFacture']);
|
|
$codeType = $this->nettoyer($facture['codeTypeFacture']);
|
|
|
|
// Définition des couleurs par type
|
|
$badgeClass = "bg-secondary";
|
|
switch($codeType) {
|
|
case 'PHAR': $badgeClass = "bg-success"; break;
|
|
case 'OPT' : $badgeClass = "bg-info text-dark"; break;
|
|
case 'LAB' : $badgeClass = "bg-warning text-dark"; break;
|
|
case 'SEA' : $badgeClass = "bg-primary"; break;
|
|
}
|
|
|
|
// Logique du numéro de bon
|
|
$numeroBon = $this->nettoyer($facture['numeroBonConsultation']);
|
|
if($codeType=="PHAR") $numeroBon = $this->nettoyer($facture['numeroBonOrdonnance']);
|
|
elseif($codeType=="OPT") $numeroBon = $this->nettoyer($facture['numeroBonOptique']);
|
|
elseif($codeType=="LAB") $numeroBon = $this->nettoyer($facture['numeroBonExamen']);
|
|
elseif($codeType=="SEA") $numeroBon = $this->nettoyer($facture['numeroBonKine']);
|
|
?>
|
|
<tr>
|
|
<td class="ps-3">
|
|
<span class="badge <?= $badgeClass ?> w-100"><?= $codeType ?></span>
|
|
</td>
|
|
<td>
|
|
<small class="fw-bold text-muted"><?= $numeroBon ?></small>
|
|
</td>
|
|
<td class="text-center">
|
|
<button class="btn btn-sm btn-outline-primary py-0" style="font-size: 0.75rem;"
|
|
onClick="consulter_facture_pop('<?= $idFacture ?>');">
|
|
<i class="fa-solid fa-magnifying-glass me-1"></i><?= $idFacture ?>
|
|
</button>
|
|
</td>
|
|
<td>
|
|
<div class="small lh-1"><?= dateheureLang($this->nettoyer($facture['dateSysteme'])) ?></div>
|
|
</td>
|
|
<td>
|
|
<div class="fw-bold text-truncate" style="max-width: 200px;"><?= $this->nettoyer($facture['prestataire']) ?></div>
|
|
<div class="small text-muted italic">👤 <?= $this->nettoyer($facture['beneficiaire']) ?></div>
|
|
</td>
|
|
<td class="text-end text-monospace fw-bold"><?= format_N($this->nettoyer($facture['fraisReel'])) ?></td>
|
|
<td class="text-end text-monospace text-danger small"><?= format_N($this->nettoyer($facture['montantTm'])) ?></td>
|
|
<td class="text-end text-monospace fw-bold text-primary"><?= format_N($this->nettoyer($facture['montantArembourser'])) ?></td>
|
|
<td class="text-end pe-3">
|
|
<div class="small text-muted text-monospace"><?= format_N($this->nettoyer($facture['fraisExclu'])) ?></div>
|
|
<div class="small text-muted text-monospace border-top pt-1"><?= format_N($this->nettoyer($facture['fraisRetenu'])) ?></div>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|