Valider
This commit is contained in:
parent
94e467a300
commit
d3e935fa35
|
|
@ -15,6 +15,10 @@ class ControleurAccueil extends Controleur {
|
|||
|
||||
public function index() {
|
||||
// KPIs
|
||||
|
||||
$kpis = $this->synthese->getKpis();
|
||||
|
||||
/*
|
||||
$kpis = [
|
||||
"assures" => 1248,
|
||||
"nombre_salarie" => 405,
|
||||
|
|
@ -24,6 +28,7 @@ class ControleurAccueil extends Controleur {
|
|||
"cotisations" => 162300000,
|
||||
"solde" => 12500000
|
||||
];
|
||||
*/
|
||||
|
||||
|
||||
// Activité récente
|
||||
|
|
@ -42,49 +47,14 @@ class ControleurAccueil extends Controleur {
|
|||
];
|
||||
|
||||
// Répartition sinistres
|
||||
$claims = $this->synthese->getClaims();
|
||||
$claims = $this->synthese->getClaims();
|
||||
|
||||
$claimsLabels = array();
|
||||
$claimsValues = array();
|
||||
|
||||
$tabclaims = [
|
||||
'claimsLabels' => [],
|
||||
'claimsValues' => []
|
||||
];
|
||||
|
||||
foreach ($claims as $v) {
|
||||
$tabclaims['claimsLabels'][] = $v['claimsLabels'];
|
||||
$tabclaims['claimsValues'][] = $v['claimsValues'];
|
||||
}
|
||||
|
||||
$dataTabClaims = json_encode($tabclaims,JSON_NUMERIC_CHECK);
|
||||
|
||||
//var_dump($dataTabClaims); exit();
|
||||
|
||||
|
||||
$claimsLabels = [
|
||||
"Consultations",
|
||||
"Pharmacie",
|
||||
"Hospitalisation",
|
||||
"Imagerie",
|
||||
"Dentaire"
|
||||
$tabclaims = [
|
||||
'claimsLabels' => array_column($claims, 'claimsLabels'),
|
||||
'claimsValues' => array_column($claims, 'claimsValues')
|
||||
];
|
||||
|
||||
$claimsLabelsEng = [
|
||||
"Consultations",
|
||||
"Pharmacie",
|
||||
"Hospitalisation",
|
||||
"Imagerie",
|
||||
"Dentaire"
|
||||
];
|
||||
|
||||
$claimsValues = [
|
||||
22,
|
||||
28,
|
||||
30,
|
||||
12,
|
||||
8
|
||||
];
|
||||
$dataTabClaims = json_encode($tabclaims, JSON_NUMERIC_CHECK);
|
||||
|
||||
// Évolution cotisations
|
||||
$months = ["Jan", "Fév", "Mar", "Avr", "Mai", "Juin"];
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class Synthese extends Modele {
|
|||
|
||||
$resultat = $this->executerRequete($sql, array($idClient));
|
||||
|
||||
return $resultat->fetchAll();
|
||||
return $resultat->fetch();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,34 +3,44 @@
|
|||
|
||||
<!-- KPIs -->
|
||||
<div class="kpis">
|
||||
<div class="card">
|
||||
<h3><?= _('Total Contrats')?></h3>
|
||||
<div class="value text-danger"><?= format_N($kpis["nbPolice"]) ?> </div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3><?= _('Total Assurés')?></h3>
|
||||
<div class="value"><?= format_N($kpis["assures"]) ?></div>
|
||||
<div class="value"><?= format_N($kpis["nbBeneficiaire"]) ?></div>
|
||||
<div class="sub-values">
|
||||
<div class="sub-item">
|
||||
<span><?= _('Salariés') ?> :</span>
|
||||
<strong><?= format_N($kpis["nombre_salarie"]) ?></strong>
|
||||
<strong><?= format_N($kpis["nbAdherent"]) ?></strong>
|
||||
</div>
|
||||
<div class="sub-item">
|
||||
<span><?= _('Ayants droits') ?> :</span>
|
||||
<strong><?= format_N($kpis["nombre_ayant"]) ?></strong>
|
||||
<strong><?= format_N($kpis["nbDependant"]) ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3><?= _('Cotisations / Primes')?></h3>
|
||||
<div class="value text-success"><?= format_N($kpis["cotisations"]).' '.$_SESSION['devise_C'] ?></div>
|
||||
<div class="value text-success"><?= format_N($kpis["primeTtc"]).' '.$_SESSION['devise_C'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3><?= _('Sinistres')?></h3>
|
||||
<div class="value text-warning"><?= $kpis["sinistres_count"] ?> / <?= format_N($kpis["sinistres_amount"]).' '.$_SESSION['devise_C'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3><?= _('Solde à payer')?></h3>
|
||||
<div class="value text-danger"><?= format_N($kpis["solde"]).' '.$_SESSION['devise_C'] ?> </div>
|
||||
<div class="sub-values">
|
||||
<div class="sub-item">
|
||||
<span><?= _('Nombre') ?> :</span>
|
||||
<strong><?= format_N($kpis["nbSinistres"]) ?></strong>
|
||||
</div>
|
||||
<div class="sub-item">
|
||||
<span><?= _('Montant') ?> :</span>
|
||||
<strong><?= format_N($kpis["fraisReel"]).' '.$_SESSION['devise_C'] ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user