executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire, $idSaisie, $user, $codeTarifActe, $tm, $nomConsommable, $idAdherent)); return $consommables->fetchAll(PDO::FETCH_ASSOC); } public function getconsommables() { $idSaisie = $_SESSION['p_idSaisie']; $user = $_SESSION['p_login']; $sql = 'call sp_p_afficher_consommables(?, ?)'; $consommables = $this->executerRequete($sql, array($idSaisie, $user)); return $consommables->fetchAll(PDO::FETCH_ASSOC); } public function ajouterconsommable($idConsommable) { $idAdherent = $_SESSION['p_idAdherent_C']; $numeroAdherent = $_SESSION['p_numeroAdherent_C']; $idBeneficiaire = $_SESSION['p_idBeneficiaire_C']; $numeroBeneficiaire = $_SESSION['p_numeroBeneficiaire_C']; $sql = 'call sp_p_enregistrer_consommable(?, ?, ?, ?, ?)'; $this->executerRequete($sql, array($idConsommable, $idAdherent, $numeroAdherent, $idBeneficiaire, $numeroBeneficiaire)); } public function majquantite($idConsommable, $quantite) { $tm = $_SESSION['p_tm_C']; // $sql = 'call sp_p_maj_quantite_consommable(?, ?, ?)'; $sql = 'call sp_p_maj_quantite_acte(?, ?, ?)'; $this->executerRequete($sql, array($idConsommable, $quantite, $tm)); } public function majprix($idConsommable, $valeurActe) { $tm = $_SESSION['p_tm_C']; $sql = 'call sp_p_maj_prix_consommable(?, ?, ?)'; $this->executerRequete($sql, array($idConsommable, $valeurActe, $tm)); } public function creerconsommable($nomConsommable, $prixconsommable, $quantiteconsommable) { $codeSociete = $_SESSION['p_codeSociete']; $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; $codePrestataire = $_SESSION['p_codePrestataire_C']; $idSaisie = $_SESSION['p_idSaisie']; $user = $_SESSION['p_login']; $codeTarifActe = $_SESSION['p_codeTarifActe_C']; $tm = $_SESSION['p_tm_C']; $numeroAdherent = $_SESSION['p_numeroAdherent_C']; $sql = 'call sp_p_creer_nv_consommables(?, ?, ?, ?, ?, ?, ?, ?)'; $this->executerRequete($sql, array($codeSociete, $numeroFeuilleMaladie, $user, $tm, $nomConsommable, $prixconsommable, $quantiteconsommable, $numeroAdherent)); } public function getconsommablesfeuille($numeroFeuilleMaladie, $codePrestataire) { $sql = 'call sp_p_get_consommables_feuille(?, ?)'; $resultat = $this->executerRequete($sql, array($numeroFeuilleMaladie, $codePrestataire) ); return $resultat->fetchAll(PDO::FETCH_ASSOC); } public function retirerconsommabletous() { $codeSociete = $_SESSION['p_codeSociete']; $numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C']; $sql = 'call sp_p_retirer_consommables_tous(?)'; $this->executerRequete($sql, array($numeroFeuilleMaladie)); } public function retirerconsommable($idConsommable) { $sql = 'call sp_p_retirer_consommable(?)'; $this->executerRequete($sql, array($idConsommable)); } }