121 lines
6.7 KiB
PHP
121 lines
6.7 KiB
PHP
<?php $nbligne = 0; ?>
|
|
|
|
<div id="div_detail_requete" class="card border-0 shadow-sm animate__animated animate__fadeIn">
|
|
<div class="card-header bg-dark text-white p-4 border-0" style="border-radius: 12px 12px 0 0;">
|
|
<div class="row w-100 m-0 align-items-center">
|
|
<div class="col-md-3 border-end border-secondary text-center py-2">
|
|
<div class="text-uppercase opacity-75 mb-2" style="font-size: 8pt; letter-spacing: 1px;">
|
|
<i class="fas fa-layer-group me-2 text-primary"></i> <?= _("Volume Total") ?>
|
|
</div>
|
|
<div class="display-6 fw-bold" style="font-size: 1.8rem;">
|
|
<?= format_N($rpsinistres_total['nbLigne']) ?>
|
|
<small class="h6 opacity-50 fw-normal"><?= _("Lignes") ?></small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-3 border-end border-secondary text-center py-2">
|
|
<div class="text-uppercase opacity-75 mb-2" style="font-size: 8pt; letter-spacing: 1px;">
|
|
<i class="fas fa- hospital-user me-2 text-warning"></i> <?= _("Cumul Cas") ?>
|
|
</div>
|
|
<div class="display-6 fw-bold text-warning" style="font-size: 1.8rem;">
|
|
<?= format_N($rpsinistres_total['nbrCas_total']) ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-3 border-end border-secondary text-center py-2">
|
|
<div class="text-uppercase opacity-75 mb-2" style="font-size: 8pt; letter-spacing: 1px;">
|
|
<i class="fas fa-file-invoice-dollar me-2 text-info"></i> <?= _("Montant Total") ?>
|
|
</div>
|
|
<div class="display-6 fw-bold text-info" style="font-size: 1.8rem;">
|
|
<?= format_N($rpsinistres_total['montant_total']) ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-3 text-center py-2">
|
|
<div class="text-uppercase opacity-75 mb-2" style="font-size: 8pt; letter-spacing: 1px;">
|
|
<i class="fas fa-divide me-2 text-success"></i> <?= _("Montant / Cas") ?>
|
|
</div>
|
|
<div class="display-6 fw-bold text-success" style="font-size: 1.8rem;">
|
|
<?= format_N($rpsinistres_total['montantSurCas_total']) ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-bordered table-hover tabliste compact w-100" id="table_frequence_sinistres" style="font-size:0.85rem; white-space:nowrap;">
|
|
<thead class="table-light border-bottom text-uppercase small fw-bold">
|
|
<tr>
|
|
<th><?= _("Catégories") ?></th>
|
|
<th class="text-center"><?= _("Nombre Cas") ?></th>
|
|
<th class="text-center"><?= est_anglophone() ? "% Case" : "% Cas" ?></th>
|
|
<th class="text-center"><?= _("Montant") ?></th>
|
|
<th class="text-center"><?= _("% Montant") ?></th>
|
|
<th class="text-center"><?= _("Montant / Cas") ?></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($rpsinistres as $rpsinistre):
|
|
$nbligne++;
|
|
$categorie = est_anglophone()
|
|
? $this->nettoyer($rpsinistre['categorieEng'])
|
|
: $this->nettoyer($rpsinistre['categorie']);
|
|
?>
|
|
<tr>
|
|
<td class="fw-bold text-uppercase text-primary"><?= $categorie ?></td>
|
|
<td class="text-center"><?= format_N($this->nettoyer($rpsinistre['nbrCas'])); ?></td>
|
|
<td class="text-center text-muted"><?= number_format($this->nettoyer($rpsinistre['tauxCas']), 2, ',', ' ') ?> %</td>
|
|
<td class="text-end fw-bold px-3"><?= format_N($this->nettoyer($rpsinistre['montant'])); ?></td>
|
|
<td class="text-center text-muted"><?= number_format($this->nettoyer($rpsinistre['tauxMontant']), 2, ',', ' ') ?> %</td>
|
|
<td class="text-end fw-bold px-3 text-info"><?= format_N($this->nettoyer($rpsinistre['montantSurCas'])); ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
<tfoot class="table-dark">
|
|
<tr class="fw-bold">
|
|
<td class="text-center text-uppercase text-dark"><?= _("Total Général") ?></td>
|
|
<td class="text-center text-dark"><?= format_N($rpsinistres_total['nbrCas_total']); ?></td>
|
|
<td class="text-center text-dark">100 %</td>
|
|
<td class="text-end px-3 text-dark"><?= format_N($rpsinistres_total['montant_total']); ?></td>
|
|
<td class="text-center text-dark">100 %</td>
|
|
<td class="text-end px-3 text-dark"><?= format_N($rpsinistres_total['montantSurCas_total']); ?></td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="card-footer bg-white d-flex justify-content-between align-items-center py-2">
|
|
<span class="text-muted small italic">
|
|
<i class="fas fa-history me-1"></i><?= _("Généré le") ?> <?= dateheureLang(date('Y-m-d H:i:s'), $_SESSION['lang']) ?>
|
|
</span>
|
|
<span class="badge bg-secondary opacity-75"><?= $_SESSION['numeroPolice_C'] ?></span>
|
|
</div>
|
|
|
|
<input class="sr-only" type="text" id="nbligne_info" name="nbligne_info" value="<?= $nbligne ?>">
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
const titreRapport = "<?= mb_strtoupper(_('RAPPORT DES FRÉQUENCES DE SINISTRES'), 'UTF-8'); ?>";
|
|
|
|
const infosPolice =
|
|
"\n<?= _('Souscripteur') ?> : <?= $_SESSION['nomClient_C'] ?>\n" +
|
|
"<?= _('Numéro Police') ?> : <?= $_SESSION['numeroPolice_C'] ?>\n" +
|
|
"<?= _('Période Couverte') ?> : <?= dateLang($_SESSION['dateEffet_C'], $_SESSION['lang']) ?> <?= _('au') ?> <?= dateLang($_SESSION['dateEcheance_C'], $_SESSION['lang']) ?>\n" +
|
|
"<?= _('Période Analyse') ?> : <?= $_SESSION['dateDebutRequete'] ?> <?= _('au') ?> <?= $_SESSION['dateFinRequete'] ?>\n";
|
|
|
|
// Utilisation de l'ID spécifique pour éviter les conflits
|
|
appliquerDataTable('#table_frequence_sinistres', {
|
|
pageLength: 50,
|
|
order: [[1, "desc"]], // Tri par nombre de cas décroissant
|
|
buttons: [
|
|
{ extend: 'excel', title: titreRapport, messageTop: infosPolice, footer: true },
|
|
{ extend: 'pdf', title: titreRapport, messageTop: infosPolice, orientation: 'landscape', footer: true },
|
|
{ extend: 'print', title: titreRapport, messageTop: infosPolice, footer: true }
|
|
]
|
|
}, titreRapport, infosPolice);
|
|
|
|
$('#nbligne').val($('#nbligne_info').val());
|
|
});
|
|
</script>
|