diff --git a/Controleur/ControleurAjaxremplaceradherent.php b/Controleur/ControleurAjaxremplaceradherent.php new file mode 100644 index 0000000..dbb29a2 --- /dev/null +++ b/Controleur/ControleurAjaxremplaceradherent.php @@ -0,0 +1,94 @@ +adherent = new Adherent(); + $this->naturepiece = (new Naturepiece())->getListe(); + $this->sexe = (new Sexe())->getListe(); + $this->situationfamille = (new Situationfamille())->getListe(); + $this->pays = (new Pays())->getListe($_SESSION['codePaysSociete']); + $this->groupesanguin = (new Groupesanguin())->getListe(); + $this->garantieadherent = new Garantieadherent(); + } + + public function index() + { + // $this->genererVueAjax(); + } + + public function init() + { + $idPolice = $_SESSION['idPolice_C']; + $idAdherent = $_SESSION['idAdherent_C']; + $dateSortie = $this->requete->getParametreDate("dateSortie"); + $dateRemplacement = $this->requete->getParametreDate("dateRemplacement"); + $user = $_SESSION['login']; + $motifavenant = $this->requete->getParametreFormulaire("motifavenant"); + $fraisCarte = $this->requete->getParametreFormulaire("fraisCarte","numerique"); + + $this->adherent->initremplacementadherent($idPolice, $idAdherent, $dateSortie , $dateRemplacement, $user, + $motifavenant, $fraisCarte); + + $remplacementadherent_temp = $this->adherent->getremplacementadherent_temp(); + + $spadherent = $this->adherent->getRapportSpAdherent($idAdherent, $dateSortie); + + $beneficiairearemplacers = $this->adherent->getbeneficiairearemplacer(); + + $adherentremplacanttemp = $this->adherent->getadherentremplacanttemp(); + + $garantieadherents = $this->garantieadherent->getGarantieAdherent($idAdherent); + + $this->genererVueAjax(array('spadherent' => $spadherent, 'beneficiairearemplacers' => $beneficiairearemplacers, + 'adherentremplacanttemp' => $adherentremplacanttemp, 'naturepiece' => $this->naturepiece, 'sexe' => $this->sexe, + 'pays' => $this->pays, 'situationfamille' => $this->situationfamille, 'groupesanguin' => $this->groupesanguin, + 'remplacementadherent_temp' => $remplacementadherent_temp, 'garantieadherents' => $garantieadherents)); + } + + public function enregistrerremplacementadherent() + { + $nom = $this->requete->getParametre("nom"); + $prenoms = $this->requete->getParametreFormulaire("prenoms"); + $codeNaturePiece = $this->requete->getParametre("codeNaturePiece"); + $numeroPiece = $this->requete->getParametreFormulaire("numeroPiece"); + $sexe = $this->requete->getParametreFormulaire("sexe"); + $dateNaissance = $this->requete->getParametreDate("dateNaissance"); + $codeGroupeSanguin = $this->requete->getParametreFormulaire("codeGroupeSanguin"); + $codeSituationFamille = $this->requete->getParametreFormulaire("codeSituationFamille"); + $nombreEnfants = $this->requete->getParametreFormulaire("nombreEnfants"); + $adresseGeo = $this->requete->getParametreFormulaire("adresseGeo"); + $adressePostale = $this->requete->getParametreFormulaire("adressePostale"); + $codePays = $this->requete->getParametre("codePays"); + $telephonFixe = $this->requete->getParametreFormulaire("telephonFixe"); + $telephonePortable = $this->requete->getParametreFormulaire("telephonePortable"); + $email = $this->requete->getParametreFormulaire("email"); + $fraisCarte = $this->requete->getParametreFormulaire("fraisCarte","numerique"); + + $nom = strtoupper($nom); + $prenoms = ucwords($prenoms); + + $this->adherent->enregistrerremplacementadherent($nom, $prenoms, $codeNaturePiece, $numeroPiece, $sexe, + $dateNaissance, $codeGroupeSanguin, $codeSituationFamille, $nombreEnfants, $adresseGeo, $adressePostale, + $codePays, $telephonFixe, $telephonePortable, $email, $fraisCarte) ; + + // $this->genererVueAjax(); + } +} \ No newline at end of file diff --git a/Js/fonctions.js b/Js/fonctions.js index 55b8698..31fbaa3 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -5885,4 +5885,91 @@ function fiche_remplacer_adherent() } window.location.assign($("#racineWeb" ).val()+"Remplaceradherent/"); +} + + +function init_remplacement_adherent() +{ + dateSortieAdh = $("#dateSortieAdh").datepicker("getDate"); + dateRemplacement = $("#dateRemplacement").datepicker("getDate"); + + dateEffetPolice = $("#dateEffetPolice_C").val(); + + dateEffetAdherent = $("#dateEffetAdherent").val(); + + dateEcheancePolice = $("#dateEcheancePolice_C").val(); + + var td0 = new Date(dateEffetAdherent); + var td1 = new Date(dateSortieAdh); + var td11 = new Date(dateRemplacement); + var td2 = new Date(dateEcheancePolice); + + dt0=Math.round(Date.parse(td0)/(1000*3600*24)); + dt1=Math.round(Date.parse(td1)/(1000*3600*24)); + dt11=Math.round(Date.parse(td11)/(1000*3600*24)); + dt2=Math.round(Date.parse(td2)/(1000*3600*24)); + + if (td11<=td1) + { + v_msg="Attention! Veuillez revoir vos dates!"; + v_msgEng="Warning! Please review your dates!"; + alert_ebene(v_msg, v_msgEng); + return false; + } + + if (dt1>dt2 || dt1  ' + 'Veuillez patienter... / Please wait...' + ''); + + $.ajax({ + url: $("#racineWeb").val()+"Ajaxremplaceradherent/init/", + type : 'post', + data: donnees, + error: function(errorData) { + }, + success: function(data) + { + $("#div_remplacement_adherent").html(data); + }, + complete: function() { + $(".datepicker" ).datepicker(); + } + }); } \ No newline at end of file diff --git a/Vue/Ajaxremplaceradherent/enregistrerremplacementadherent.php b/Vue/Ajaxremplaceradherent/enregistrerremplacementadherent.php new file mode 100644 index 0000000..a41e5ce --- /dev/null +++ b/Vue/Ajaxremplaceradherent/enregistrerremplacementadherent.php @@ -0,0 +1,5 @@ +
+
+

+
+
diff --git a/Vue/Ajaxremplaceradherent/index.php b/Vue/Ajaxremplaceradherent/index.php new file mode 100644 index 0000000..46f8b44 --- /dev/null +++ b/Vue/Ajaxremplaceradherent/index.php @@ -0,0 +1,3 @@ +
+ NOTHING +
diff --git a/Vue/Ajaxremplaceradherent/init.php b/Vue/Ajaxremplaceradherent/init.php new file mode 100644 index 0000000..2fd06bb --- /dev/null +++ b/Vue/Ajaxremplaceradherent/init.php @@ -0,0 +1,159 @@ +
+
+
+
+
+ +
nettoyer($remplacementadherent_temp['dateSortie'])) ?>
+
+
+ +
nettoyer($remplacementadherent_temp['dateRemplacement'])) ?>
+
+
+ +
" nettoyer($remplacementadherent_temp['motif']) ?> "
+
+
+
+
+ +
+
+
+
+
+ + + + + + + + + + + + nettoyer($garantieadherent['champApplication']); + ?> + + + + + + + + + + + + + + +
nettoyer($garantieadherent['garantie'])?>nettoyer($garantieadherent['plafond'])) ?>nettoyer($garantieadherent['consommation'])) ?>nettoyer($garantieadherent['solde'])) ?>
+
+
+ +
+
+ +
+
+
+
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+
+ +
+ + Age: 0 +
+
+
+ +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+
+ +
+ + CFA +
+
+
+ +
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/Vue/Remplaceradherent/index.php b/Vue/Remplaceradherent/index.php index f6fc2ed..bf1061b 100644 --- a/Vue/Remplaceradherent/index.php +++ b/Vue/Remplaceradherent/index.php @@ -36,19 +36,19 @@
- nettoyer($adherent['dateEffetPolice'])) ?> + nettoyer($adherent['dateEffetPolice']), $_SESSION['lang']) ?>
- nettoyer($adherent['dateEffetAdherent'])) ?> + nettoyer($adherent['dateEffetAdherent']), $_SESSION['lang']) ?>
- nettoyer($adherent['dateFinPolice'])) ?> + nettoyer($adherent['dateFinPolice']), $_SESSION['lang']) ?>
diff --git a/Vue/gabarit.php b/Vue/gabarit.php index 44521cc..afdb2b4 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -663,7 +663,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte']; - +