dffg
This commit is contained in:
parent
f7aa1bf5b8
commit
b02cd207dc
|
|
@ -12,16 +12,16 @@ class ControleurAjaxrequetedetailsinistres extends Controleur
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$dateFacture1 = $this->requete->getParametreDate("dateFacture1");
|
$dateDebut = $this->requete->getParametreDate("dateFacture1");
|
||||||
$dateFacture2 = $this->requete->getParametreDate("dateFacture2");
|
$dateFin = $this->requete->getParametreDate("dateFacture2");
|
||||||
|
|
||||||
|
|
||||||
$_SESSION['dateDebutRequete'] = $this->requete->getParametreFormulaire("dateFacture1");
|
$_SESSION['dateDebutRequete'] = $this->requete->getParametreFormulaire("dateFacture1");
|
||||||
$_SESSION['dateFinRequete'] = $this->requete->getParametreFormulaire("dateFacture2");
|
$_SESSION['dateFinRequete'] = $this->requete->getParametreFormulaire("dateFacture2");
|
||||||
|
|
||||||
$rpsinistres = $this->sppolice->requeteresumesinistres($dateFacture2);
|
$rpsinistres = $this->sppolice->requetedetailsinistres($dateDebut, $dateFin);
|
||||||
|
|
||||||
$rpsinistres_total = $this->sppolice->requeteresumesinistres_total($dateFacture2);
|
$rpsinistres_total = $this->sppolice->requetedetailsinistres_total($dateDebut, $dateFacture2);
|
||||||
|
|
||||||
$this->genererVueAjax(array(
|
$this->genererVueAjax(array(
|
||||||
'rpsinistres' => $rpsinistres,
|
'rpsinistres' => $rpsinistres,
|
||||||
|
|
|
||||||
|
|
@ -937,4 +937,26 @@ class Police extends Modele {
|
||||||
|
|
||||||
return $liste->fetchAll(PDO::FETCH_ASSOC);
|
return $liste->fetchAll(PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function requetedetailsinistres($dateDebut, $dateFin) {
|
||||||
|
|
||||||
|
$idPolice = $_SESSION['idPolice_C'];
|
||||||
|
|
||||||
|
$sql = 'CALL sp_requetedetailsinistres_rh(?, ?, ?);';
|
||||||
|
|
||||||
|
$liste = $this->executerRequete($sql,array($idPolice, $dateDebut, $dateFin));
|
||||||
|
|
||||||
|
return $liste->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function requetedetailsinistres_total($dateDebut, $dateFacture2) {
|
||||||
|
|
||||||
|
$idPolice = $_SESSION['idPolice_C'];
|
||||||
|
|
||||||
|
$sql = 'CALL sp_requetedetailsinistres_total_rh(?, ?);';
|
||||||
|
|
||||||
|
$liste = $this->executerRequete($sql,array($idPolice, $dateDebut, $dateFacture2));
|
||||||
|
|
||||||
|
return $liste->fetch(PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
<span class="h5 fw-bold"><?= format_N($rpsinistres_total['nbLigne']) ?> <?= _("Lignes") ?></span>
|
<span class="h5 fw-bold"><?= format_N($rpsinistres_total['nbLigne']) ?> <?= _("Lignes") ?></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 border-end border-secondary">
|
<div class="col-md-4 border-end border-secondary">
|
||||||
<small class="text-uppercase opacity-75 d-block"><?= _("Cumul Sinistres") ?></small>
|
<small class="text-uppercase opacity-75 d-block"><?= _("Montant Total") ?></small>
|
||||||
<span class="h5 fw-bold text-warning"><?= format_N($rpsinistres_total['sinistres_total']) ?></span>
|
<span class="h5 fw-bold text-warning"><?= format_N($rpsinistres_total['montant_total']) ?></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<i class="fas fa-info-circle me-1 text-info"></i>
|
<i class="fas fa-info-circle me-1 text-info"></i>
|
||||||
|
|
@ -19,44 +19,37 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="table-responsive">
|
<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 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">
|
<thead class="table-light border-bottom text-uppercase small fw-bold">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-center"><?= _("N° Adhérent") ?></th>
|
<th class="text-center"><?= _("N° Bénéficiaire") ?></th>
|
||||||
<th><?= _("Adhérent Principal") ?></th>
|
<th><?= _("Bénéficiaire") ?></th>
|
||||||
<th class="text-center"><?= _("Date de début") ?></th>
|
<th class="text-center"><?= _("Date") ?></th>
|
||||||
<th class="text-center"><?= _("Période passée") ?></th>
|
<th class="text-center"><?= _("Prestataire") ?></th>
|
||||||
<th class="text-center"><?= _("Sinistres") ?></th>
|
<th class="text-center"><?= _("Catégorie") ?></th>
|
||||||
<th class="text-center"><?= _("Ratio (%)") ?></th>
|
<th class="text-center"><?= _("N° Facture") ?></th>
|
||||||
<th class="text-center">Cat</th>
|
<th class="text-center"><?= _("Garantie") ?></th>
|
||||||
|
<th class="text-end px-3"><?= _("Montant") ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($rpsinistres as $rpsinistre):
|
<?php foreach ($rpsinistres as $rpsinistre):
|
||||||
$nbligne++;
|
$nbligne++;
|
||||||
$ratio = (float)$rpsinistre['ratio'];
|
$CategoriePrestataire = est_anglophone()
|
||||||
// Couleur dynamique pour le ratio
|
? $this->nettoyer($rpsinistre['CategoriePrestataireEng'])
|
||||||
$ratioClass = ($ratio > 100) ? 'text-danger fw-bold' : (($ratio > 70) ? 'text-warning' : 'text-success');
|
: $this->nettoyer($rpsinistre['CategoriePrestataire']);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-center fw-bold text-primary"><?= $this->nettoyer($rpsinistre['numeroAdherent']) ?></td>
|
<td class="text-center fw-bold text-primary"><?= $this->nettoyer($rpsinistre['numeroBeneficiaire']) ?></td>
|
||||||
<td><?= $this->nettoyer($rpsinistre['Adherent']) ?></td>
|
<td class="text-uppercase"><?= $this->nettoyer($rpsinistre['Beneficiaire']) ?></td>
|
||||||
<td class="text-center text-muted"><?= dateLang($this->nettoyer($rpsinistre['dateEffetAdherent']), $_SESSION['lang']) ?></td>
|
<td class="text-center text-muted"><?= dateLang($this->nettoyer($rpsinistre['Date']), $_SESSION['lang']) ?></td>
|
||||||
<td class="text-center"><?= $this->nettoyer($rpsinistre['duree_acquise']) ?> <small><?= _("j") ?></small></td>
|
<td><?= $this->nettoyer($rpsinistre['Prestataire']) ?></td>
|
||||||
<td class="text-center fw-bold"><?= format_N($rpsinistre['sinistres']) ?></td>
|
<td class="text-center small"><?= $CategoriePrestataire ?></td>
|
||||||
|
<td class="text-center">#<?= $this->nettoyer($rpsinistre['idFacture']) ?></td>
|
||||||
<td class="text-center <?= $ratioClass ?>">
|
<td class="text-center"><span class="badge bg-light text-dark border"><?= $this->nettoyer($rpsinistre['codeGarantie']) ?></span></td>
|
||||||
<?= number_format($ratio, 2, ',', ' ') ?> %
|
<td class="text-end fw-bold px-3"><?= format_N($this->nettoyer($rpsinistre['fraisReel'])); ?></td>
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="text-center">
|
|
||||||
<span class="badge bg-secondary-subtle text-secondary border border-secondary-subtle">
|
|
||||||
<?= $this->nettoyer($rpsinistre['codeProduit']) ?>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($nbligne == 200) {
|
if ($nbligne == 200) {
|
||||||
$nbligne = "> " . $nbligne . " => " . _("Utilisez l'export Excel");
|
$nbligne = "> " . $nbligne . " => " . _("Utilisez l'export Excel");
|
||||||
|
|
@ -68,8 +61,11 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer bg-white text-end py-2">
|
<div class="card-footer bg-white d-flex justify-content-between align-items-center py-2">
|
||||||
<small class="text-muted italic"><?= _("Généré le") ?> <?= date('d/m/Y H:i') ?></small>
|
<span class="text-muted small italic">
|
||||||
|
<i class="fas fa-history me-1"></i><?= _("Généré le") ?> <?= date('d/m/Y H:i') ?>
|
||||||
|
</span>
|
||||||
|
<span class="badge bg-secondary opacity-75"><?= $_SESSION['numeroPolice_C'] ?></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input class="sr-only" type="text" id="nbligne_info" name="nbligne_info" value="<?= $nbligne ?>">
|
<input class="sr-only" type="text" id="nbligne_info" name="nbligne_info" value="<?= $nbligne ?>">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user