drt
This commit is contained in:
parent
dc4456649f
commit
2f4186684e
|
|
@ -3,23 +3,29 @@
|
|||
<div id="div_detail_requete" class="card border-0 shadow-sm animate__animated animate__fadeIn">
|
||||
<div class="card-header bg-dark text-white p-3">
|
||||
<div class="row align-items-center text-center">
|
||||
<div class="col-md-4 border-end border-secondary">
|
||||
<div class="col-md-3 border-end border-secondary">
|
||||
<small class="text-uppercase opacity-75 d-block"><?= _("Volume Total") ?></small>
|
||||
<span class="h5 fw-bold"><?= format_N($rpsinistres_total['nbLigne']) ?> <?= _("Lignes") ?></span>
|
||||
</div>
|
||||
<div class="col-md-4 border-end border-secondary">
|
||||
<div class="col-md-3 border-end border-secondary">
|
||||
<small class="text-uppercase opacity-75 d-block"><?= _("Cumul Sinistres") ?></small>
|
||||
<span class="h5 fw-bold text-warning"><?= format_N($rpsinistres_total['sinistres_total']) ?></span>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3 border-end border-secondary">
|
||||
<small class="text-uppercase opacity-75 d-block"><?= _("Ratio Moyen") ?></small>
|
||||
<span class="h5 fw-bold text-info"><?= number_format((float)$rpsinistres_total['ratio_moyen'], 2, ',', ' ') ?> %</span>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<i class="fas fa-info-circle me-1 text-info"></i>
|
||||
<small><?= _("Affichage limité aux 200 premières lignes") ?></small>
|
||||
<small class="small d-block text-start" style="font-size: 7.5pt;">
|
||||
<?= _("Affichage limité aux 200 premières lignes. Utilisez l'export Excel pour le rapport complet.") ?>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover table-condensed tabliste compact w-100" style="font-size:0.85rem; white-space:nowrap;">
|
||||
<table id="table_resume_sinistres" class="table table-striped table-bordered table-hover tabliste compact w-100" style="font-size:0.85rem; white-space:nowrap;">
|
||||
<thead class="table-light border-bottom text-uppercase small fw-bold">
|
||||
<tr>
|
||||
<th class="text-center"><?= _("N° Adhérent") ?></th>
|
||||
|
|
@ -36,12 +42,12 @@
|
|||
<?php foreach ($rpsinistres as $rpsinistre):
|
||||
$nbligne++;
|
||||
$ratio = (float)$rpsinistre['ratio'];
|
||||
// Couleur dynamique pour le ratio
|
||||
// Couleur dynamique pour le ratio selon la gravité
|
||||
$ratioClass = ($ratio > 100) ? 'text-danger fw-bold' : (($ratio > 70) ? 'text-warning' : 'text-success');
|
||||
?>
|
||||
<tr>
|
||||
<td class="text-center fw-bold text-primary"><?= $this->nettoyer($rpsinistre['numeroAdherent']) ?></td>
|
||||
<td><?= $this->nettoyer($rpsinistre['Adherent']) ?></td>
|
||||
<td class="text-uppercase"><?= $this->nettoyer($rpsinistre['Adherent']) ?></td>
|
||||
<td class="text-center text-muted"><?= dateLang($this->nettoyer($rpsinistre['dateEffetAdherent']), $_SESSION['lang']) ?></td>
|
||||
<td class="text-center"><?= $this->nettoyer($rpsinistre['duree_acquise']) ?> <small><?= _("j") ?></small></td>
|
||||
<td class="text-center fw-bold"><?= format_N($rpsinistre['sinistres']) ?></td>
|
||||
|
|
@ -59,7 +65,7 @@
|
|||
|
||||
<?php
|
||||
if ($nbligne == 200) {
|
||||
$nbligne = "> " . $nbligne . " => " . _("Utilisez l'export Excel");
|
||||
$nbligne = "> " . $nbligne . " => " . _("Excel");
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
|
@ -68,9 +74,38 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card-footer bg-white text-end py-2">
|
||||
<small class="text-muted italic"><?= _("Généré le") ?> <?= date('d/m/Y H:i') ?></small>
|
||||
<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-clock me-1"></i><?= _("Généré le") ?> <?= date('d/m/Y H:i') ?>
|
||||
</span>
|
||||
<span class="badge bg-dark px-3"><?= $_SESSION['numeroPolice_C'] ?></span>
|
||||
</div>
|
||||
|
||||
<input class="sr-only" type="text" id="nbligne_info" name="nbligne_info" value="<?= $nbligne ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
const titreRapport = "<?= mb_strtoupper(_('RAPPORT RÉSUMÉ DES SINISTRES'), 'UTF-8'); ?>";
|
||||
|
||||
// Construction des informations de police pour l'export
|
||||
const infosPolice =
|
||||
"<?= _('Souscripteur') ?> : <?= $_SESSION['nomClient_C'] ?>\n" +
|
||||
"<?= _('Numéro Police') ?> : <?= $_SESSION['numeroPolice_C'] ?>\n" +
|
||||
"<?= _('Période du') ?> : <?= $_SESSION['dateDebutRequete'] ?> <?= _('au') ?> <?= $_SESSION['dateFinRequete'] ?>";
|
||||
|
||||
// Initialisation DataTable
|
||||
appliquerDataTable('#table_resume_sinistres', {
|
||||
pageLength: 50,
|
||||
order: [[5, "desc"]], // Tri par ratio décroissant pour voir les dossiers critiques
|
||||
buttons: [
|
||||
{ extend: 'excel', title: titreRapport, messageTop: infosPolice },
|
||||
{ extend: 'pdf', title: titreRapport, messageTop: infosPolice, orientation: 'landscape' },
|
||||
{ extend: 'print', title: titreRapport, messageTop: infosPolice }
|
||||
]
|
||||
}, titreRapport, infosPolice);
|
||||
|
||||
// Mise à jour automatique du champ "Lignes" dans l'entête de recherche
|
||||
$('#nbligne').val($('#nbligne_info').val());
|
||||
});
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user