From 20d1d26a40bab6a7463a0551e4f920186391af4f Mon Sep 17 00:00:00 2001 From: KONE SOREL Date: Tue, 24 Mar 2026 15:29:59 +0000 Subject: [PATCH] dert --- Controleur/ControleurGedadherent.php | 6 +++--- Modele/Ged.php | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Controleur/ControleurGedadherent.php b/Controleur/ControleurGedadherent.php index 714a142..9037364 100644 --- a/Controleur/ControleurGedadherent.php +++ b/Controleur/ControleurGedadherent.php @@ -23,6 +23,8 @@ class ControleurGedadherent extends Controleur { $nouveau_fichier = "rien"; + $nomOrigine = $this->requete->getParametreFormulaire("nomOrigine"); + $codeNaturePiece = $this->requete->getParametreFormulaire("codeNaturePiece"); if(!empty($_POST)) { @@ -38,8 +40,6 @@ class ControleurGedadherent extends Controleur { // Variables $extension = ''; - $codeNaturePiece = $this->requete->getParametreFormulaire("codeNaturePiece"); - if($codeNaturePiece == "AUT"){ $libelleDocument = $this->requete->getParametreFormulaire("libelleAutre"); }else{ @@ -142,7 +142,7 @@ class ControleurGedadherent extends Controleur { $d1 = $_SESSION['dUneSemaineAvant_C']; $d2 = date('Y-m-d'); - $geds = $this->ged->getgedadherent($d1, $d2, ""); + $geds = $this->ged->getgedadherent($d1, $d2, $nomOrigine, $codeNaturePiece); unset($_FILES['fichier_upload']); diff --git a/Modele/Ged.php b/Modele/Ged.php index c2f5f15..46a756d 100755 --- a/Modele/Ged.php +++ b/Modele/Ged.php @@ -69,13 +69,15 @@ class Ged extends Modele { return $resultat->fetchAll(PDO::FETCH_ASSOC); } - public function getgedadherent($d1, $d2, $nomOrigine) + public function getgedadherent($d1, $d2, $nomOrigine, $codeNaturePiece) { $idAdherent = $_SESSION['idAdherent_C']; - $sql = 'call sp_get_ged_adherent_rh(?, ?, ?, ?)'; + $codeNaturePiece = contruireParamLike($codeNaturePiece); + + $sql = 'call sp_get_ged_adherent_rh(?, ?, ?, ?, ?);'; - $resultat = $this->executerRequete($sql, array($idAdherent, $d1, $d2, $nomOrigine)); + $resultat = $this->executerRequete($sql, array($idAdherent, $d1, $d2, $nomOrigine, $codeNaturePiece)); return $resultat->fetchAll(PDO::FETCH_ASSOC); }