This commit is contained in:
KONE SOREL 2026-01-12 18:57:57 +00:00
parent 347a73f567
commit 5699daf3e9

View File

@ -1,62 +1,70 @@
<div id="div_dossiers">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:8pt;">
<thead>
<tr>
<th style='text-align:center'> Type </th>
<th style='text-align:center'> <?= _("No Bon") ?> </th>
<th style='text-align:center'> <?= _("Id Fact") ?> </th>
<th style='text-align:center'> Date </th>
<th> <?= _("Prestataire") ?> </th>
<th> <?= _("Bénéficiaire") ?> </th>
<th style='text-align:center'> <?= _("Frais") ?> </th>
<th style='text-align:center'> <?= _("T M") ?> </th>
<th style='text-align:center'> <?= _("A Remb") ?> </th>
<th style='text-align:center'> <?= _("Dépas") ?> </th>
<th style='text-align:center'> <?= _("Ret") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($factures as $facture):
$idFacture=$this->nettoyer($facture['idFacture']);
$numeroFeuilleMaladie=$this->nettoyer($facture['numeroFeuilleMaladie']);
$tiersPayant = $facture['tiersPayant'];
$codeTypeFacture = $this->nettoyer($facture['codeTypeFacture']);
<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;
}
$numeroBon = $this->nettoyer($facture['numeroBonConsultation']);
if($codeTypeFacture=="PHAR")
{
$numeroBon = $this->nettoyer($facture['numeroBonOrdonnance']);
}
elseif($codeTypeFacture=="OPT")
{
$numeroBon = $this->nettoyer($facture['numeroBonOptique']);
}
elseif($codeTypeFacture=="LAB")
{
$numeroBon = $this->nettoyer($facture['numeroBonExamen']);
}
elseif($codeTypeFacture=="SEA")
{
$numeroBon = $this->nettoyer($facture['numeroBonKine']);
}
?>
<tr valign="top">
<td align='center'> <?= $codeTypeFacture ?> </td>
<td align='center'> <?= $numeroBon ?> </td>
<td align='center'> <?= $idFacture ?> </td>
<td align='center'><?= dateheureLang($this->nettoyer($facture['dateSysteme'])) ?></td>
<td><?= $this->nettoyer($facture['prestataire']) ?></td>
<td><?= $this->nettoyer($facture['beneficiaire']) ?></td>
<td align='center'><?= format_N($this->nettoyer($facture['fraisReel'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($facture['montantTm'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($facture['montantArembourser'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($facture['fraisExclu'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($facture['fraisRetenu'])) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
// 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>