diff --git a/Controleur/ControleurTrancheage.php b/Controleur/ControleurTrancheage.php index e70d96d0..e554347e 100755 --- a/Controleur/ControleurTrancheage.php +++ b/Controleur/ControleurTrancheage.php @@ -20,11 +20,11 @@ class ControleurTrancheage extends Controleur { public function index() { $entetestrancheage = $this->trancheage->geterentetestrancheage(''); - //$garant = $this->trancheage->getListeGarant(); + $garant = $this->trancheage->getListeGarant(); $_SESSION['successTrancheAge'] = '1'; $_SESSION['messageTrancheAge'] = ''; - $this->genererVue(array('entetestrancheage' => $entetestrancheage, 'garant' => $this->garant)); + $this->genererVue(array('entetestrancheage' => $entetestrancheage, 'garant' => $garant)); } } \ No newline at end of file diff --git a/Modele/Trancheage.php b/Modele/Trancheage.php index 4b24f1ba..323409d8 100755 --- a/Modele/Trancheage.php +++ b/Modele/Trancheage.php @@ -4,8 +4,9 @@ class Trancheage extends Modele{ public function getListeGarant() { - $sql = 'SELECT codeGcAssureur AS `code`, libelle FROM gc_assureur - WHERE codeSociete= ? AND actif = 1 ORDER BY libelle'; + $sql = 'SELECT codeGcAssureur AS `code`, CONCAT(libelle, " [",codeGcAssureur,"]") AS libelle + FROM gc_assureur WHERE codeSociete= ? AND actif = 1 ORDER BY libelle'; + $resultat = $this->executerRequete($sql,array($_SESSION['codeSociete'])); return $resultat->fetchAll(PDO::FETCH_ASSOC); }