This commit is contained in:
KONE SOREL 2026-03-27 17:45:43 +00:00
parent 682bce2bf3
commit 4f5562f66d

View File

@ -1,59 +1,76 @@
<?php $nbligne = 0; ?>
<div id="div_detail_requete">
<div class="card-body p-0">
<div class="text-center py-5 text-muted">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:7pt;">
<thead>
<tr>
<td colspan="4" style='text-align:center'> <?= format_N($this->nettoyer($rpsinistres_total['nbLigne'])) ?> <?= _("Lignes au total") ?> </td>
<td align='center'><?= format_N($this->nettoyer($rpsinistres_total['sinistres_total'])) ?></td>
<td colspan="2"></td>
</tr>
<tr>
<th style='text-align:center'> <?= _("Numéro Adhérent") ?> </th>
<th style='text-align:center'> <?= _("Adhérent Principal") ?> </th>
<th style='text-align:center'> <?= _("Date Effet") ?> </th>
<th style='text-align:center'> <?= _("Durée Acquise") ?> </th>
<th style='text-align:center'> <?= _("Sinistres") ?> </th>
<th style='text-align:center'> <?= _("Ratio") ?> </th>
<th style='text-align:center'> <?= _("Catégorie") ?> </th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="4" style='text-align:center'> <?= format_N($this->nettoyer($rpsinistres_total['nbLigne'])) ?> <?= _("Lignes au total") ?> </td>
<td align='center'><?= format_N($this->nettoyer($rpsinistres_total['sinistres_total'])) ?></td>
<td colspan="2"></td>
</tr>
</tfoot>
<tbody>
<?php foreach ($rpsinistres as $rpsinistre):
$nbligne++;
?>
<tr valign="top">
<td align='center'><?= $this->nettoyer($rpsinistre['numeroAdherent']) ?></td>
<td ><?= $this->nettoyer($rpsinistre['Adherent']) ?></td>
<td align='center'><?= dateLang($this->nettoyer($rpsinistre['dateEffetAdherent'])) ?></td>
<td align='center'><?= $this->nettoyer($rpsinistre['duree_acquise']) ?></td>
<td align='center'><?= $this->nettoyer($rpsinistre['sinistres']) ?></td>
<td align='center'><?= $this->nettoyer($rpsinistre['ratio']) ?></td>
<td align='center'><?= $this->nettoyer($rpsinistre['codeProduit']) ?></td>
</tr>
<?php
if ($nbligne == 200) {
$nbligne = "> ".$nbligne." => " . _("Utilisez Excel");
break;
}
?>
<?php endforeach; ?>
</tbody>
</table>
<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">
<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">
<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">
<i class="fas fa-info-circle me-1 text-info"></i>
<small><?= _("Affichage limité aux 200 premières lignes") ?></small>
</div>
</div>
</div>
<input class="sr-only" type="text" id="nbligne_info" name="nbligne_info" value="<?= $nbligne ?>" >
<div class="table-responsive">
<table class="table table-hover align-middle mb-0" style="font-size:8.5pt;">
<thead class="table-light border-bottom text-uppercase small fw-bold">
<tr>
<th class="text-center"><?= _("N° Adhérent") ?></th>
<th><?= _("Adhérent Principal") ?></th>
<th class="text-center"><?= _("Date Effet") ?></th>
<th class="text-center"><?= _("Durée") ?></th>
<th class="text-center"><?= _("Sinistres") ?></th>
<th class="text-center"><?= _("Ratio (%)") ?></th>
<th class="text-center"><?= _("Catégorie") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($rpsinistres as $rpsinistre):
$nbligne++;
$ratio = (float)$rpsinistre['ratio'];
// Couleur dynamique pour le ratio
$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-center text-muted"><?= dateLang($this->nettoyer($rpsinistre['dateEffetAdherent'])) ?></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>
<td class="text-center <?= $ratioClass ?>">
<?= number_format($ratio, 2, ',', ' ') ?> %
</td>
<td class="text-center">
<span class="badge bg-secondary-subtle text-secondary border border-secondary-subtle">
<?= $this->nettoyer($rpsinistre['codeProduit']) ?>
</span>
</td>
</tr>
<?php
if ($nbligne == 200) {
$nbligne = "> " . $nbligne . " => " . _("Utilisez l'export Excel");
break;
}
?>
<?php endforeach; ?>
</tbody>
</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>
<input class="sr-only" type="text" id="nbligne_info" name="nbligne_info" value="<?= $nbligne ?>">
</div>