radiantrh/Vue/Remboursement/index.php
2026-01-22 17:09:55 +00:00

168 lines
7.5 KiB
PHP
Executable File

<?php
$this->titre = "Intersanté - Remboursement Direct";
$idDemandeRemboursement = $_SESSION['idDemandeRemboursement'] ?? "0";
$numeroDemandeRemboursement = $this->nettoyer($demande['numeroDemandeRemboursement']);
$codeEtatDemandeRemboursement = $this->nettoyer($demande['codeEtatDemandeRemboursement']);
$lien = $this->nettoyer($demande['lien']);
$numeroBeneficiaire = $this->nettoyer($demande['numeroBeneficiaire']);
$observation = $this->nettoyer($demande['observation']);
$codeStatutPaiement = $this->nettoyer($demande['codeStatutPaiement']);
$beneficiaire = $this->nettoyer($demande['beneficiaire']);
$adherent = $this->nettoyer($demande['adherent']);
$numeroAdherent = $this->nettoyer($demande['numeroAdherent']);
$idPolice = $this->nettoyer($demande['idPolice']);
$numeroPolice = $this->nettoyer($demande['numeroPolice']);
if (est_anglophone()){
$lien = $this->nettoyer($demande['lienEng']);
}
?>
<div id="div_liste" class="card shadow-lg border-0 mb-4" style="border-radius: 15px;">
<h1 class="text-primary"><i class="fas fa-file-invoice-dollar me-2"></i></i> <?= _('Détails du remboursement') ?></h1>
<div class="card-header d-flex justify-content-between align-items-center py-1">
<h5 class="mb-0 fw-bold">
<?= _("POLICE") ?> : <span class="text-secondary"><?= $numeroPolice; ?></span>
<span class="ms-3 badge bg-warning text-light small fw-normal"><?= _("Demande N°") ?>: <?= $numeroDemandeRemboursement; ?></span>
</h5>
</div>
<div class="card-body p-2">
<div class="row g-4 mb-4">
<div class="col-md-7">
<div class="p-3 border rounded bg-light shadow-sm">
<h6 class="text-muted text-uppercase small fw-bold mb-3 border-bottom pb-2">
<i class="fas fa-id-card me-2 text-primary"></i><?= _("Identification du dossier") ?>
</h6>
<div class="row g-3">
<div class="col-12">
<label class="form-label small text-muted mb-0"><?= _("Adhérent Principal (Titulaire)") ?></label>
<div class="d-flex align-items-center bg-white border rounded p-2">
<div class="flex-shrink-0">
<div class="bg-primary-subtle text-primary rounded-circle d-flex align-items-center justify-content-center" style="width: 35px; height: 35px;">
<i class="fas fa-user-shield"></i>
</div>
</div>
<div class="flex-grow-1 ms-3">
<div class="fw-bold text-dark fs-6">
<?= $adherent ?>
<span class="badge bg-secondary ms-2 small fw-normal"><?= $numeroAdherent ?></span>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<label class="form-label small text-muted mb-0"><?= _("Bénéficiaire des soins (Patient)") ?></label>
<div class="d-flex align-items-center bg-white border rounded p-2" style="min-height: 45px;">
<div class="fw-bold text-dark fs-6">
<i class="fas fa-user text-muted me-2 small"></i>
<?= $beneficiaire ?>
<span class="badge bg-info-subtle text-info border border-info-subtle ms-2 small fw-normal"><?= $numeroBeneficiaire ?></span>
</div>
</div>
</div>
<div class="col-md-4">
<label class="form-label small text-muted mb-0"><?= _("Lien Parenté") ?></label>
<div class="fw-bold py-2 px-2 bg-white border rounded text-center text-primary shadow-sm" style="min-height: 45px;">
<i class="fas fa-users me-1 small"></i> <?= $lien ?: '--' ?>
</div>
</div>
<div class="col-12">
<label class="form-label small text-muted mb-0"><?= _("Commentaire du demandeur") ?></label>
<div class="p-2 bg-white border rounded-1 small text-dark" style="min-height: 80px;">
<?= $observation ?: '<span class="text-muted italic">' . _("Aucun commentaire fourni.") . '</span>' ?>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-5">
<div class="card h-100 border-0 shadow-sm overflow-hidden">
<div class="card-body p-0">
<?php
switch ($codeStatutPaiement) {
case "1":
$bgStatus = "bg-success";
$iconStatus = "fa-check-double";
$status = _("Validée");
$colorText = "text-white";
break;
case "2":
$bgStatus = "bg-warning";
$iconStatus = "fa-hourglass-half";
$status = _("En attente");
$colorText = "text-dark";
break;
default:
$bgStatus = "bg-danger";
$iconStatus = "fa-ban";
$status = _("Refusée");
$colorText = "text-white";
break;
}
?>
<div class="<?= $bgStatus ?> text-white p-3 text-center">
<i class="fas <?= $iconStatus ?> fa-2x mb-2"></i>
<h5 class="mb-0 text-uppercase fw-bold"><?= $status ?></h5>
<small class="opacity-75 <?= $colorText ?>"><?= _("Validé le") ?> <?= dateLang($demande['dateValidationRh'], $_SESSION['lang']) ?></small>
</div>
<div class="p-3 bg-light">
<label class="small text-muted d-block mb-1"><?= _("Justification de rejet") ?> :</label>
<div class="p-2 text-danger rounded small" style="min-height: 60px; border: 1px solid gray;">
<?= $this->nettoyer($demande['motifRejetRh']) ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php if($idDemandeRemboursement > 0): ?>
<div class="card border-0 shadow-sm mt-4">
<div class="card-header bg-dark text-white py-2 d-flex justify-content-between align-items-center">
<span class="small fw-bold"><i class="fas fa-file-pdf me-2"></i><?= _("PIÈCES JOINTES (Factures)") ?></span>
<span class="badge bg-secondary"><?= count($geds) ?></span>
</div>
<div class="card-body p-0">
<table class="table table-hover table-sm mb-0">
<tbody class="small">
<?php foreach ($geds as $ged): ?>
<tr>
<td class="ps-3 py-2 text-muted" width="150"><?= dateheureLang($ged['dateSysteme']) ?></td>
<td class="py-2"><i class="far fa-file-image me-2 text-primary"></i><?= $this->nettoyer($ged['nomOrigine']) ?></td>
<td class="text-end pe-3 py-2">
<a href="<?= $ged['cheminFichier'] ?>" target="_blank" class="btn btn-xs btn-outline-danger">
<i class="fas fa-download"></i>
</a>
</td>
</tr>
<?php endforeach; ?>
<?php if(empty($geds)): ?>
<tr><td colspan="3" class="text-center py-4 text-muted italic"><?= _("Aucune facture scannée pour cette demande.") ?></td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<?php endif; ?>
</div>
</div>