From 5dcb666d6ed4346088593d83c2705906ae5e7db7 Mon Sep 17 00:00:00 2001 From: KANE LAZENI Date: Fri, 19 Dec 2025 19:02:51 +0000 Subject: [PATCH] a --- Controleur/ControleurAjaxhistoriqueprestation.php | 15 +++------------ Js/fonctions.js | 9 +++------ Modele/Prestationactes.php | 10 +++++----- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/Controleur/ControleurAjaxhistoriqueprestation.php b/Controleur/ControleurAjaxhistoriqueprestation.php index dd0cee5..1583768 100755 --- a/Controleur/ControleurAjaxhistoriqueprestation.php +++ b/Controleur/ControleurAjaxhistoriqueprestation.php @@ -33,26 +33,17 @@ class ControleurAjaxhistoriqueprestation extends Controleur { public function prestations() { - $numeroAdherent = $this->requete->getParametreFormulaire("numeroAdherent"); - - //$_SESSION['numeroBeneficiaire'] = $numeroBeneficiaire; - - $codeGarantie = $this->requete->getParametreFormulaire("codeGarantie"); - $d1 = $this->requete->getParametreDate("d1"); $d2 = $this->requete->getParametreDate("d2"); - - + $garanties = $this->garantie->getListePourActe(); - $historiqueprestations = $this->prestationactes->gethistoriqueprestation($numeroAdherent, $codeGarantie, $d1, $d2); - - $totalprestations = $this->prestationactes->gettotalprestation($numeroAdherent, $codeGarantie, $d1, $d2); + $historiqueprestations = $this->prestationactes->gethistoriqueprestation($d1, $d2); + $totalprestations = $this->prestationactes->gettotalprestation($d1, $d2); $this->genererVueAjax(array('garanties' => $garanties,'historiqueprestations' => $historiqueprestations, 'totalprestations' => $totalprestations)); - } public function majquantite() diff --git a/Js/fonctions.js b/Js/fonctions.js index 3cfc8eb..09005c3 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -16956,15 +16956,12 @@ function afficherMasquerGaranties() } -function afficherhistoriqueadherent(numeroAdherent){ - debugger; +function afficherhistoriqueadherent() +{ d1=$("#d1").val(); d2=$("#d2").val(); - codeGarantie=$("#codeGarantie").val(); - - donnees = "numeroAdherent="+numeroAdherent+"&codeGarantie="+codeGarantie; - donnees += '&d1='+d1+'&d2='+d2; + donnees = 'd1='+d1+'&d2='+d2; $("#div_prestation").html('
' + '' + '
'); diff --git a/Modele/Prestationactes.php b/Modele/Prestationactes.php index 6e833a0..b39ca0e 100755 --- a/Modele/Prestationactes.php +++ b/Modele/Prestationactes.php @@ -378,20 +378,20 @@ class Prestationactes extends Modele { } - public function gethistoriqueprestation($numeroAdherent, $d1, $d2) + public function gethistoriqueprestation($d1, $d2) { $sql = 'call sp_a_get_historique_prestation_adherent(?, ?, ?);'; - $resultat = $this->executerRequete($sql, array($numeroAdherent, $d1, $d2)); + $resultat = $this->executerRequete($sql, array($_SESSION['idAdherent_C'], $d1, $d2)); return $resultat->fetchAll(PDO::FETCH_ASSOC); } - public function gettotalprestation($numeroAdherent, $codeGarantie, $d1, $d2) + public function gettotalprestation($d1, $d2) { - $sql = 'call sp_get_total_historique_prestation_adherent(?, ?, ?, ?);'; + $sql = 'call sp_get_total_historique_prestation_adherent(?, ?, ?);'; - $resultat = $this->executerRequete($sql, array($numeroAdherent, $codeGarantie, $d1, $d2)); + $resultat = $this->executerRequete($sql, array($_SESSION['idAdherent_C'], $d1, $d2)); return $resultat->fetch(PDO::FETCH_ASSOC); }