radiantrh/Vue/Ajaxdossierscontestes/index.php

182 lines
7.7 KiB
PHP
Executable File

<div class="card shadow-sm">
<?php if (empty($feuillemaladies)): ?>
<div class="alert alert-info text-center">
<small>
<i class="bi bi-info-circle me-2"></i>
<?= _("Aucun dossier contesté trouvé pour ce filtre") ?>
</small>
</div>
<?php else: ?>
<div class="card-header bg-light py-2 d-flex justify-content-between align-items-center">
<h5 class="mb-0 text-dark">
<i class="fas fa-list me-2"></i>
<span class="hide-on-mobile"><?= _("Liste des dossiers contestés")?></span>
<span class="badge bg-primary view-end"><?= format_N(count($feuillemaladies)).' '._("dossier(s)") ?> </span>
</h5>
</div>
<div class="d-none d-md-block">
<div class="card-body p-0">
<table class="table table-striped table-hover mb-0" style="font-size:9pt; white-space: nowrap">
<thead class="table-dark">
<tr>
<th class="text-center"><?= _("No Bon") ?></th>
<th class="text-center">Date</th>
<th><?= _("Prestataire") ?></th>
<th class="d-none d-lg-table-cell"><?= _("Médecin") ?></th>
<th class="text-center"><?= _("Frais") ?></th>
<th class="text-center d-none d-md-table-cell"><?= _("T M") ?></th>
<th class="text-center d-none d-md-table-cell"><?= _("A Rembourser") ?></th>
<th class="text-center"><?= _("Facturé") ?></th>
<th class="text-center"><?= _("Réactiver") ?></th>
</tr>
</thead>
<tbody>
<?php if (count($feuillemaladies) > 0): ?>
<?php foreach ($feuillemaladies as $feuillemaladie):
$numeroFeuilleMaladie = $this->nettoyer($feuillemaladie['numeroFeuilleMaladie']);
$numeroBonConsultation = $this->nettoyer($feuillemaladie['numeroBonConsultation']);
$facture = $this->nettoyer($feuillemaladie['facture']);
$dossierEnCours = $this->nettoyer($feuillemaladie['dossierEnCours']);
?>
<tr>
<td class="text-center fw-bold"><?= $numeroBonConsultation ?></td>
<td class="text-center"><?= dateheureLang($this->nettoyer($feuillemaladie['dateSysteme']), $_SESSION["lang"]) ?></td>
<td><?= $this->nettoyer($feuillemaladie['prestataire']) ?></td>
<td class="d-none d-lg-table-cell"><?= $this->nettoyer($feuillemaladie['medecinConsultation']) ?></td>
<td class="text-center"><?= format_N($this->nettoyer($feuillemaladie['fraisReel'])) ?></td>
<td class="text-center d-none d-md-table-cell"><?= format_N($this->nettoyer($feuillemaladie['montantTm'])) ?></td>
<td class="text-center d-none d-md-table-cell"><?= format_N($this->nettoyer($feuillemaladie['montantArembourser'])) ?></td>
<td class="text-center">
<?php if ($facture == "1"): ?>
<i class="fas fa-check-circle text-success" title="<?= _('Facturé') ?>"></i>
<?php else: ?>
<i class="fas fa-times-circle text-secondary" title="<?= _('Non facturé') ?>"></i>
<?php endif; ?>
</td>
<td class="text-center">
<?php if ($dossierEnCours > "0"): ?>
<button class="btn btn-sm btn-outline-danger"
onClick="javascript:reactiver_contestation('<?= $numeroFeuilleMaladie ?>');"
title="<?= _('Réactiver ce dossier') ?>">
<i class="fas fa-redo-alt me-1 d-none d-sm-inline"></i>
<span class="d-none d-md-inline"><?= _("Réactiver") ?></span>
<span class="d-inline d-md-none"><?= _("Act.") ?></span>
</button>
<?php else: ?>
<span class="text-muted">-</span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td colspan="9" class="text-center p-4 text-muted">
<div class="alert alert-info mt-3" style="margin-bottom:15px;">
<small>
<i class="fas fa-info-circle me-2"></i>
<?= _("Aucun dossier contesté trouvé pour la période sélectionnée") ?>
</small>
</div>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<!-- Affichage mobile (cartes) -->
<div class="d-md-none">
<?php foreach ($feuillemaladies as $feuillemaladie):
$numeroFeuilleMaladie = $this->nettoyer($feuillemaladie['numeroFeuilleMaladie']);
$numeroBonConsultation = $this->nettoyer($feuillemaladie['numeroBonConsultation']);
$facture = $this->nettoyer($feuillemaladie['facture']);
$dossierEnCours = $this->nettoyer($feuillemaladie['dossierEnCours']);
?>
<div class="card-body py-2">
<div class="row mb-2">
<div class="col-6">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small"><?= _("N° Bon") ?></span>
<span class="fw-bold text-primary"><?= $numeroBonConsultation ?></span>
</div>
</div>
<div class="col-6">
<div class="d-flex justify-content-between align-items-center" style="text-align:center !important;">
<span class="fw-bold w-100">
<?= dateheureLang($this->nettoyer($feuillemaladie['dateSysteme']), $_SESSION["lang"]) ?>
</span>
</div>
</div>
<div class="col-12">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small"><?= _("Prestataire") ?></span>
<span class="fw-bold"><?= substr($this->nettoyer($feuillemaladie['prestataire']),0,25) ?></span>
</div>
</div>
<div class="col-12">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small"><?= _("Medécin") ?></span>
<span class="fw-bold"><?= substr($this->nettoyer($feuillemaladie['medecinConsultation']),0,25) ?></span>
</div>
</div>
<div class="col-6">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small"><?= _("Frais") ?></span>
<span class="fw-bold"><?= format_N($this->nettoyer($feuillemaladie['fraisReel'])) ?></span>
</div>
</div>
<div class="col-6">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small text-danger"><?= _("Assuré") ?></span>
<span class="fw-bold text-danger"><?= format_N($this->nettoyer($feuillemaladie['montantTm'])) ?></span>
</div>
</div>
<div class="col-6">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small text-success"><?= _("Assurance") ?></span>
<span class="fw-bold text-success"><?= format_N($this->nettoyer($feuillemaladie['montantArembourser'])) ?></span>
</div>
</div>
<div class="col-6">
<div class="d-flex justify-content-between align-items-center">
<span class="text-muted small"><?= _("Facturé") ?></span>
<span class="fw-bold">
<?php if ($facture == "1"): ?>
<i class="fas fa-check-circle text-success" title="<?= _('Facturé') ?>"></i>
<?php else: ?>
<i class="fas fa-times-circle text-secondary" title="<?= _('Non facturé') ?>"></i>
<?php endif; ?>
</span>
</div>
</div>
<div class="col-12">
<div class="d-flex justify-content-between align-items-center">
<?php if ($dossierEnCours > "0"): ?>
<button class="btn btn-sm btn-danger w-100"
onClick="javascript:reactiver_contestation('<?= $numeroFeuilleMaladie ?>');"
title="<?= _('Réactiver ce dossier') ?>">
<i class="fas fa-redo-alt me-1"></i>
<span ><?= _("Réactiver le dossier") ?></span>
</button>
<?php else: ?>
<span class="text-muted">-</span>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>