executerRequete($sql, array($codePrestataire, $codeExercice, $codeMois)); $ligne = $resultat->fetch(PDO::FETCH_ASSOC); return $ligne['idDemandeDecompte']; } public function initdemandedecompte() { $codeSociete = $_SESSION['p_codeSociete']; $user = $_SESSION['p_login']; $codePrestataire = $_SESSION['p_codePrestataire_C']; $codeExercice = $_SESSION['p_codeExercice_C']; $codeMois = $_SESSION['p_codeMois_C']; $sql = 'call sp_p_init_demande_decompte(?, ?, ?, ?, ?);'; $this->executerRequete($sql, array($codeSociete, $codePrestataire, $user, $codeExercice, $codeMois)); } public function getinfosdemandedecompte($idDemandeDecompte) { $sql = 'call sp_p_get_infos_demande_decompte(?)'; $resultat = $this->executerRequete($sql, array($idDemandeDecompte)); return $resultat->fetch(PDO::FETCH_ASSOC); } public function getdemandedecompte($idDemandeDecompte) { $sql = 'call sp_p_get_demandedecompte(?)'; $resultat = $this->executerRequete($sql, array($idDemandeDecompte)); $ligne = $resultat->fetch(PDO::FETCH_ASSOC); $_SESSION['p_numeroDemandeDecompte_C'] = $ligne['numeroDemandeDecompte']; return $ligne; } public function rechargerdemandedecompte($idDemandeDecompte, $numeroDemandeDecompte, $codePrestataire, $codeExercice, $codeMois) { $user = $_SESSION['p_login']; $sql = 'call sp_p_recharger_demande_decompte(?, ?, ?, ?, ?, ?);'; $this->executerRequete($sql, array($idDemandeDecompte, $numeroDemandeDecompte, $codePrestataire, $codeExercice, $codeMois, $user)); } public function get_numerodecompte($idReglement) { $sql = 'select fn_get_numerodecompte(?) as numeroDecompte'; $resultat = $this->executerRequete($sql, array($idReglement)); $ligne = $resultat->fetch(PDO::FETCH_ASSOC); return $ligne['numeroDecompte']; } public function getdetaildemandedecompte($numeroDemandeDecompte) { $sql = 'call sp_p_get_detail_demandedecompte(?)'; $resultat = $this->executerRequete($sql, array($numeroDemandeDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function recapdecompte($idReglement, $numeroDecompte) { $sql = 'call sp_r_recap_decompte(?, ?)'; $this->executerRequete($sql, array($idReglement, $numeroDecompte)); } public function getdecomptes($codePrestataire, $codeExercice, $codeMois, $codeEtatDecompte) { $codePrestataire = contruireParamLike($codePrestataire); $codeEtatDecompte = contruireParamLike($codeEtatDecompte); $sql = 'call sp_r_get_decomptes(?, ?, ?, ?)'; $resultat = $this->executerRequete($sql, array($codePrestataire, $codeExercice, $codeMois, $codeEtatDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getdetaildecompteexport($numeroDecompte) { $sql = 'call sp_p_bordereau_decompte_export(?)'; $resultat = $this->executerRequete($sql, array($numeroDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getdetaildecompteexportcso($numeroDecompte) { $sql = 'call sp_p_bordereau_decompte_export_cso(?)'; $resultat = $this->executerRequete($sql, array($numeroDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getdetaildecompteexportcsoid($idReglement) { $sql = 'call sp_p_bordereau_decompte_export_cso_id(?)'; $resultat = $this->executerRequete($sql, array($idReglement)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getdetaildecompteexportpha($numeroDecompte) { $sql = 'call sp_p_bordereau_decompte_export_pha(?)'; $resultat = $this->executerRequete($sql, array($numeroDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getdetaildecompteexportopt($numeroDecompte) { $sql = 'call sp_p_bordereau_decompte_export_opt(?)'; $resultat = $this->executerRequete($sql, array($numeroDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getdetaildecompteexportlab($numeroDecompte) { $sql = 'call sp_p_bordereau_decompte_export_lab(?)'; $resultat = $this->executerRequete($sql, array($numeroDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getdetaildecompteexportsea($numeroDecompte) { $sql = 'call sp_p_bordereau_decompte_export_sea(?)'; $resultat = $this->executerRequete($sql, array($numeroDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } // DEMANDE DE DECOMPTE public function getdetaildemandedecompteexportcso($numeroDemandeDecompte) { $sql = 'call sp_p_demande_decompte_export_cso(?)'; $resultat = $this->executerRequete($sql, array($numeroDemandeDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getdetaildemandedecompteexportpha($numeroDemandeDecompte) { $sql = 'call sp_p_demande_decompte_export_pha(?)'; $resultat = $this->executerRequete($sql, array($numeroDemandeDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getdetaildemandedecompteexportopt($numeroDemandeDecompte) { $sql = 'call sp_p_demande_decompte_export_opt(?)'; $resultat = $this->executerRequete($sql, array($numeroDemandeDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getdetaildemandedecompteexportlab($numeroDemandeDecompte) { $sql = 'call sp_p_demande_decompte_export_lab(?)'; $resultat = $this->executerRequete($sql, array($numeroDemandeDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function getdetaildemandedecompteexportsea($numeroDemandeDecompte) { $sql = 'call sp_p_demande_decompte_export_sea(?)'; $resultat = $this->executerRequete($sql, array($numeroDemandeDecompte)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } }