101 lines
5.4 KiB
PHP
101 lines
5.4 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-6 border-end border-secondary text-center py-2">
|
|
<div class="text-uppercase opacity-75 mb-2" style="font-size: 9pt; letter-spacing: 1px;">
|
|
<i class="fas fa-layer-group me-2 text-primary"></i> <?= _("Volume Total") ?>
|
|
</div>
|
|
<div class="display-6 fw-bold">
|
|
<?= format_N($rpsinistres_total['nbLigne']) ?>
|
|
<small class="h5 opacity-50 fw-normal"><?= _("Lignes") ?></small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6 text-center py-2">
|
|
<div class="text-uppercase opacity-75 mb-2" style="font-size: 9pt; letter-spacing: 1px;">
|
|
<i class="fas fa-money-bill-wave me-2 text-warning"></i> <?= _("Montant Total") ?>
|
|
</div>
|
|
<div class="display-6 fw-bold text-warning">
|
|
<?= format_N($rpsinistres_total['montant_total']) ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-bordered table-hover tabliste compact w-100" id="table_sinistres_detail" 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° Bénéficiaire") ?></th>
|
|
<th><?= _("Bénéficiaire") ?></th>
|
|
<th class="text-center"><?= _("Date") ?></th>
|
|
<th class="text-center"><?= _("Prestataire") ?></th>
|
|
<th class="text-center"><?= _("Catégorie") ?></th>
|
|
<th class="text-center"><?= _("N° Facture") ?></th>
|
|
<th class="text-center"><?= _("Garantie") ?></th>
|
|
<th class="text-end px-3"><?= _("Montant") ?></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($rpsinistres as $rpsinistre):
|
|
$nbligne++;
|
|
$CategoriePrestataire = est_anglophone()
|
|
? $this->nettoyer($rpsinistre['CategoriePrestataireEng'])
|
|
: $this->nettoyer($rpsinistre['CategoriePrestataire']);
|
|
?>
|
|
<tr>
|
|
<td class="text-center fw-bold text-primary"><?= $this->nettoyer($rpsinistre['numeroBeneficiaire']) ?></td>
|
|
<td class="text-uppercase"><?= $this->nettoyer($rpsinistre['Beneficiaire']) ?></td>
|
|
<td class="text-center text-muted"><?= dateLang($this->nettoyer($rpsinistre['Date']), $_SESSION['lang']) ?></td>
|
|
<td><?= $this->nettoyer($rpsinistre['Prestataire']) ?></td>
|
|
<td class="text-center small"><?= $CategoriePrestataire ?></td>
|
|
<td class="text-center">#<?= $this->nettoyer($rpsinistre['idFacture']) ?></td>
|
|
<td class="text-center"><span class="badge bg-light text-dark border"><?= $this->nettoyer($rpsinistre['codeGarantie']) ?></span></td>
|
|
<td class="text-end fw-bold px-3"><?= format_N($this->nettoyer($rpsinistre['fraisReel'])); ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
<tfoot class="table-dark">
|
|
<tr>
|
|
<td colspan="7" class="text-center fw-bold text-uppercase"><?= _("Total Général") ?></td>
|
|
<td class="text-end fw-bold px-3 fs-6 text-warning"><?= format_N($rpsinistres_total['montant_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(_('DÉTAIL DES SINISTRES'), 'UTF-8'); ?>";
|
|
|
|
const infosPolice =
|
|
"\n<?= _('Souscripteur') ?> : <?= $_SESSION['nomClient_C'] ?>\n" +
|
|
"<?= _('Numéro Police') ?> : <?= $_SESSION['numeroPolice_C'] ?>\n" +
|
|
"<?= _('Période du') ?> : <?= $_SESSION['dateDebutRequete'] ?> <?= _('au') ?> <?= $_SESSION['dateFinRequete'] ?>\n";
|
|
|
|
appliquerDataTable('#table_sinistres_detail', {
|
|
pageLength: 50,
|
|
order: [[2, "desc"]], // Tri par date décroissante
|
|
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>
|