diff --git a/Controleur/ControleurFicheadherent.php b/Controleur/ControleurFicheadherent.php index cc353d2..0da361a 100644 --- a/Controleur/ControleurFicheadherent.php +++ b/Controleur/ControleurFicheadherent.php @@ -68,6 +68,7 @@ class ControleurFicheadherent extends Controleur { $dataConsoParLiens = json_encode($tabPrestationsParLiens, JSON_NUMERIC_CHECK); $dataConsoParGaranties = json_encode($tabConsoParGaranties, JSON_NUMERIC_CHECK); + $nombreGed = $this->adherent->getNombreGedAdherent($idAdherent); $this->genererVue(array( 'adherent' => $adherent, @@ -78,7 +79,8 @@ class ControleurFicheadherent extends Controleur { 'dataConsoParMois' => $dataConsoParMois, 'dataConsoParLiens' => $dataConsoParLiens, 'dataConsoParGaranties' => $dataConsoParGaranties, - 'nbreLienParente' => $nbreLienParente + 'nbreLienParente' => $nbreLienParente, + 'nombreGed' => $nombreGed )); } diff --git a/Modele/Adherent.php b/Modele/Adherent.php index 655f6dd..5c614db 100755 --- a/Modele/Adherent.php +++ b/Modele/Adherent.php @@ -887,5 +887,17 @@ class Adherent extends Modele { return $resultat->fetchAll(PDO::FETCH_ASSOC); } + + public function getNombreGedAdherent($idAdherent) + { + $source = 'S'; + + $sql = 'SELECT fn_nombre_ged_adherent(?, ?) as nombreGed;'; + + $resultat = $this->executerRequete($sql, array($idAdherent, $source)); + $ligne = $resultat->fetch(PDO::FETCH_ASSOC); + + return $ligne['nombreGed']; + } } \ No newline at end of file diff --git a/Vue/Ficheadherent/index.php b/Vue/Ficheadherent/index.php index 6c85a0a..f833843 100644 --- a/Vue/Ficheadherent/index.php +++ b/Vue/Ficheadherent/index.php @@ -23,18 +23,14 @@ $idApporteur = $this->nettoyer($adherent['idApporteur']); $libelleApporteur = $this->nettoyer($adherent['libelleApporteur']); $typeecheancier = $this->nettoyer($adherent['typeecheancier']); + if (est_anglophone()) { $typeecheancier = $this->nettoyer($adherent['typeecheancierEng']); } + $tauxInteretEcheancier = $this->nettoyer($adherent['tauxInteretEcheancier']); - /* - var_dump( - array( - "dateEffetAdherent_C"=> $_SESSION['dateEffetAdherent_C'], - ) - ); - */ + ?>