r
This commit is contained in:
@@ -21,6 +21,7 @@ class ControleurFicheadherent extends Controleur {
|
||||
|
||||
$_SESSION['modeDevis'] = "0";
|
||||
}
|
||||
|
||||
public function index() {
|
||||
|
||||
$idPolice = $_SESSION['idPolice_C'];
|
||||
@@ -37,9 +38,48 @@ class ControleurFicheadherent extends Controleur {
|
||||
$_SESSION['controlerPlafondBeneficiaire'] = "0";
|
||||
|
||||
$limite_adherent = $this->garantieadherent->getLimitesAdherent($idAdherent);
|
||||
|
||||
$prestationsParMois = $this->adherent->getPrestationsmensuelles($idAdherent);
|
||||
$prestationsParLiens = $this->adherent->getPrestationsLiensParente($idAdherent);
|
||||
|
||||
// Prestations par mois
|
||||
$tabPrestationsParMois = [
|
||||
'mois' => array_column($prestationsParMois, 'mois'),
|
||||
'consos' => array_column($prestationsParMois, 'consommationAdherent')
|
||||
];
|
||||
|
||||
// Prestations par liens de parenté
|
||||
$tabPrestationsParLiens = [
|
||||
'lienparente' => array_column($prestationsParLiens, 'lienparente'),
|
||||
'consos_liens' => array_column($prestationsParLiens, 'consommation')
|
||||
];
|
||||
|
||||
$nbreLienParente = count($tabPrestationsParLiens['lienparente']);
|
||||
|
||||
// Consommations par garanties
|
||||
$tabConsoParGaranties = [
|
||||
'garanties' => array_column($garantieadherents, 'codeGarantie'),
|
||||
'depenses' => array_column($garantieadherents, 'consommationFamille'),
|
||||
'plafonds' => array_column($garantieadherents, 'plafondFamille')
|
||||
];
|
||||
|
||||
// Encodage JSON
|
||||
$dataConsoParMois = json_encode($tabPrestationsParMois, JSON_NUMERIC_CHECK);
|
||||
$dataConsoParLiens = json_encode($tabPrestationsParLiens, JSON_NUMERIC_CHECK);
|
||||
$dataConsoParGaranties = json_encode($tabConsoParGaranties, JSON_NUMERIC_CHECK);
|
||||
|
||||
|
||||
$this->genererVue(array('adherent' => $adherent, 'beneficiaires' => $beneficiaires, 'totalbeneficiaires' => $totalbeneficiaires,
|
||||
'garantieadherents' => $garantieadherents, 'limite_adherent' => $limite_adherent));
|
||||
$this->genererVue(array(
|
||||
'adherent' => $adherent,
|
||||
'beneficiaires' => $beneficiaires,
|
||||
'totalbeneficiaires' => $totalbeneficiaires,
|
||||
'garantieadherents' => $garantieadherents,
|
||||
'limite_adherent' => $limite_adherent,
|
||||
'dataConsoParMois' => $dataConsoParMois,
|
||||
'dataConsoParLiens' => $dataConsoParLiens,
|
||||
'dataConsoParGaranties' => $dataConsoParGaranties,
|
||||
'nbreLienParente' => $nbreLienParente
|
||||
));
|
||||
}
|
||||
|
||||
public function supprimer() {
|
||||
|
||||
Reference in New Issue
Block a user