This commit is contained in:
KONE SOREL 2026-03-29 11:34:26 +00:00
parent e83086f7bb
commit 063e3b072d

View File

@ -90,29 +90,26 @@
<script>
$(document).ready(function() {
// 1. Préparation des textes
const titreRapport = <?= json_encode(mb_strtoupper(_('RAPPORT RÉSUMÉ DES SINISTRES'), 'UTF-8')) ?>;
// 2. Préparation du bloc d'infos Subscriber/Policy/Period
const infosEntete =
"\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\n" +
"<?= _('Date analyse') ?> : <?= $_SESSION['dateFinRequete'] ?>\n";
// 3. Appel de la fonction COMMUNE appliquerDataTable()
// On passe 'footer: true' dans les boutons pour que le <tfoot> soit exporté
// INITIALISATION
appliquerDataTable('#table_resume_sinistres', {
pageLength: 50,
order: [[5, "desc"]], // Tri par Ratio décroissant
order: [[5, "desc"]],
// On définit la liste précise des boutons ici pour éviter les doublons
buttons: [
{ extend: 'excel', title: titreRapport, messageTop: infosEntete, footer: true },
{ extend: 'pdf', title: titreRapport, messageTop: infosEntete, orientation: 'landscape', footer: true },
{ extend: 'print', title: titreRapport, messageTop: infosEntete, footer: true }
{ extend: 'excel', title: titreRapport, messageTop: infosEntete, footer: true, className: 'btn btn-sm btn-success' },
{ extend: 'pdf', title: titreRapport, messageTop: infosEntete, orientation: 'landscape', footer: true, className: 'btn btn-sm btn-danger' },
{ extend: 'print', title: titreRapport, messageTop: infosEntete, footer: true, className: 'btn btn-sm btn-dark' }
]
}, titreRapport, infosEntete);
// 4. Mise à jour du compteur global (l'input dans ton formulaire de recherche)
$('#nbligne').val($('#nbligne_info').val());
});
</script>
</script>