menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuVue("Ficheadherent"); $this->adherent = new Adherent(); $this->beneficiaire = new Beneficiaire(); $this->garantieadherent = new Garantieadherent(); $this->tarif = new Tarifsactes(); $_SESSION['modeDevis'] = "0"; $_SESSION['retour'] = "Ficheadherent"; } public function index() { $idPolice = $_SESSION['idPolice_C']; $this->adherent->getNbassure($idPolice); $idAdherent = $this->requete->getParametre("id"); $adherent = $this->adherent->getContexteAdherentId($idAdherent); $beneficiaires = $this->beneficiaire->getBeneficiairesId($idAdherent); $totalbeneficiaires = $this->beneficiaire->getTotalBeneficiairesId($idAdherent); $garantieadherents = null; $prestationParLienParente = $_SESSION['prestationParLienParente']; $garantieadherents = $this->garantieadherent->getGarantieAdherent($idAdherent); $this->adherent->controlerplafondadherentannuel($idAdherent); $_SESSION['controlerPlafondBeneficiaire'] = "0"; //$limite_adherent = $this->garantieadherent->getLimitesAdherent($idAdherent); $limite_adherent = $this->garantieadherent->getSituationFamille($idAdherent); $codeTypeTarifActe = "TADH"; $tarifActe = $this->tarif->getTarifActeByType($codeTypeTarifActe); $prestationsParMois = $this->adherent->getPrestationsmensuelles($idAdherent); $prestationsParliens = $this->adherent->getPrestationsLiensParente($idAdherent); $tabPrestationsParMois = [ 'mois' => [], 'consos' => [] ]; $tabPrestationsParLiens = [ 'lienparente' => [], 'consos_liens' => [] ]; $tabConsoParGaranties = [ 'garanties' => [], 'depenses' => [], 'plafonds' => [] ]; foreach ($prestationsParMois as $v) { $tabPrestationsParMois['mois'][] = $v['mois']; $tabPrestationsParMois['consos'][] = $v['consommationAdherent']; } foreach ($prestationsParliens as $v) { $tabPrestationsParLiens['lienparente'][] = $v['lienparente']; $tabPrestationsParLiens['consos_liens'][] = $v['consommation']; } $nbreLienParente = count($tabPrestationsParLiens['lienparente']); foreach ($garantieadherents as $v) { $tabConsoParGaranties['garanties'][] = $v['codeGarantie']; $tabConsoParGaranties['depenses'][] = $v['consommationFamille']; $tabConsoParGaranties['plafonds'][] = $v['plafondFamille']; } $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, 'tarifActe' => $tarifActe, 'dataConsoParMois' => $dataConsoParMois, 'dataConsoParLiens' => $dataConsoParLiens, 'dataConsoParGaranties' => $dataConsoParGaranties, 'nbreLienParente' => $nbreLienParente )); } public function supprimer() { $id = $this->requete->getParametre("id"); $this->adherent->supprimer($id); $this->rediriger("Listeadherent"); } }