diff --git a/Js/fonctions.js b/Js/fonctions.js
index 61bdc1ee..b9709a8b 100755
--- a/Js/fonctions.js
+++ b/Js/fonctions.js
@@ -33415,4 +33415,11303 @@ function afficher_beneficiare_prime_adherent()
$("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
$.ajax({
- url: $("#racineWeb").val()+"Ajaxbeneficiaireprimeadherent/"
\ No newline at end of file
+ url: $("#racineWeb").val()+"Ajaxbeneficiaireprimeadherent/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ }
+ });
+}
+
+function afficher_beneficiare_prime_beneficiaire()
+{
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees_retour = "";
+ donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxbeneficiaireprimebeneficiaire/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ }
+ });
+}
+
+function maj_motif_non_paiement(idReglement, motifNonPaiement)
+{
+ v_msg="Veuillez saisir ou modifier le commentaire!";
+ v_msgEng="Please enter or edit comments!";
+
+ motifNonPaiement = prompt_ebene(v_msg, v_msgEng, motifNonPaiement);
+
+ if(motifNonPaiement==null)
+ {
+ return;
+ }
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+
+ donnees = 'idReglement='+idReglement+"&motifNonPaiement="+motifNonPaiement;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxldemandesteglementcpt/majmotifnonpaiement/",
+ type: 'POST',
+ data: donnees,
+ complete: function() {
+ }
+ });
+ }
+}
+
+function afficher_garantieadherent_exo()
+{
+ var div_attente = $('#div_gar_exo');
+
+ exercieReference=$("#exercieReference").val();
+
+ if (exercieReference<=" ")
+ {
+ v_msg="Veuillez sélectionner un exercice!";
+ v_msgEng="Please select an exercise!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#exercieReference").focus();
+
+ div_attente.html('');
+
+ return;
+ }
+
+ donnees = 'exercieReference='+exercieReference;
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxplafondadherent/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function afficher_garantieadherent_entete_contrat()
+{
+ var div_attente = $('#div_gar_exo');
+
+ idEntetecontrat=$("#idEntetecontrat").val();
+
+ if (idEntetecontrat<="0")
+ {
+ v_msg="Veuillez sélectionner une période!";
+ v_msgEng="Please select a period!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idEntetecontrat").focus();
+
+ div_attente.html('');
+
+ return;
+ }
+
+ // donnees = 'exercieReference='+exercieReference;
+ donnees = 'idEntetecontrat='+idEntetecontrat;
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxplafondadherent/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajaxdelaicarencetypecontrat()
+{
+ codeTypeContrat=$("#codeTypeContrat").val();
+
+ donnees = 'codeTypeContrat='+codeTypeContrat;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdelaicarencetypecontrat/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#infodelaicarence").html(data);
+ },
+ complete: function() {
+ $("#delaiCarencePolice").val( $("#delaiCarencePolice_info").val());
+ }
+ });
+}
+
+function afficher_liste_medecins()
+{
+ donnees = "";
+ donnees_retour = "";
+
+
+ codeSpecialite = $("#codeSpecialite").val();
+ nom = $("#nom").val();
+ prenoms = $("#prenoms").val();
+ noOrdreMedecin = $("#noOrdreMedecin").val();
+
+ if(codeSpecialite<=" " && nom<=" " && prenoms<=" " && noOrdreMedecin<=" ")
+ {
+ v_msg="Veuillez saisir le filtre!";
+ v_msgEng="Please enter the filter!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeSpecialite").focus();
+ return;
+ }
+
+ donnees += 'codeSpecialite=' + codeSpecialite;
+ donnees += '&nom=' + nom;
+ donnees += '&prenoms=' + prenoms;
+ donnees += '&noOrdreMedecin=' + noOrdreMedecin;
+
+ $("#div_liste_medeins").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistemedecinsparametrage/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_liste_medeins").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function ctrlkeypress_liste_medecins(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ afficher_liste_medecins();
+ }
+}
+
+function imprimer_liste_medecins()
+{
+ donnees = "";
+ donnees_retour = "";
+
+
+ codeSpecialite = $("#codeSpecialite").val();
+ nom = $("#nom").val();
+ prenoms = $("#prenoms").val();
+ noOrdreMedecin = $("#noOrdreMedecin").val();
+
+ if(codeSpecialite<=" " && nom<=" " && prenoms<=" " && noOrdreMedecin<=" ")
+ {
+ v_msg="Veuillez saisir le filtre!";
+ v_msgEng="Please enter the filter!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeSpecialite").focus();
+ return;
+ }
+
+ donnees += 'codeSpecialite=' + codeSpecialite;
+ donnees += '&nom=' + nom;
+ donnees += '&prenoms=' + prenoms;
+ donnees += '&noOrdreMedecin=' + noOrdreMedecin;
+
+ $("#div_liste_medeins").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximprimerlistemedecins/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $("#div_liste_medeins").html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function exporter_liste_medecins()
+{
+ donnees = "";
+ donnees_retour = "";
+
+
+ codeSpecialite = $("#codeSpecialite").val();
+ nom = $("#nom").val();
+ prenoms = $("#prenoms").val();
+ noOrdreMedecin = $("#noOrdreMedecin").val();
+
+ if(codeSpecialite<=" " && nom<=" " && prenoms<=" " && noOrdreMedecin<=" ")
+ {
+ v_msg="Veuillez saisir le filtre!";
+ v_msgEng="Please enter the filter!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeSpecialite").focus();
+ return;
+ }
+
+ donnees += 'codeSpecialite=' + codeSpecialite;
+ donnees += '&nom=' + nom;
+ donnees += '&prenoms=' + prenoms;
+ donnees += '&noOrdreMedecin=' + noOrdreMedecin;
+
+ $("#div_liste_medeins").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximprimerlistemedecinsexport/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $("#div_liste_medeins").html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function afficher_medecin_id(idMedecin)
+{
+ window.location.assign($("#racineWeb" ).val()+"Fichemedecin/"+idMedecin+"/");
+}
+
+function modifier_medecin()
+{
+ idMedecin = $("#idMedecin" ).val();
+
+ if (idMedecin>"0")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Modifiermedecin/"+idMedecin+"/");
+ }
+}
+
+function creer_medecin()
+{
+ nom = $("#nom").val();
+ prenoms = $("#prenoms").val();
+ codeSpecialite = $("#codeSpecialite").val();
+ noOrdreMedecin = $("#noOrdreMedecin").val();
+ telephone = $("#telephone").val();
+ email = $("#email").val();
+ sexe = $("#sexe").val();
+
+ if(nom<=" ")
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#nom").focus();
+ return;
+ }
+
+ if(prenoms<=" ")
+ {
+ v_msg="Veuillez indiquer le prénoms!";
+ v_msgEng="Please give the first names";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#prenoms").focus();
+ return;
+ }
+
+ if(codeSpecialite<=" ")
+ {
+ v_msg="Veuillez sélectionner la spécialité!";
+ v_msgEng="Please select the specialty";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeSpecialite").focus();
+ return;
+ }
+
+ if(sexe<=" ")
+ {
+ v_msg="Veuillez indiquer le sexe!";
+ v_msgEng="Please indicate sex";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#sexe").focus();
+ return;
+ }
+
+ donnees = 'nom='+nom+'&prenoms='+prenoms;
+ donnees += '&telephone='+telephone+'&email='+email;
+ donnees += '&codeSpecialite='+codeSpecialite+'&noOrdreMedecin='+noOrdreMedecin+'&sexe='+sexe;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous ce nouveau médecin?";
+ v_msgEng="Confirm this new doctor?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmedecinparam/creermedecin/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $('#div_unicite_medecin').html(data);
+ },
+ complete: function()
+ {
+ unicitemedecin = $("#unicitemedecin").val();
+ if(unicitemedecin==1)
+ {
+ v_msg="Médecin créé avec succès!";
+ v_msgEng="Doctor created succssfully!";
+ alert_ebene(v_msg, v_msgEng);
+
+ retour_a_medecins();
+ }
+ else
+ {
+ v_msg="No Ordre " + noOrdreMedecin +" déjà utilisé!";
+ v_msgEng="Doctor Order No " + noOrdreMedecin +" already in use!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#noOrdreMedecin").focus();
+ }
+ }
+ });
+ }
+}
+
+function retour_a_medecins()
+{
+ window.location.assign($("#racineWeb" ).val()+"Medecins/");
+}
+
+function retour_medecin_id()
+{
+ idMedecin = $("#idMedecin").val();
+ afficher_medecin_id(idMedecin);
+}
+
+function enregistrer_modif_medecin()
+{
+ idMedecin = $("#idMedecin").val();
+ nom = $("#nom").val();
+ prenoms = $("#prenoms").val();
+ codeSpecialite = $("#codeSpecialite").val();
+ noOrdreMedecin = $("#noOrdreMedecin").val();
+ telephone = $("#telephone").val();
+ email = $("#email").val();
+ sexe = $("#sexe").val();
+
+ if(nom<=" ")
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#nom").focus();
+ return;
+ }
+
+ if(prenoms<=" ")
+ {
+ v_msg="Veuillez indiquer le prénoms!";
+ v_msgEng="Please give the first names";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#prenoms").focus();
+ return;
+ }
+
+ if(codeSpecialite<=" ")
+ {
+ v_msg="Veuillez sélectionner la spécialité!";
+ v_msgEng="Please select the specialty";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeSpecialite").focus();
+ return;
+ }
+
+ if(sexe<=" ")
+ {
+ v_msg="Veuillez indiquer le sexe!";
+ v_msgEng="Please indicate sex";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#sexe").focus();
+ return;
+ }
+
+ donnees = 'idMedecin='+idMedecin+'&nom='+nom;
+ donnees += '&prenoms='+prenoms;
+ donnees += '&telephone='+telephone+'&email='+email;
+ donnees += '&codeSpecialite='+codeSpecialite+'&noOrdreMedecin='+noOrdreMedecin+'&sexe='+sexe;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmedecinparam/enregistrermodifmedecin/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ },
+ complete: function() {
+ retour_medecin_id();
+ }
+ });
+ }
+}
+
+function reposmedical()
+{
+ actVisible=$("#actVisible").val();
+
+ if (actVisible!="1")
+ {
+ v_msg="Non autorisée!";
+ v_msgEng="Not allowed!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ window.location.assign($("#racineWeb" ).val()+"Reposmedical/");
+}
+
+function afficher_repos_medical()
+{
+ $("#div_notes").html('
' + 'Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxreposmedical/",
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_notes").html(donnees_retour);
+ }
+ });
+}
+
+function initier_repos_medical()
+{
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxreposmedical/nouveaureposmedical/",
+ success: function(data)
+ {
+ $("#div_note_new").html(data);
+ },
+ complete: function() {
+ $("#btn_pop_note_new").click();
+ }
+ });
+}
+
+function enregistrer_new_repos_medical()
+{
+ notesNew = $("#notesNew").val();
+ notesNew = notesNew.trim();
+
+ if (notesNew<=" ")
+ {
+ v_msg="Veuillez saisir la note!";
+ v_msgEng="Please enter the note!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#notesNew").focus();
+ return;
+ }
+
+ nbJour = $("#nbJour").val();
+
+ if(isNaN(nbJour))
+ {
+ v_msg="Veuillez revoir la duréee!";
+ v_msgEng="Please review the duration!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#nbJour").focus();
+ return;
+ }
+
+ if (nbJour<="0")
+ {
+ v_msg="Veuillez revoir la duréee!";
+ v_msgEng="Please review the duration!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#nbJour").focus();
+ return;
+ }
+
+ donnees = 'notesNew='+notesNew+"&nbJour="+nbJour;
+
+ v_msg="Confirmez-vous ce repos médical?";
+ v_msgEng="Do you confirm this medical rest?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxreposmedical/creerreposmedical/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $("#btn_pop_note_new_quit").click();
+ },
+ complete: function() {
+ afficher_repos_medical();
+ }
+ });
+ }
+}
+
+function charger_detail_stat_police_anomalies()
+{
+ $('#div_export_b').html("");
+ idPolice = $("#idPolice").val();
+ donnees = "idPolice="+idPolice;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportspanomalie/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+function imprimer_quittance_client(idQuittance)
+{
+ if (idQuittance>"0")
+ {
+ donnees = "idQuittance="+idQuittance;
+
+
+ var div_export = $('#div_export_quittance');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_export_quittance").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexporterunequittanceclient/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+ }
+ else
+ {
+ v_msg="Rien à imprimer!";
+ v_msgEng="Nothing to print!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+}
+
+function imprimer_livraison_bon_differe(idgenerartionbon)
+{
+ donnees = "idgenerartionbon="+idgenerartionbon;
+
+ $('#btn_accuse_reception').click();
+
+ var div_accuse_reception = $('#div_accuse_reception');
+ div_accuse_reception.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximprimerlivraisonbonsdiffere/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_accuse_reception.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function imprimer_livraison_bon_menu()
+{
+ idGenerationbon = $("#idGenerationbon").val();
+ imprimer_livraison_bon_differe(idGenerationbon);
+}
+
+function anteceentsmedicaux()
+{
+ estMedecin=$("#estMedecin").val();
+
+ if (estMedecin!="1")
+ {
+ v_msg="Non autorisé!";
+ v_msgEng="Not allowed!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ window.location.assign($("#racineWeb" ).val()+"Anteceentsmedicaux/");
+}
+
+function diagnosticsbeneficiaire()
+{
+ estMedecin=$("#estMedecin").val();
+
+ if (estMedecin!="1")
+ {
+ v_msg="Non autorisé!";
+ v_msgEng="Not allowed!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ window.location.assign($("#racineWeb" ).val()+"Diagnosticsconsbeneficiaire/");
+}
+
+function notesbeneficiaire()
+{
+ estMedecin=$("#estMedecin").val();
+
+ if (estMedecin!="1")
+ {
+ v_msg="Non autorisé!";
+ v_msgEng="Not allowed!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ window.location.assign($("#racineWeb" ).val()+"Notesbeneficiaire/");
+}
+
+function afficher_diagnostics_beneficiaire()
+{
+ $("#div_dianostics").html('
' + 'Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdiagnosticsbeneficiaire/",
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_dianostics").html(donnees_retour);
+ }
+ });
+}
+
+function afficher_notes_beneficiaire()
+{
+ $("#div_notes").html('
' + 'Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnotesbeneficiaire/",
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_notes").html(donnees_retour);
+ }
+ });
+}
+
+function etat_sin_paiementprestationcumul_graph()
+{
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ $('#div_export_a').html("");
+
+ donnees_retour = "";
+ donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
+
+ $('#div_export_a').html("");
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un état!";
+ v_msgEng="Please select a state!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"graph/";
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ // alert("error =>"+errorData);
+ },
+ success: function(data) {
+ donnees_retour = data;
+ // alert("success =>"+data);
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+// 27/11/2019
+
+function etat_prod_par_mois_eclate()
+{
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ $('#div_export_a').html("");
+
+ donnees_retour = "";
+ donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un état!";
+ v_msgEng="Please select a state!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function etat_prod_par_mois_eclate_export()
+{
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ $('#div_export_a').html("");
+
+ donnees_retour = "";
+ donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
+
+ $('#div_export_a').html("");
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un état!";
+ v_msgEng="Please select a state!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function effacer_caracteristiques_un_acte()
+{
+ $('#div_fiche_acte').html("");
+}
+
+function enregistrer_modif_caracteristiques_un_acte()
+{
+ idActe = $("#idActe").val();
+ codeActe = $("#codeActe").val();
+
+ libelle = $("#libelle").val();
+ libelleEng = $("#libelleEng").val();
+
+ // codeFamilleActe = $("#codeFamilleActe").val();
+ codeFamilleActe = $("#codeFamilleActeMaj").val();
+ codeGarantie = $("#codeGarantie").val();
+ codeTarifActe = $("#codeTarifActe").val();
+ codeTypePrestation = $("#codeTypePrestation").val();
+
+ ententePrealable = $("#ententePrealable").val();
+ exclu = $("#exclu").val();
+ actif = $("#actif").val();
+ alerte = $("#alerte").val();
+ delaiCarenceActe = $("#delaiCarenceActe").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez saisir le libellé en Français!";
+ v_msgEng="Please enter the name in French!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(libelleEng<=" ")
+ {
+ v_msg="Veuillez saisir le libellé en Anglais!";
+ v_msgEng="Please enter the name in English!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleEng").focus();
+ return;
+ }
+
+ if(codeFamilleActe<=" ")
+ {
+ v_msg="Veuillez sélectionner la famille!";
+ v_msgEng="Please select the family!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeFamilleActe").focus();
+ return;
+ }
+
+ if(codeGarantie<=" ")
+ {
+ v_msg="Veuillez sélectionner une garantie!";
+ v_msgEng="Please select a benefit!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGarantie").focus();
+ return;
+ }
+
+ if(codeTarifActe<=" ")
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ if(codeTypePrestation<=" ")
+ {
+ v_msg="Veuillez sélectionner un type!";
+ v_msgEng="Please select a type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypePrestation").focus();
+ return;
+ }
+
+ donnees = 'idActe='+idActe;
+ donnees += '&codeActe='+codeActe;
+
+ donnees += '&libelle='+libelle;
+ donnees += '&libelleEng='+libelleEng;
+ donnees += '&codeFamilleActe='+codeFamilleActe;
+ donnees += '&codeGarantie='+codeGarantie;
+ donnees += '&codeTarifActe='+codeTarifActe;
+ donnees += '&codeTypePrestation='+codeTypePrestation;
+
+ donnees += '&ententePrealable='+ententePrealable;
+ donnees += '&exclu='+exclu;
+ donnees += '&actif='+actif;
+ donnees += '&alerte='+alerte;
+ donnees += '&delaiCarenceActe='+delaiCarenceActe;
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxacracteristiquesacte/enregistrermodifcaracteristiquesacte/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ $('#div_fiche_acte').html("");
+ },
+ complete: function()
+ {
+ afficher_caracteristiques_acte();
+ }
+ });
+ }
+}
+
+function retour_tarifs_actes()
+{
+ window.location.assign($("#racineWeb" ).val()+"Tarifsactes/");
+}
+
+function retour_tarifs_optiques()
+{
+ window.location.assign($("#racineWeb" ).val()+"Tarifsoptiques/");
+}
+
+function creer_tarif_actes()
+{
+ libelle = $("#libelle").val();
+ libelleEng = $("#libelleEng").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez indiquer le nom en Français!";
+ v_msgEng="Please enter the name in French!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(libelleEng<=" ")
+ {
+ v_msg="Veuillez indiquer le nom en Anglais!";
+ v_msgEng="Please enter the name in English!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleEng").focus();
+ return;
+ }
+
+ donnees = 'libelle='+libelle+'&libelleEng='+libelleEng;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous ce nouveau tarif?";
+ v_msgEng="Do you confirm this new rate?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnouveautarifacte/creertarifactes/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ retour_tarifs_actes();
+ }
+ });
+ }
+}
+
+function modifier_tarif_actes(idTarif)
+{
+ window.location.assign($("#racineWeb" ).val()+"Modifiertarifacte/"+idTarif+"/");
+}
+
+function enregistrer_modif_tarif_actes()
+{
+ idTarif = $("#idTarif").val();
+ libelle = $("#libelle").val();
+ libelleEng = $("#libelleEng").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez indiquer le nom en Français!";
+ v_msgEng="Please enter the name in French!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(libelleEng<=" ")
+ {
+ v_msg="Veuillez indiquer le nom en Anglais!";
+ v_msgEng="Please enter the name in English!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleEng").focus();
+ return;
+ }
+
+ donnees = 'idTarif='+idTarif+'&libelle='+libelle+'&libelleEng='+libelleEng;
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnouveautarifacte/enregistrermodif/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ },
+ complete: function() {
+ lister_tarif_actes();
+ }
+ });
+ }
+}
+
+function lister_tarif_actes()
+{
+ window.location.assign($("#racineWeb" ).val()+"Listetarifacte/");
+}
+
+function importer_tarif_actes(idTarif)
+{
+ v_msg="En cours!";
+ v_msgEng="In progress!";
+ alert_ebene(v_msg, v_msgEng);
+
+ // return;
+
+ // window.location.assign($("#racineWeb" ).val()+"Importertarifacte/"+idTarif+"/");
+}
+
+function supprimer_tarif_actes(idTarif)
+{
+ v_msg="Confirmez-vous cette suppression?";
+ v_msgEng="Do you confirm this deletion?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnouveautarifacte/supprimer/",
+ type : 'post',
+ data: "idTarif="+idTarif,
+ success: function(data) {
+ },
+ complete: function() {
+ lister_tarif_actes();
+ }
+ });
+ }
+}
+
+function creer_tarif_optiques()
+{
+ libelle = $("#libelle").val();
+ libelleEng = $("#libelleEng").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez indiquer le nom en Français!";
+ v_msgEng="Please enter the name in French!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(libelleEng<=" ")
+ {
+ v_msg="Veuillez indiquer le nom en Anglais!";
+ v_msgEng="Please enter the name in English!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleEng").focus();
+ return;
+ }
+
+ donnees = 'libelle='+libelle+'&libelleEng='+libelleEng;
+
+ v_msg="Confirmez-vous ce nouveau tarif?";
+ v_msgEng="Do you confirm this new rate?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnouveautarifoptique/creertarifoptiques/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ retour_tarifs_optiques();
+ }
+ });
+ }
+}
+
+function modifier_tarif_optiques(idTarif)
+{
+ window.location.assign($("#racineWeb" ).val()+"Modifiertarifoptique/"+idTarif+"/");
+}
+
+function importer_tarif_optiques(idTarif)
+{
+ v_msg="En cours!";
+ v_msgEng="In progress!";
+ alert_ebene(v_msg, v_msgEng);
+
+ // return;
+
+ // window.location.assign($("#racineWeb" ).val()+"Importertarifoptique/"+idTarif+"/");
+}
+
+function supprimer_tarif_optiques(idTarif)
+{
+ v_msg="Confirmez-vous cette suppression?";
+ v_msgEng="Do you confirm this deletion?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnouveautarifoptique/supprimer/",
+ type : 'post',
+ data: "idTarif="+idTarif,
+ success: function(data) {
+ },
+ complete: function() {
+ lister_tarif_optiques();
+ }
+ });
+ }
+}
+
+function lister_tarif_optiques()
+{
+ window.location.assign($("#racineWeb" ).val()+"Listetarifoptique/");
+}
+
+function enregistrer_modif_tarif_optiques()
+{
+ idTarif = $("#idTarif").val();
+ libelle = $("#libelle").val();
+ libelleEng = $("#libelleEng").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez indiquer le nom en Français!";
+ v_msgEng="Please enter the name in French!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(libelleEng<=" ")
+ {
+ v_msg="Veuillez indiquer le nom en Anglais!";
+ v_msgEng="Please enter the name in English!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleEng").focus();
+ return;
+ }
+
+ donnees = 'idTarif='+idTarif+'&libelle='+libelle+'&libelleEng='+libelleEng;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnouveautarifoptique/enregistrermodif/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function() {
+ lister_tarif_optiques();
+ }
+ });
+ }
+}
+
+function modifier_familles_actes(idFamilleacte)
+{
+ window.location.assign($("#racineWeb" ).val()+"Modifierfamilleacte/"+idFamilleacte+"/");
+}
+
+function supprimer_familles_actes(idFamilleacte)
+{
+ v_msg="Confirmez-vous cette suppression?";
+ v_msgEng="Do you confirm this deletion?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistefamilleactetarif/supprimer/",
+ type : 'post',
+ data: "idFamilleacte="+idFamilleacte,
+ success: function(data) {
+ },
+ complete: function() {
+ afficher_famille_actes_tarif()
+ }
+ });
+ }
+}
+
+function afficher_famille_actes_tarif()
+{
+ codeTarifActe=$("#codeTarifActe").val();
+
+ if (codeTarifActe<=" ")
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ donnees = 'codeTarifActe='+codeTarifActe;
+
+ var div_attente = $('#div_liste_famille_acte');
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistefamilleactetarif/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function lister_famille_actes()
+{
+ window.location.assign($("#racineWeb" ).val()+"Listefamilleacte/");
+}
+
+function creer_famille_actes()
+{
+ libelle = $("#libelle").val();
+ libelleEng = $("#libelleEng").val();
+
+ codeGarantie = $("#codeGarantie").val();
+ codeTypePrestation = $("#codeTypePrestation").val();
+
+ codeTarifActe = $("#codeTarifActe").val();
+ hospitalisation = $("#hospitalisation").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez indiquer le nom en Français!";
+ v_msgEng="Please enter the name in French!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(libelleEng<=" ")
+ {
+ v_msg="Veuillez indiquer le nom en Anglais!";
+ v_msgEng="Please enter the name in English!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleEng").focus();
+ return;
+ }
+
+ donnees = 'libelle='+libelle+'&libelleEng='+libelleEng;
+ donnees += '&codeGarantie='+codeGarantie+'&codeTypePrestation='+codeTypePrestation;
+ donnees += '&codeTarifActe='+codeTarifActe+'&hospitalisation='+hospitalisation;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous ce nouvelle famille?";
+ v_msgEng="Do you confirm this new family?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistefamilleactetarif/creerfamillectes/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ lister_famille_actes();
+ }
+ });
+ }
+}
+
+function afficher_factures_feuille()
+{
+ $("#div_detail_factures").html('
' + 'Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxfacturesfeuille/",
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_factures").html(donnees_retour);
+ }
+ });
+}
+
+function consulter_un_dossier()
+{
+ window.location.assign($("#racineWeb" ).val()+"Dossiercons/");
+}
+
+function afficher_factures_consultation(numeroBonConsultation)
+{
+ if (numeroBonConsultation<="0")
+ {
+ v_msg="Revoir le numéro!";
+ v_msgEng="Review the number!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#numeroBonConsultation").focus();
+
+ return;
+ }
+
+ donnees = "numeroBonConsultation="+numeroBonConsultation;
+
+ $("#div_detail_factures").html('
' + 'Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdossiercons/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_factures").html(donnees_retour);
+ }
+ });
+}
+
+function ctrlkeypressconsultation(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ $("#numeroBonConsultation").blur();
+ }
+}
+
+function enregistrer_modif_famille_actes()
+{
+ idFamilleacte = $("#idFamilleacte").val();
+ libelle = $("#libelle").val();
+ libelleEng = $("#libelleEng").val();
+
+ codeGarantie = $("#codeGarantie").val();
+ codeTypePrestation = $("#codeTypePrestation").val();
+
+ codeTarifActe = $("#codeTarifActe").val();
+ hospitalisation = $("#hospitalisation").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez indiquer le nom en Français!";
+ v_msgEng="Please enter the name in French!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(libelleEng<=" ")
+ {
+ v_msg="Veuillez indiquer le nom en Anglais!";
+ v_msgEng="Please enter the name in English!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleEng").focus();
+ return;
+ }
+
+ donnees = 'idFamilleacte='+idFamilleacte+'&libelle='+libelle+'&libelleEng='+libelleEng;
+ donnees += '&codeGarantie='+codeGarantie+'&codeTypePrestation='+codeTypePrestation;
+ donnees += '&codeTarifActe='+codeTarifActe+'&hospitalisation='+hospitalisation;
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistefamilleactetarif/enregistrermodiffamilleactes/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function() {
+ lister_famille_actes();
+ }
+ });
+ }
+}
+
+function exporter_tarif_medicament()
+{
+ codeTarifMedicament=$("#codeTarifMedicament").val();
+
+ if(codeTarifMedicament<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ donnees = "codeTarifMedicament="+codeTarifMedicament;
+
+ // alert(donnees);
+ // return;
+
+ var div_export = $('#div_export_tarif');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_exporter_tarif").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexportertarifmedicament/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function rechercher_actes_famille_param()
+{
+ var div_detail = $('#div_detail_actes');
+
+ codeTarifActe=$("#codeTarifActe").val();
+ codeFamilleActe=$("#codeFamilleActe").val();
+ libelleActe=$("#libelleActe").val();
+
+ if(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ if(codeFamilleActe<=' ')
+ {
+ v_msg="Veuillez sélectionne une famille!";
+ v_msgEng="Please select a family!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeFamilleActe").focus();
+ return;
+ }
+
+ donnees = 'codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe+'&libelleActe='+libelleActe;
+
+ div_detail.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxactefamilleparam/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_detail.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function ajaxfiltrefamilleactetarif()
+{
+ donnees = "codeTarifActe="+$("#codeTarifActe").val();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxfiltrefamilletarif/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $('#div_test_gabarit').html(data);
+ $("#listefamille").html(data);
+ }
+ });
+}
+
+function rechercher_actes_famille_param_tous()
+{
+ var div_detail = $('#div_detail_actes');
+
+ codeTarifActe=$("#codeTarifActe").val();
+ codeFamilleActe=$("#codeFamilleActe").val();
+ libelleActe=$("#libelleActe").val();
+
+ if(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ if(libelleActe<=' ')
+ {
+ v_msg="Veuillez saisir une désignation!";
+ v_msgEng="Please enter a designation!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleActe").focus();
+ return;
+ }
+
+ donnees = 'codeTarifActe='+codeTarifActe+'&libelleActe='+libelleActe;
+
+ div_detail.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxactefamilleparam/tous/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_detail.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function enregistrer_nouvel_acte()
+{
+ libelle = $("#libelle").val();
+ libelleEng = $("#libelleEng").val();
+ codeFamilleActe = $("#codeFamilleActe").val();
+ codeGarantie = $("#codeGarantie").val();
+ codeTarifActe = $("#codeTarifActe").val();
+ codeTypePrestation = $("#codeTypePrestation").val();
+
+ ententePrealable = $("#ententePrealable").val();
+ exclu = $("#exclu").val();
+ actif = $("#actif").val();
+ alerte = $("#alerte").val();
+ delaiCarenceActe = $("#delaiCarenceActe").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez saisir le libellé en Français!";
+ v_msgEng="Please enter the name in French!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(libelleEng<=" ")
+ {
+ v_msg="Veuillez saisir le libellé en Anglais!";
+ v_msgEng="Please enter the name in English!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleEng").focus();
+ return;
+ }
+
+ if(codeFamilleActe<=" ")
+ {
+ v_msg="Veuillez sélectionner la famille!";
+ v_msgEng="Please select the family!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeFamilleActe").focus();
+ return;
+ }
+
+ if(codeGarantie<=" ")
+ {
+ v_msg="Veuillez sélectionner une garantie!";
+ v_msgEng="Please select a benefit!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGarantie").focus();
+ return;
+ }
+
+ if(codeTarifActe<=" ")
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ if(codeTypePrestation<=" ")
+ {
+ v_msg="Veuillez sélectionner un type!";
+ v_msgEng="Please select a type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypePrestation").focus();
+ return;
+ }
+
+ donnees = 'libelle='+libelle;
+ donnees += '&libelleEng='+libelleEng;
+ donnees += '&codeFamilleActe='+codeFamilleActe;
+ donnees += '&codeGarantie='+codeGarantie;
+ donnees += '&codeTarifActe='+codeTarifActe;
+ donnees += '&codeTypePrestation='+codeTypePrestation;
+
+ donnees += '&ententePrealable='+ententePrealable;
+ donnees += '&exclu='+exclu;
+ donnees += '&actif='+actif;
+ donnees += '&alerte='+alerte;
+ donnees += '&delaiCarenceActe='+delaiCarenceActe;
+
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnouvelacte/enregistrernouvelacte/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ retour_liste_actes();
+ }
+ });
+ }
+}
+
+function retour_liste_actes()
+{
+ window.location.assign($("#racineWeb" ).val()+"Listeactes/");
+}
+
+
+function modifier_un_acte(idActe)
+{
+ window.location.assign($("#racineWeb" ).val()+"Modifieracte/"+idActe+"/");
+}
+
+function enregistrer_modif_un_acte()
+{
+ idActe = $("#idActe").val();
+ codeActe = $("#codeActe").val();
+
+ libelle = $("#libelle").val();
+ libelleEng = $("#libelleEng").val();
+ codeFamilleActe = $("#codeFamilleActe").val();
+ codeGarantie = $("#codeGarantie").val();
+ codeTarifActe = $("#codeTarifActe").val();
+ codeTypePrestation = $("#codeTypePrestation").val();
+
+ ententePrealable = $("#ententePrealable").val();
+ exclu = $("#exclu").val();
+ actif = $("#actif").val();
+ alerte = $("#alerte").val();
+ delaiCarenceActe = $("#delaiCarenceActe").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez saisir le libellé en Français!";
+ v_msgEng="Please enter the name in French!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(libelleEng<=" ")
+ {
+ v_msg="Veuillez saisir le libellé en Anglais!";
+ v_msgEng="Please enter the name in English!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleEng").focus();
+ return;
+ }
+
+ if(codeFamilleActe<=" ")
+ {
+ v_msg="Veuillez sélectionner la famille!";
+ v_msgEng="Please select the family!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeFamilleActe").focus();
+ return;
+ }
+
+ if(codeGarantie<=" ")
+ {
+ v_msg="Veuillez sélectionner une garantie!";
+ v_msgEng="Please select a benefit!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGarantie").focus();
+ return;
+ }
+
+ if(codeTarifActe<=" ")
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ if(codeTypePrestation<=" ")
+ {
+ v_msg="Veuillez sélectionner un type!";
+ v_msgEng="Please select a type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypePrestation").focus();
+ return;
+ }
+
+ donnees = 'idActe='+idActe;
+ donnees += '&codeActe='+codeActe;
+
+ donnees += '&libelle='+libelle;
+ donnees += '&libelleEng='+libelleEng;
+ donnees += '&codeFamilleActe='+codeFamilleActe;
+ donnees += '&codeGarantie='+codeGarantie;
+ donnees += '&codeTarifActe='+codeTarifActe;
+ donnees += '&codeTypePrestation='+codeTypePrestation;
+
+ donnees += '&ententePrealable='+ententePrealable;
+ donnees += '&exclu='+exclu;
+ donnees += '&actif='+actif;
+ donnees += '&alerte='+alerte;
+ donnees += '&delaiCarenceActe='+delaiCarenceActe;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnouvelacte/enregistrermodifacte/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ retour_liste_actes();
+ }
+ });
+ }
+}
+
+function ctrlkeypress_rechercher_actes_famille_param(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ rechercher_actes_famille_param();
+ }
+}
+
+function ajax_composante_tarif()
+{
+ adminSin=$("#adminSin").val();
+
+ if (adminSin!="1")
+ {
+ v_msg="Non autorisée!";
+ v_msgEng="Not allowed!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ codeTarifActe=$("#codeTarifActe").val();
+ codeFamilleActe=$("#codeFamilleActe").val();
+
+ if(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ if(codeFamilleActe<=' ')
+ {
+ v_msg="Veuillez saisir une famille!";
+ v_msgEng="Please select a family!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeFamilleActe").focus();
+ return;
+ }
+
+ donnees = 'codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe;
+
+ var div_attente = $('#div_compsante_tarif');
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarif/affichercomposantetarif/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajouter_tous_actes_fam_au_tarif()
+{
+ codeTarifActe=$("#codeTarifActe").val();
+ codeFamilleActe=$("#codeFamilleActe").val();
+
+ if(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ if(codeFamilleActe<=' ')
+ {
+ v_msg="Veuillez saisir une famille!";
+ v_msgEng="Please select a family!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeFamilleActe").focus();
+ return;
+ }
+
+ donnees = 'codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe;
+
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm this operation?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarif/ajoutertousactsautarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif();
+ }
+ });
+ }
+}
+
+function ajouter_un_acte_au_tarif(idActe)
+{
+ codeTarifActe=$("#codeTarifActe").val();
+ codeFamilleActe=$("#codeFamilleActe").val();
+
+ if(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ if(codeFamilleActe<=' ')
+ {
+ v_msg="Veuillez saisir une famille!";
+ v_msgEng="Please select a family!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeFamilleActe").focus();
+ return;
+ }
+
+ donnees = 'idActe='+idActe+'&codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarif/ajouterunacteautarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif();
+ }
+ });
+}
+
+function retirer_un_acte_du_tarif(idDetailtarifacte)
+{
+ donnees = 'idDetailtarifacte='+idDetailtarifacte;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarif/retirerunactedutarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif();
+ }
+ });
+}
+
+function retirer_tous_actes_fam_du_tarif()
+{
+ codeTarifActe=$("#codeTarifActe").val();
+ codeFamilleActe=$("#codeFamilleActe").val();
+
+ if(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ if(codeFamilleActe<=' ')
+ {
+ v_msg="Veuillez saisir une famille!";
+ v_msgEng="Please select a family!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeFamilleActe").focus();
+ return;
+ }
+
+ donnees = 'codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe;
+
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm this operation?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarif/retirertousactsautarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif();
+ }
+ });
+ }
+}
+
+function maj_composante_tarif_acte(idActe, prix)
+{
+ donnees = 'idActe='+idActe+"&prix="+prix;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarif/majprix/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function ajaxfiltrefamilleactecomposantetarif()
+{
+ $("#div_compsante_tarif").html("");
+
+ donnees = "codeTarifActe="+$("#codeTarifActe").val();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxfiltrefamillecomposantetarif/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#listefamille").html(data);
+ }
+ });
+}
+
+function test_online()
+{
+ if(navigator.onLine)
+ {
+ $("#test_connexion").css('background-color', 'green');
+ v_msg="Connexion OK!";
+ v_msgEng="Connection OK";
+ alert_ebene(v_msg, v_msgEng);
+
+ }
+ else
+ {
+ $("#test_connexion").css('background-color', 'red');
+ v_msg="Problème de Connexion!";
+ v_msgEng="Connection Problem!";
+ alert_ebene(v_msg, v_msgEng);
+ }
+ return;
+}
+
+function raffraichier_messagerie()
+{
+ deconnexion='0';
+ if(navigator.onLine)
+ {
+ $("#test_connexion").css('background-color', 'green');
+ c_html = "";
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmessagerie/",
+ success: function(data) {
+ c_html = data;
+ },
+ error: function(errorData) {
+ },
+ complete: function() {
+ $("#nbMessagesNonLus").html(c_html);
+ deconnexion=$("#deconnexion").val();
+ // alert("deconnexion => "+deconnexion);
+ if(deconnexion=='1')
+ {
+ window.location.assign($("#racineWeb" ).val()+"Connexion/deconnecter/");
+ }
+ }
+ });
+ }
+ else
+ {
+ $("#test_connexion").css('background-color', 'red');
+ return;
+ }
+}
+
+function ajax_composante_tarif_cons()
+{
+ codeTarifActe=$("#codeTarifActe").val();
+ codeFamilleActe=$("#codeFamilleActe").val();
+
+ if(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ if(codeFamilleActe<=' ')
+ {
+ v_msg="Veuillez saisir une famille!";
+ v_msgEng="Please select a family!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeFamilleActe").focus();
+ return;
+ }
+
+ donnees = 'codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe;
+
+ var div_attente = $('#div_compsante_tarif');
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarif/affichercomposantetarifcons/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function archiver_tarif_actes(idTarif)
+{
+ // alert("archiver_tarif_actes");
+ // return;
+
+ // v_msg="Confirmez-vous cette suppression?";
+ // v_msgEng="Do you confirm this deletion?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnouveautarifacte/supprimer/",
+ type : 'post',
+ data: "idTarif="+idTarif,
+ success: function(data) {
+ },
+ complete: function() {
+ lister_tarif_actes();
+ }
+ });
+ }
+}
+
+function exporter_composante_tarif_actes()
+{
+ codeTarifActe=$("#codeTarifActe").val();
+
+ if(codeTarifActe<=' ' || codeTarifActe=='ST')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ donnees = "codeTarifActe="+codeTarifActe;
+
+ var div_export = $('#div_export_tarif');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_exporter_tarif").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexportertarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function ajax_init_destinataires_sms()
+{
+ codeTypeDestinataire=$("#codeTypeDestinataire").val();
+ if(codeTypeDestinataire<=' ')
+ {
+ v_msg="Veuillez sélectionner un type de destinataire!";
+ v_msgEng="Please select a recipient type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypeDestinataire").focus();
+ return;
+ }
+
+ donnees = 'codeTypeDestinataire='+codeTypeDestinataire;
+
+ if(codeTypeDestinataire=='LB') // Libre
+ {
+ ajax_init_destinataires_sms_libre();
+ return;
+ }
+ else
+ if(codeTypeDestinataire=='AD') // adhérents
+ {
+ ajax_init_destinataires_sms_adherent();
+ return;
+ }
+ else
+ {
+ $("#div_destinataire_final").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/init/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ $("#div_destinataire").html(data);
+ },
+ complete: function()
+ {
+ }
+ });
+ }
+}
+
+function ajax_init_destinataires_sms_libre()
+{
+ // $("#div_adherent_destinataire").html('');
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/libre/",
+ type : 'post',
+ success: function(data)
+ {
+ // $("#div_destinataire_final").html(data);
+ $("#div_destinataire").html(data);
+ },
+ complete: function()
+ {
+ $("#noDestination").focus();
+ }
+ });
+}
+
+function ajax_init_destinataires_sms_adherent()
+{
+ $("#div_destinataire_final").html('');
+ // $("#div_adherent_destinataire").html('');
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/adherent/",
+ success: function(data)
+ {
+ // $("#div_adherent_destinataire").html(data);
+ $("#div_destinataire").html(data);
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function ajax_afficher_destinataires_sms()
+{
+ codeTypeDestinataire=$("#codeTypeDestinataire").val();
+ if(codeTypeDestinataire<=' ')
+ {
+ v_msg="Veuillez sélectionner un type de destinataire!";
+ v_msgEng="Please select a recipient type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypeDestinataire").focus();
+ return;
+ }
+
+ donnees = 'codeTypeDestinataire='+codeTypeDestinataire;
+
+
+ // $("#div_adherent_destinataire").html('');
+
+ $("#div_destinataire_final").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ $("#div_destinataire_final").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function mettre_sms_commun_attente()
+{
+ nbDestinataires = $("#nbDestinataires").val();
+ if (nbDestinataires=="0")
+ {
+ v_msg="Aucun destinataire!";
+ v_msgEng="No recipient!";
+ alert_ebene(v_msg, v_msgEng);
+ return;
+ }
+
+ textMessage = $("#textMessageCommun").val();
+ textMessage = textMessage.trim();
+
+ if (textMessage<=" ")
+ {
+ v_msg="Veuillez saisir le message!";
+ v_msgEng="Please enter the message!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#textMessageCommun").focus();
+ return;
+ }
+
+ donnees = "textMessage="+textMessage;
+
+ $("#div_destinataire_final").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/mettresmscommeunattente/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ // div_wait.html(data);
+ },
+ complete: function() {
+ v_msg="Messages mis dans la queue des envois!";
+ v_msgEng="Messages in the queue!";
+ alert_ebene(v_msg, v_msgEng);
+ ajax_afficher_destinataires_sms();
+ }
+ });
+}
+
+function annuler_envoi_sms()
+{
+ v_msg="Confirmez-vous cette annulation?";
+ v_msgEng="Do you confirm this cancellation?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ gerer_messagerie();
+ }
+}
+
+function ajouter_tous_destinataires_sms()
+{
+ codeTypeDestinataire=$("#codeTypeDestinataire").val();
+ if(codeTypeDestinataire<=' ')
+ {
+ v_msg="Veuillez sélectionner un type de destinataire!";
+ v_msgEng="Please select a recipient type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypeDestinataire").focus();
+ return;
+ }
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/ajouterdestinatairesmstous/",
+ // type : 'post',
+ // data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function() {
+ ajax_afficher_destinataires_sms();
+ }
+ });
+}
+
+function retirer_tous_destinataires_sms()
+{
+ codeTypeDestinataire=$("#codeTypeDestinataire").val();
+ if(codeTypeDestinataire<=' ')
+ {
+ v_msg="Veuillez sélectionner un type de destinataire!";
+ v_msgEng="Please select a recipient type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypeDestinataire").focus();
+ return;
+ }
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/retirerdestinatairesmstous/",
+ // type : 'post',
+ // data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function() {
+ ajax_afficher_destinataires_sms();
+ }
+ });
+}
+
+function ajouter_un_destinataire_sms(idDestinataire)
+{
+ donnees = 'idDestinataire='+idDestinataire;
+
+ $("#div_destinataire_final").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/ajouterundestinatairesms/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function() {
+ ajax_afficher_destinataires_sms();
+ }
+ });
+}
+
+function retirer_un_destinataire_sms(idDestinataire)
+{
+ donnees = 'idDestinataire='+idDestinataire;
+
+ $("#div_destinataire_final").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/retirerundestinatairesms/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function() {
+ ajax_afficher_destinataires_sms();
+ }
+ });
+}
+
+function mettre_sms_commun_attente_libre()
+{
+ noDestination = $("#noDestination").val();
+ if(noDestination.length<5)
+ {
+ v_msg="Aucun destinataire!";
+ v_msgEng="No recipient!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#noDestination").focus();
+ return;
+ }
+
+ textMessage = $("#textMessageCommun").val();
+ textMessage = textMessage.trim();
+
+ if (textMessage<=" ")
+ {
+ v_msg="Veuillez saisir le message!";
+ v_msgEng="Please enter the message!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#textMessageCommun").focus();
+ return;
+ }
+
+ donnees = "noDestination="+noDestination+"&textMessage="+textMessage;
+
+ // alert(donnees);
+ // return;
+
+ $("#div_destinataire_final").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/mettresmscommeunattentelibre/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ // div_wait.html(data);
+ },
+ complete: function() {
+ v_msg="Messages mis dans la queue des envois!";
+ v_msgEng="Messages in the queue!";
+ alert_ebene(v_msg, v_msgEng);
+
+ ajax_init_destinataires_sms_libre();
+ }
+ });
+}
+
+function consulter_envois_sms()
+{
+ donnees = "";
+ donnees_retour = "";
+
+ date1 = $("#date1").val();
+ date2 = $("#date2").val();
+
+ donnees += 'date1=' + date1;
+ donnees += '&date2=' + date2;
+
+ $("#div_sms").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/consulter/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_sms").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function ajax_init_destinataires_sms_adherent_suite()
+{
+ codeTypeDestinataireAdherent=$("#codeTypeDestinataireAdherent").val();
+ if(codeTypeDestinataireAdherent<=' ')
+ {
+ v_msg="Veuillez sélectionner un type de recherche!";
+ v_msgEng="Please select a search type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypeDestinataireAdherent").focus();
+ return;
+ }
+
+ donnees = 'codeTypeDestinataireAdherent='+codeTypeDestinataireAdherent;
+
+ $("#div_destinataire_adherent_final").html('');
+ $("#div_destinataire_adherent_client_liste").html('');
+ $("#div_destinataire_adherent_client").html('');
+
+ if(codeTypeDestinataireAdherent=='CL') // Client
+ {
+ ajax_init_destinataires_sms_adherent_suite_client();
+ return;
+ }
+ else
+ if(codeTypeDestinataireAdherent=='CLOC') // Client et Localité
+ {
+ ajax_init_destinataires_sms_adherent_suite_client_localite();
+ return;
+ }
+ else
+ if(codeTypeDestinataireAdherent=='LOC') // Localité
+ {
+ ajax_init_destinataires_sms_adherent_suite_localite();
+ return;
+ }
+}
+
+function sms_recherche_adherent_client()
+{
+ nomClientAdherent=$("#nomClientAdherent").val();
+ if(nomClientAdherent<=' ')
+ {
+ v_msg="Veuillez entrer un nom!";
+ v_msgEng="Please enter a name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#nomClientAdherent").focus();
+ return;
+ }
+
+ donnees = 'nomClientAdherent='+nomClientAdherent;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/adherentclienliste/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ $('#div_destinataire_adherent_client_liste').html(data);
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function ajax_init_destinataires_sms_adherent_suite_client()
+{
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/adherentclient/",
+ success: function(data)
+ {
+ $("#div_destinataire_adherent_client").html(data);
+ },
+ complete: function()
+ {
+ $("#nomClientAdherent").focus();
+ }
+ });
+}
+
+function ajax_afficher_destinataires_sms_adherent()
+{
+ $("#div_destinataire_adherent_final").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ $("#div_destinataire_final").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajax_init_destinataires_sms_adherent_client()
+{
+ numeroClientAdherent=$("#numeroClientAdherent").val();
+ if(numeroClientAdherent<=' ')
+ {
+ v_msg="Veuillez sélectionner un client!";
+ v_msgEng="Please select a customer type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#numeroClientAdherent").focus();
+ return;
+ }
+
+ donnees = 'numeroClientAdherent='+numeroClientAdherent;
+
+ $("#div_destinataire_adherent_final").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/initenvoismsadherentclient/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ ajax_afficher_destinataires_sms_adherent();
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function ajax_init_destinataires_sms_adherent_suite_localite()
+{
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/adherentlocalite/",
+ success: function(data)
+ {
+ $("#div_destinataire_adherent_client").html(data);
+ },
+ complete: function()
+ {
+ $("#codeVille").focus();
+ }
+ });
+}
+
+function ajax_init_destinataires_sms_adherent_localite()
+{
+ codePays = $("#codePays").val();
+ codeVille = $("#codeVille").val();
+ codeLocalite = $("#codeLocalite").val();
+
+ donnees = 'codePays=' + codePays;
+ donnees += '&codeVille=' + codeVille;
+ donnees += '&codeLocalite=' + codeLocalite;
+
+ // alert(donnees);
+ // return;
+
+ $("#div_destinataire_adherent_final").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/initenvoismsadherentlocalite/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ ajax_afficher_destinataires_sms_adherent();
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function ajax_init_destinataires_sms_adherent_suite_client_localite()
+{
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/adherentclientlocalite/",
+ success: function(data)
+ {
+ $("#div_destinataire_adherent_client").html(data);
+ },
+ complete: function()
+ {
+ $("#nomClientAdherent").focus();
+ }
+ });
+}
+
+function sms_recherche_adherent_client_localite()
+{
+ nomClientAdherent=$("#nomClientAdherent").val();
+ if(nomClientAdherent<=' ')
+ {
+ v_msg="Veuillez entrer un nom!";
+ v_msgEng="Please enter a name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#nomClientAdherent").focus();
+ return;
+ }
+
+ donnees = 'nomClientAdherent='+nomClientAdherent;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/adherentclientlocaliteliste/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ $('#div_destinataire_adherent_client_liste').html(data);
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function ajax_init_destinataires_sms_adherent_client_localite()
+{
+ numeroClientAdherent=$("#numeroClientAdherent").val();
+ if(numeroClientAdherent<=' ')
+ {
+ v_msg="Veuillez sélectionner un client!";
+ v_msgEng="Please select a customer type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#numeroClientAdherent").focus();
+ return;
+ }
+
+ donnees = 'numeroClientAdherent='+numeroClientAdherent;
+
+ codePays = $("#codePays").val();
+ codeVille = $("#codeVille").val();
+ codeLocalite = $("#codeLocalite").val();
+
+ donnees += '&codePays=' + codePays;
+ donnees += '&codeVille=' + codeVille;
+ donnees += '&codeLocalite=' + codeLocalite;
+
+ // alert(donnees);
+ // return;
+
+ $("#div_destinataire_adherent_final").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdestinatairesms/initenvoismsadherentclientlocalite/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ ajax_afficher_destinataires_sms_adherent();
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function re_init_envoi_sms()
+{
+ window.location.assign($("#racineWeb" ).val()+"Envoisms/");
+}
+
+function afficher_adherents_localite()
+{
+ donnees_retour = "";
+ donnees = "";
+
+ codeLocalite = $("#codeLocalite").val();
+
+ if(codeLocalite<=' ')
+ {
+ v_msg="Veuillez revoir la sélection!";
+ v_msgEng="Please review the selection!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeVille").focus();
+ return;
+ }
+
+ donnees = 'codeLocalite=' + codeLocalite;
+
+ $("#div_adherent").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlocaliseradherent/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_adherent").html(donnees_retour);
+ }
+ });
+}
+
+function ajaxListerLocaliteAdherent()
+{
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlocalite/filtreadherentlocalite/",
+ type : 'post',
+ data: "codePays="+$("#codePays").val()+"&codeVille="+$("#codeVille").val(),
+ success: function(data) {
+ $("#listelocalite").html(data);
+ }
+ });
+}
+
+function ajouter_tous_adherents_localte()
+{
+ codeLocalite=$("#codeLocalite").val();
+ if(codeLocalite<=' ')
+ {
+ v_msg="Veuillez sélectionner une localité!";
+ v_msgEng="Please select a location!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeLocalite").focus();
+ return;
+ }
+
+ donnees = 'codeLocalite=' + codeLocalite;
+
+ // alert(donnees);
+ // return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlocaliseradherent/ajouteradherentlocalitetous/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function() {
+ afficher_adherents_localite();
+ }
+ });
+}
+
+function ajouter_un_adherent_localte(idAherent)
+{
+ donnees = 'codeLocalite=' + codeLocalite;
+ donnees += '&idAherent='+idAherent;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlocaliseradherent/ajouterunadherentlocalite/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function() {
+ afficher_adherents_localite();
+ }
+ });
+}
+
+function exporter_adherents_localite()
+{
+ var div_export = $('#div_exporter');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_exporter").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexporterlocaliseradherent/",
+ // type: 'POST',
+ // data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+
+function ajax_init_composante_tarif_medicamant_cons()
+{
+ $('#div_compsante_tarif').html("");
+ $("#libelleActe").focus();
+}
+
+function ajax_composante_tarif_medicaments_cons()
+{
+ codeTarifMedicament=$("#codeTarifMedicament").val();
+ libelleMedicament=$("#libelleMedicament").val();
+
+ if(codeTarifMedicament<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifMedicament").focus();
+ return;
+ }
+
+ if(libelleMedicament<=' ')
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleMedicament").focus();
+ return;
+ }
+
+ donnees = 'codeTarifMedicament='+codeTarifMedicament+'&libelleMedicament='+libelleMedicament;
+
+ var div_attente = $('#div_compsante_tarif');
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/affichercomposantetarifcons/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function rechercher_medicaments_param()
+{
+ libelleMedicament=$("#libelleMedicament").val();
+
+ if(libelleMedicament<=' ')
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleMedicament").focus();
+ return;
+ }
+
+ donnees = 'libelleMedicament='+libelleMedicament;
+
+ // alert(donnees);
+ // return;
+
+ var div_attente = $('#div_detail_medicaments');
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/listemedicaments/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ctrlkeypress_composante_tarif_medicaments_cons(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ ajax_composante_tarif_medicaments_cons();
+ }
+}
+
+function ctrlkeypress_rechercher_medicaments_param(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ rechercher_medicaments_param();
+ }
+}
+
+function modifier_un_medicament(idMedicament)
+{
+ window.location.assign($("#racineWeb" ).val()+"Modifiermedicament/"+idMedicament+"/");
+}
+
+function retour_liste_medicaments()
+{
+ window.location.assign($("#racineWeb" ).val()+"Listemedicaments/");
+}
+
+function enregistrer_modif_un_medicament()
+{
+ idMedicament = $("#idMedicament").val();
+ codeMedicament = $("#codeMedicament").val();
+
+ libelle = $("#libelle").val();
+ unite = $("#unite").val();
+
+ ententePrealable = $("#ententePrealable").val();
+ exclu = $("#exclu").val();
+ actif = $("#actif").val();
+ instructions = $("#instructions").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez saisir la désignation!";
+ v_msgEng="Please enter the designation!!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(unite<=" ")
+ {
+ v_msg="Veuillez saisir l\'unité!";
+ v_msgEng="Please enter the unit!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#unite").focus();
+ return;
+ }
+
+ donnees = 'idMedicament='+idMedicament;
+ donnees += '&codeMedicament='+codeMedicament;
+
+ donnees += '&libelle='+libelle;
+ donnees += '&unite='+unite;
+
+ donnees += '&ententePrealable='+ententePrealable;
+ donnees += '&exclu='+exclu;
+ donnees += '&actif='+actif;
+ donnees += '&instructions='+instructions;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/enregistrermodifmedicament/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ retour_liste_medicaments();
+ }
+ });
+ }
+}
+
+function exporter_liste_actes()
+{
+ codeTarifActe=$("#codeTarifActe").val();
+
+ if(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ donnees = "codeTarifActe="+codeTarifActe;
+
+ // alert(donnees);
+ // return;
+
+ var div_export = $('#div_export_acte');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_exporter").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexportertarif/listeacte/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function exporter_liste_medicaments()
+{
+ var div_export = $('#div_export_medicament');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_exporter").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexportertarifmedicament/listemedicament/",
+ // type: 'POST',
+ // data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function enregistrer_nouvel_medicament()
+{
+ libelle = $("#libelle").val();
+ unite = $("#unite").val();
+
+ ententePrealable = $("#ententePrealable").val();
+ exclu = $("#exclu").val();
+ actif = $("#actif").val();
+ instructions = $("#instructions").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez saisir la désignation!";
+ v_msgEng="Please enter the designation!!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(unite<=" ")
+ {
+ v_msg="Veuillez saisir l\'unité!";
+ v_msgEng="Please enter the unit!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#unite").focus();
+ return;
+ }
+
+ donnees = 'libelle='+libelle;
+ donnees += '&unite='+unite;
+
+ donnees += '&ententePrealable='+ententePrealable;
+ donnees += '&exclu='+exclu;
+ donnees += '&actif='+actif;
+ donnees += '&instructions='+instructions;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/enregistrernouveaumedicament/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ retour_liste_medicaments();
+ }
+ });
+ }
+}
+
+function ctrlkeypress_composante_tarif_medicaments(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ ajax_composante_tarif_medicaments();
+ }
+}
+
+function ajax_composante_tarif_medicaments()
+{
+ codeTarifMedicament=$("#codeTarifMedicament").val();
+ libelleMedicament=$("#libelleMedicament").val();
+
+ if(codeTarifMedicament<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifMedicament").focus();
+ return;
+ }
+
+ if(libelleMedicament<=' ')
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleMedicament").focus();
+ return;
+ }
+
+ donnees = 'codeTarifMedicament='+codeTarifMedicament+'&libelleMedicament='+libelleMedicament;
+
+ // alert(donnees);
+ // return;
+
+ var div_attente = $('#div_compsante_tarif');
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/affichercomposantetarif/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajouter_tous_medicaments_libelle_au_tarif()
+{
+ codeTarifMedicament=$("#codeTarifMedicament").val();
+ libelleMedicament=$("#libelleMedicament").val();
+
+ if(codeTarifMedicament<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifMedicament").focus();
+ return;
+ }
+
+ if(libelleMedicament<=' ')
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleMedicament").focus();
+ return;
+ }
+
+ donnees = 'codeTarifMedicament='+codeTarifMedicament+'&libelleMedicament='+libelleMedicament;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm this operation?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/ajoutertousmedicamentsautarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif_medicaments();
+ }
+ });
+ }
+}
+
+function retirer_tous_medicaments_libelle_au_tarif()
+{
+ codeTarifMedicament=$("#codeTarifMedicament").val();
+ libelleMedicament=$("#libelleMedicament").val();
+
+ if(codeTarifMedicament<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifMedicament").focus();
+ return;
+ }
+
+ if(libelleMedicament<=' ')
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleMedicament").focus();
+ return;
+ }
+
+ donnees = 'codeTarifMedicament='+codeTarifMedicament+'&libelleMedicament='+libelleMedicament;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm this operation?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/retirertousmedicamentsautarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif_medicaments();
+ }
+ });
+ }
+}
+
+function ajouter_un_medicament_au_tarif(idMedicament)
+{
+ codeTarifMedicament=$("#codeTarifMedicament").val();
+
+ if(codeTarifMedicament<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifMedicament").focus();
+ return;
+ }
+
+ donnees = 'idMedicament='+idMedicament+'&codeTarifMedicament='+codeTarifMedicament;
+
+ // alert(donnees);
+ // return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/ajouterunamedicamentautarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif_medicaments();
+ }
+ });
+}
+
+function retirer_un_medicament_du_tarif(idDetailtarifMedicament)
+{
+ donnees = 'idDetailtarifMedicament='+idDetailtarifMedicament;
+
+ // alert(donnees);
+ // return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/retirerunamedicamentutarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif_medicaments();
+ }
+ });
+}
+
+function maj_composante_tarif_medicament(idDetailtarifMedicament, prix)
+{
+ donnees = 'idDetailtarifMedicament='+idDetailtarifMedicament+"&prix="+prix;
+
+ // alert(donnees);
+ // return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/majprix/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function exporter_tarif_verre()
+{
+ codeTarifOptique=$("#codeTarifOptique").val();
+
+ if(codeTarifOptique<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ donnees = "codeTarifOptique="+codeTarifOptique;
+
+ alert(donnees);
+ return;
+
+ var div_export = $('#div_export_tarif');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_exporter_tarif").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexportertarifmedicament/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function consulterfactureverres()
+{
+ idFacture = $("#idFacture").val();
+
+ $("#div_facture_detail").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ donnees = 'idFacture='+idFacture;
+
+ if(isNaN(idFacture))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idFacture").val("0");
+ $("#idFacture").focus();
+ return;
+ }
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxfacturecons/verres/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_facture_detail").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function consulterfactureverres_pop()
+{
+ idFacture = $("#idFacture").val();
+
+ $("#div_facture_detail").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ donnees = 'idFacture='+idFacture;
+
+ if(isNaN(idFacture))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idFacture").val("0");
+ $("#idFacture").focus();
+ return;
+ }
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxfactureconspop/verres/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_facture_detail").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function exporter_tarif_verre()
+{
+ codeTarifOptique=$("#codeTarifOptique").val();
+
+ if(codeTarifOptique<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ donnees = "codeTarifOptique="+codeTarifOptique;
+
+ // alert(donnees);
+ // return;
+
+ var div_export = $('#div_export_tarif');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_exporter_tarif").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexportertarifverres/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ // $('#div_test_gabarit').html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function ctrlkeypress_rechercher_verres_param(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ rechercher_verres_param();
+ }
+}
+
+function rechercher_verres_param()
+{
+ libelleVerre=$("#libelleVerre").val();
+
+ if(libelleVerre<=' ')
+ {
+ v_msg="Veuillez indiquer la désigantion!";
+ v_msgEng="Please enter the designation!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleVerre").focus();
+ return;
+ }
+
+ donnees = 'libelleVerre='+libelleVerre;
+
+ // alert(donnees);
+ // return;
+
+ var div_attente = $('#div_detail_verres');
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/listeverres/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function modifier_un_verre(idVerre)
+{
+ window.location.assign($("#racineWeb" ).val()+"Modifierverre/"+idVerre+"/");
+}
+
+function retour_liste_verres()
+{
+ window.location.assign($("#racineWeb" ).val()+"Listeverres/");
+}
+
+function enregistrer_modif_un_verre()
+{
+ idVerre = $("#idVerre").val();
+ codeOptique = $("#codeOptique").val();
+
+ libelle = $("#libelle").val();
+ libelleEng = $("#libelleEng").val();
+
+ actif = $("#actif").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez saisir la désignation en français!";
+ v_msgEng="Please enter the designation in french!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(libelleEng<=" ")
+ {
+ v_msg="Veuillez saisir la désignation en Anglais!";
+ v_msgEng="Please enter the designation in English!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleEng").focus();
+ return;
+ }
+
+ donnees = 'idVerre='+idVerre;
+ donnees += '&codeOptique='+codeOptique;
+
+ donnees += '&libelle='+libelle;
+ donnees += '&libelleEng='+libelleEng;
+
+ donnees += '&actif='+actif;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/enregistrermodifverre/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ retour_liste_verres();
+ }
+ });
+ }
+}
+
+function exporter_liste_verres()
+{
+ var div_export = $('#div_export_verres');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_exporter").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexportertarifverres/listeverres/",
+ // type: 'POST',
+ // data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function enregistrer_nouveau_verre()
+{
+ libelle = $("#libelle").val();
+ libelleEng = $("#libelleEng").val();
+ actif = $("#actif").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez saisir la désignation!";
+ v_msgEng="Please enter the designation!!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(libelleEng<=" ")
+ {
+ v_msg="Veuillez saisir la désignation en Anglais!";
+ v_msgEng="Please enter the designation in English!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleEng").focus();
+ return;
+ }
+
+
+ donnees = 'libelle='+libelle;
+ donnees += '&libelleEng='+libelleEng;
+
+ donnees += '&actif='+actif;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/enregistrernouveauverre/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ retour_liste_verres();
+ }
+ });
+ }
+}
+
+function ajax_init_composante_tarif_verre_cons()
+{
+ $('#div_compsante_tarif').html("");
+ $("#libelleVerre").focus();
+}
+
+function ctrlkeypress_composante_tarif_verre_cons(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ ajax_composante_tarif_verre_cons();
+ }
+}
+
+function ajax_composante_tarif_verre_cons()
+{
+ codeTarifOptique=$("#codeTarifOptique").val();
+ libelleVerre=$("#libelleVerre").val();
+
+ if(codeTarifOptique<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifOptique").focus();
+ return;
+ }
+
+ /*
+ if(libelleVerre<=' ')
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleVerre").focus();
+ return;
+ }
+ */
+
+ donnees = 'codeTarifOptique='+codeTarifOptique+'&libelleVerre='+libelleVerre;
+
+ // alert(donnees);
+ // return;
+
+ var div_attente = $('#div_compsante_tarif');
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/affichercomposantetarifcons/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ctrlkeypress_composante_tarif_verres(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ ajax_composante_tarif_verres();
+ }
+}
+
+function ajax_composante_tarif_verres()
+{
+ codeTarifOptique=$("#codeTarifOptique").val();
+ libelleVerre=$("#libelleVerre").val();
+
+ if(codeTarifOptique<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifOptique").focus();
+ return;
+ }
+
+ if(libelleVerre<=' ')
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleVerre").focus();
+ return;
+ }
+
+ donnees = 'codeTarifOptique='+codeTarifOptique+'&libelleVerre='+libelleVerre;
+
+ // alert(donnees);
+ // return;
+
+ var div_attente = $('#div_compsante_tarif');
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/affichercomposantetarif/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+
+function afficher_dernieres_factures_optique(idBeneficiaire)
+{
+ idFacture = $("#idFacture").val();
+
+ $("#div_dernieres_factures_optique").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ donnees = 'idBeneficiaire='+idBeneficiaire;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdernieresfacturesoptique/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_dernieres_factures_optique").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajouter_tous_verres_libelle_au_tarif()
+{
+ codeTarifOptique=$("#codeTarifOptique").val();
+ libelleVerre=$("#libelleVerre").val();
+
+ if(codeTarifOptique<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifOptique").focus();
+ return;
+ }
+
+ if(libelleVerre<=' ')
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleVerre").focus();
+ return;
+ }
+
+ donnees = 'codeTarifOptique='+codeTarifOptique+'&libelleVerre='+libelleVerre;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm this operation?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/ajoutertousverressautarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif_verres();
+ }
+ });
+ }
+}
+
+function retirer_tous_verres_libelle_du_tarif()
+{
+ codeTarifOptique=$("#codeTarifOptique").val();
+ libelleVerre=$("#libelleVerre").val();
+
+ if(codeTarifOptique<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifOptique").focus();
+ return;
+ }
+
+ if(libelleVerre<=' ')
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelleVerre").focus();
+ return;
+ }
+
+ donnees = 'codeTarifOptique='+codeTarifOptique+'&libelleVerre='+libelleVerre;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm this operation?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/retirertousverressautarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif_verres();
+ }
+ });
+ }
+}
+
+function ajouter_un_verre_au_tarif(idVerre)
+{
+ codeTarifOptique=$("#codeTarifOptique").val();
+
+ if(codeTarifOptique<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifOptique").focus();
+ return;
+ }
+
+ donnees = 'idVerre='+idVerre+'&codeTarifOptique='+codeTarifOptique;
+
+ // alert(donnees);
+ // return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/ajouterunverreautarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif_verres();
+ }
+ });
+}
+
+function retirer_un_verre_au_tarif(idDetailtarifOptique)
+{
+ codeTarifOptique=$("#codeTarifOptique").val();
+
+ if(codeTarifOptique<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifOptique").focus();
+ return;
+ }
+
+ donnees = 'idDetailtarifOptique='+idDetailtarifOptique+'&codeTarifOptique='+codeTarifOptique;
+
+ // alert(donnees);
+ // return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/retirerunverredutarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif_verres();
+ }
+ });
+}
+
+function maj_composante_tarif_verres(idDetailtarifOptique, prix)
+{
+ donnees = 'idDetailtarifOptique='+idDetailtarifOptique+"&prix="+prix;
+
+ // alert(donnees);
+ // return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/majprix/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function exporterbons()
+{
+ codePrestataire=$("#codePrestataire").val();
+
+ codeTypeBon=$("#codeTypeBon").val();
+ codeEtatBon=$("#codeEtatBon").val();
+
+ noDepart=$("#noDepart").val();
+ noFin=$("#noFin").val();
+
+ if (noDepart=="")
+ {
+ noDepart="0";
+ }
+
+ if (noFin=="")
+ {
+ noFin="0";
+ }
+
+ noDepart = parseInt(noDepart);
+ noFin = parseInt(noFin);
+
+ if (codePrestataire<=" ")
+ {
+ v_msg="Veuillez sélectionner un prestataire!";
+ v_msgEng="Please select a provider!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codePrestataire").focus();
+ return;
+ }
+
+ if (codeTypeBon<=" ")
+ {
+ v_msg="Veuillez sélectionner un type de bon!";
+ v_msgEng="Please select a form type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypeBon").focus();
+ return;
+ }
+
+ if (noFin
' + 'Veuillez patienter... / Please wait...' + '');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexporterbons/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function consulter_remplacer_medicament()
+{
+ $("#div_liste_medicaments_remplaces").html('
' + 'Veuillez patienter...' + ' ');
+
+ $('#btn_medicaments_remplaces').click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailprescription/consulterremplacement/",
+ type: 'POST',
+ success: function(data) {
+ $("#div_liste_medicaments_remplaces").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ // $('#btn_medicaments_remplaces').click();
+ }
+ });
+}
+
+function etat_prod_par_mois_eclate_client()
+{
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ $('#div_export_a').html("");
+
+ donnees_retour = "";
+ donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un état!";
+ v_msgEng="Please select a state!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function etat_prod_par_mois_eclate_client_export()
+{
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ $('#div_export_a').html("");
+
+ donnees_retour = "";
+ donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
+
+ $('#div_export_a').html("");
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un état!";
+ v_msgEng="Please select a state!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function exporter_modele_destinataire_sms()
+{
+ $('#div_form_upload').hide();
+
+ var div_export = $('#div_exporter_destinataires_sms');
+
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximporterdestinatairesms/exportermodele/",
+ type: 'POST',
+ // data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function charger_fichier_modele_destinataire_sms()
+{
+ $('#div_exporter_destinataires_sms').html("");
+
+ $('#div_form_upload').show();
+
+ // return;
+}
+
+function importer_destinataire_sms()
+{
+ etape2=$("#etape2").val();
+
+ if (etape2 != "1")
+ {
+ v_msg="Etape 2 incomplète!";
+ v_msgEng="Incomplete step 2!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ $('#div_form_upload').hide();
+
+ var div_export = $('#div_exporter_destinataires_sms');
+
+ div_export.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+ cheminFichier=$("#cheminFichier").val();
+
+ donnees = 'cheminFichier='+cheminFichier;
+
+ $("#div_erreur_excel").html("");
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximporterdestinatairesms/importermodele/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html('');
+ $("#div_erreur_excel").html(data);
+
+ v_msg="Opération terminée avec succès!";
+ v_msgEng="Operation completed successfully!";
+ alert_ebene(v_msg, v_msgEng);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ alert("Actualisation...");
+ reinitiliser_envois_sms_hors_systeme();
+ }
+ });
+}
+
+function ajax_init_destinataires_sms_hos_systeme()
+{
+ etape3=$("#etape3").val();
+
+ if (etape3 != "1")
+ {
+ v_msg="Etape 3 incomplète!";
+ v_msgEng="Incomplete step 3!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ $("#div_envois_sms").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximporterdestinatairesms/init/",
+ success: function(data)
+ {
+ $("#div_envois_sms").html(data);
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function reinitiliser_envois_sms_hors_systeme()
+{
+ window.location.assign($("#racineWeb" ).val()+"Importdestinatairesms/");
+}
+
+function histo_enrollement_empreinte()
+{
+ $("#div_detail_suppr_empreinte").html("");
+
+ debut=$("#debut").val();
+ fin=$("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+ donnees_retour = "";
+
+ $("#div_detail_suppr_empreinte").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxhistsupprempreinteexport/historiqueenrollement/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_suppr_empreinte").html(donnees_retour);
+ }
+ });
+}
+
+function imprimer_limites_adherent_entete_contrat()
+{
+ idEntetecontrat=$("#idEntetecontrat").val();
+
+ if (idEntetecontrat<="0")
+ {
+ v_msg="Veuillez sélectionner une période!";
+ v_msgEng="Please select a period!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idEntetecontrat").focus();
+
+ div_attente.html('');
+
+ return;
+ }
+
+ donnees = 'idEntetecontrat='+idEntetecontrat;
+
+ var div_export = $('#div_export_a');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximprimerlimite/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function afficher_garantiebeneficiaire_entete_contrat()
+{
+ var div_attente = $('#div_gar_exo');
+
+ idEntetecontrat=$("#idEntetecontrat").val();
+
+ if (idEntetecontrat<="0")
+ {
+ v_msg="Veuillez sélectionner une période!";
+ v_msgEng="Please select a period!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idEntetecontrat").focus();
+
+ div_attente.html('');
+
+ return;
+ }
+
+ donnees = 'idEntetecontrat='+idEntetecontrat;
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxplafondbeneficiaire/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajaxchanger_type_bon()
+{
+ $("#msgErreur").html("");
+}
+
+function changer_type_bon()
+{
+ $("#nbligne_info").val("0");
+ afficherbon_vide();
+}
+
+function afficherbon_vide()
+{
+ $("#div_bonpecs").html("");
+
+ codeLangue = $("#codeLangue").val();
+ if(codeLangue=="en_US")
+ {
+ $("#nbligne").val("Number of lines displayed : 0");
+ }
+ else
+ {
+ $("#nbligne").val("Nombre de bons affichés : 0");
+ }
+
+ /*
+ codeTypeBon=$("#codeTypeBon").val();
+
+ if (codeTypeBon<=" ")
+ {
+ v_msg="Veuillez sélectionner un type de bon!";
+ v_msgEng="Please select a form type!";
+ alert_ebene(v_msg, v_msgEng);
+ $("#codeTypeBon").focus();
+ return;
+ }
+ */
+
+ $("#div_bonpecs").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxafficherbons/vide/",
+ error: function(errorData)
+ {
+ },
+ success: function(data)
+ {
+ $("#div_bonpecs").html(data);
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function date_inclus_mois_decompte()
+{
+ datejour = $("#datejour_C").val();
+ dateFacture = $("#dateFacture").val();
+ dateFactureReelle = dateFacture;
+
+ libelledebutMoisDecompte = $("#debutMoisDecompte").val();
+ debutMoisDecompte = $("#debutMoisDecompte").datepicker("getDate");
+ var tddebut = new Date(debutMoisDecompte);
+ dddebut = Math.round(Date.parse(tddebut)/(1000*3600*24));
+
+ CalculerFinMoisDecompte();
+
+ libellefinMoisDecompte = $("#finMoisDecompte").val();
+ finMoisDecompte = $("#finMoisDecompte").datepicker("getDate");
+ var tfin = new Date(finMoisDecompte);
+ ddfin = Math.round(Date.parse(tfin)/(1000*3600*24));
+
+ var td1 = $("#dateFacture").datepicker("getDate");
+ var tdj = new Date(datejour);
+
+ dt1=Math.round(Date.parse(td1)/(1000*3600*24));
+ dtj=Math.round(Date.parse(tdj)/(1000*3600*24));
+
+ if ( (dt1ddfin) )
+ {
+ v_msg="Attention! date hors du mois! => "+libelledebutMoisDecompte+" - "+libellefinMoisDecompte;
+ v_msgEng="Warning! date out of the month!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return false;
+ }
+
+ if (dt1>dtj)
+ {
+ v_msg="Attention! Revoir la date!";
+ v_msgEng="Warning! Review the date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return false;
+ }
+ return true;
+}
+
+function CalculerFinMoisDecompte()
+{
+ var typdate = $("#debutMoisDecompte").datepicker("getDate");
+ typdate.addMonths(1);
+ $("#finMoisDecompte").datepicker( "setDate", typdate );
+}
+
+function supprimer_lien_parent_client(idClient)
+{
+ v_msg="Confirmez-vous la suppression de cette liaison?";
+ v_msgEng="Do you confirm the deletion of this link?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxclientliaison/supprimerliaisonclient/",
+ type : 'post',
+ data: "idClient="+idClient,
+ success: function(data)
+ {
+ v_msg="Suppression terminée avec succès terminé!";
+ v_msgEng="Deletion completed successfully completed!";
+ alert_ebene(v_msg, v_msgEng);
+ },
+ complete: function()
+ {
+ afficher_client_liaison();
+ }
+ });
+ }
+}
+
+function afficher_client_liaison()
+{
+ window.location.assign($("#racineWeb" ).val()+"Liaisonclients/");
+}
+
+function client_lier_a_un_parent(idClientP)
+{
+ idClient = $("#idClient").val();
+
+ // alert("idClient => "+idClient+" ; idClientP => "+idClientP);
+ // return;
+
+ if (idClient<=" " || idClientP<=" ")
+ {
+ v_msg="Veuillez sélectionner le parent!";
+ v_msgEng="Please select the parent!";
+ alert_ebene(v_msg, v_msgEng);
+ $("#nomsearch").focus();
+ return;
+ }
+
+ v_msg="Confirmez-vous cette liaison?";
+ v_msgEng="Do you confirm this link?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ donnees = "idClient="+idClient+"&idClientP="+idClientP;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxclientliaison/clientlieraunparent/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ v_msg="Liaison effectuée avec succès!";
+ v_msgEng="Link successfully completed!";
+ alert_ebene(v_msg, v_msgEng);
+ },
+ complete: function()
+ {
+ afficher_client_liaison();
+ }
+ });
+ }
+}
+
+function client_ajouter_un_enfant(idClientE)
+{
+ idClient = $("#idClient").val();
+
+ if (idClient<=" " || idClientE<=" ")
+ {
+ v_msg="Veuillez sélectionner le parent!";
+ v_msgEng="Please select the parent!";
+ alert_ebene(v_msg, v_msgEng);
+ $("#nomsearch_e").focus();
+ return;
+ }
+
+ v_msg="Confirmez-vous cette liaison?";
+ v_msgEng="Do you confirm this link?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ donnees = "idClient="+idClientE+"&idClientP="+idClient;
+
+ // alert(donnees)
+ // return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxclientliaison/clientlieraunparent/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ v_msg="Liaison effectuée avec succès!";
+ v_msgEng="Link successfully completed!";
+ alert_ebene(v_msg, v_msgEng);
+ },
+ complete: function()
+ {
+ afficher_client_liaison();
+ }
+ });
+ }
+}
+
+function ctrlkeypress_parent_client(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ afficher_pop_recherche_parent_client();
+ }
+}
+
+function afficher_pop_recherche_parent_client()
+{
+ idClient = $("#idClient").val();
+ numeroclientsearch = $("#numeroclientsearch").val();
+ nomsearch = $("#nomsearch").val();
+
+ numeroclientsearch = convertir_en_entier(numeroclientsearch);
+
+ if(numeroclientsearch+nomsearch<="0")
+ {
+ v_msg="Critères de recherche manquant!";
+ v_msgEng="Missing search criteria!";
+ alert_ebene(v_msg, v_msgEng);
+ $("#nomsearch").focus();
+ return;
+ }
+
+ donnees = "numeroclientsearch="+numeroclientsearch+"&nomsearch="+nomsearch+"&idClient="+idClient;
+
+ // alert(donnees);
+ // return;
+
+ $("#div_liste_clients_parents").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteclientsparents/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_liste_clients_parents").html(data);
+ }
+ });
+}
+
+function afficher_pop_recherche_enfants_client()
+{
+ idClient = $("#idClient").val();
+ numeroclientsearch = $("#numeroclientsearch_e").val();
+ nomsearch = $("#nomsearch_e").val();
+
+ numeroclientsearch = convertir_en_entier(numeroclientsearch);
+
+ if(numeroclientsearch+nomsearch<="0")
+ {
+ v_msg="Critères de recherche manquant!";
+ v_msgEng="Missing search criteria!";
+ alert_ebene(v_msg, v_msgEng);
+ $("#nomsearch_e").focus();
+ return;
+ }
+
+ donnees = "numeroclientsearch="+numeroclientsearch+"&nomsearch="+nomsearch+"&idClient="+idClient;
+
+ // alert(donnees);
+ // return;
+
+ $("#div_liste_clients_enfants").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteclientsenfants/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_liste_clients_enfants").html(data);
+ }
+ });
+}
+
+function ctrlkeypress_enfant_client(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ afficher_pop_recherche_enfants_client();
+ }
+}
+
+function afficherbon_vide_sans_wait()
+{
+ $("#div_bonpecs").html("");
+
+ codeLangue = $("#codeLangue").val();
+ if(codeLangue=="en_US")
+ {
+ $("#nbligne").val("Number of lines displayed : 0");
+ }
+ else
+ {
+ $("#nbligne").val("Nombre de bons affichés : 0");
+ }
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxafficherbons/vide/",
+ error: function(errorData)
+ {
+ },
+ success: function(data)
+ {
+ $("#div_bonpecs").html(data);
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function listerderogations_vide()
+{
+ $("#div_derogations").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxderogations/vide/",
+ type : 'post',
+ success: function(data) {
+ $("#div_derogations").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function listerderogationbeneficiaire_vide()
+{
+ $("#div_derogations").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/vide/",
+ type : 'post',
+ success: function(data) {
+ $("#div_derogations").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function listeententeprealables_vide()
+{
+ $("#div_ententeprealable").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxententeprealables/vide/",
+ type : 'post',
+ success: function(data) {
+ $("#div_ententeprealable").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function listerententeprealablebeneficiaire_vide()
+{
+ $("#div_ententeprealable").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/vide/",
+ type : 'post',
+ success: function(data) {
+ $("#div_ententeprealable").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function listeententeprealablespha_vide()
+{
+ $("#div_ententeprealable").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxententeprealablespha/vide/",
+ type : 'post',
+ success: function(data) {
+ $("#div_ententeprealable").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function listeententeprealablesopt_vide()
+{
+ $("#div_ententeprealable").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxententeprealablesopt/vide/",
+ type : 'post',
+ success: function(data) {
+ $("#div_ententeprealable").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function listeententeprealablesmont_vide()
+{
+ $("#div_ententeprealable").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxententeprealablesmont/vide/",
+ type : 'post',
+ success: function(data) {
+ $("#div_ententeprealable").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function maj_plafond_adherent_additionnelle(idCollegeTemp, plafond, controle)
+{
+ if(controle_numerique(controle))
+ {
+ donnees = 'idCollegeTemp='+idCollegeTemp+"&plafond="+plafond;
+
+ // alert(donnees);
+ // return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxgarantiescollegeadd/majplafondadherentadd/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_plafond_global").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ controle.focus();
+ }
+ });
+ }
+}
+
+function maj_prime_adherent_additionnelle(idCollegeTemp, prime, controle)
+{
+ if(controle_numerique(controle))
+ {
+ donnees = 'idCollegeTemp='+idCollegeTemp+"&prime="+prime;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxgarantiescollegeadd/majprimeadherentadd/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_plafond_global").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ recapituler_limite_college();
+ controle.focus();
+ }
+ });
+ }
+}
+
+function maj_plafond_beneficiaire_additionnelle(idCollegeTemp, plafond, controle)
+{
+ if(controle_numerique(controle))
+ {
+ donnees = 'idCollegeTemp='+idCollegeTemp+"&plafond="+plafond;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxgarantiescollegeadd/majplafondbeneficiaireadd/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_plafond_global").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ controle.focus();
+ }
+ });
+ }
+}
+
+function maj_prime_beneficiaire_additionnelle(idCollegeTemp, prime, controle)
+{
+ if(controle_numerique(controle))
+ {
+ donnees = 'idCollegeTemp='+idCollegeTemp+"&prime="+prime;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxgarantiescollegeadd/majprimebeneficiaireadd/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_plafond_global").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ recapituler_limite_college();
+ controle.focus();
+ }
+ });
+ }
+}
+
+function afficher_attribution_gestion_bon()
+{
+ codeGestionBon=$("#codeGestionBon").val();
+
+ var div_attente = $('#div_gestion_bon');
+
+ if (codeGestionBon<=" ")
+ {
+ v_msg="Veuillez sélectionner un mode de gestion!";
+ v_msgEng="Please select a management mode!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGestionBon").focus();
+ div_attente.html("");
+ return;
+ }
+
+ donnees = 'codeGestionBon='+codeGestionBon;
+
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairegestionbon/afficherattributiongestionbon/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ div_attente.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajouter_tous_prestataires_gestion_bon()
+{
+ codeGestionBon=$("#codeGestionBon").val();
+
+ if (codeGestionBon<=" ")
+ {
+ v_msg="Veuillez sélectionner un mode de gestion!";
+ v_msgEng="Please select a management mode!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGestionBon").focus();
+ return;
+ }
+
+ donnees = 'codeGestionBon='+codeGestionBon;
+
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm this operation?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairegestionbon/ajoutertousprestatairesgestionbon/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ afficher_attribution_gestion_bon();
+ }
+ });
+ }
+}
+
+function ajouter_un_prestataire_gestion_bon(codePrestataire)
+{
+ codeGestionBon=$("#codeGestionBon").val();
+
+ if (codeGestionBon<=" ")
+ {
+ v_msg="Veuillez sélectionner un mode de gestion!";
+ v_msgEng="Please select a management mode!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGestionBon").focus();
+ return;
+ }
+
+ donnees = 'codeGestionBon='+codeGestionBon+'&codePrestataire='+codePrestataire;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairegestionbon/ajouterunprestatairegestionbon/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ afficher_attribution_gestion_bon();
+ }
+ });
+}
+
+
+function requetes_factures_gc_export_gar()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeGcAssureur = $("#codeGcAssureur").val();
+ if(codeGcAssureur<=" ")
+ {
+ v_msg="Veuillez sélectionner un assureur!";
+ v_msgEng="Please select an insurer!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGcAssureur").focus();
+ return;
+ }
+
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees += 'codeGcAssureur=' + codeGcAssureur;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ v_url = $("#racineWeb").val()+"Ajaxrequetefacturegcexport/avecgaranties/";
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+
+function charger_detail_facture_gc_xls_gar()
+{
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailfacturegcxls/avecgaranties/",
+ type : 'post',
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ div_export.html(donnees_retour);
+ }
+ });
+}
+
+
+
+function exporter_paiement_decompte()
+{
+ debut=$("#debut").val();
+ fin=$("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+
+ $("#div_detail_paiement_decompte").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexporterpaiementdecompte/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_detail_paiement_decompte").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+
+function exporter_decompte_non_payes()
+{
+ debut=$("#debut").val();
+ fin=$("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+
+
+ $("#div_detail_paiement_decompte").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexporterpaiementdecompte/impayes/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_detail_paiement_decompte").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+
+function etat_moy_categ_med_prestataire()
+{
+ var td0 = $("#debutExercice").datepicker("getDate");
+ var td1 = $("#dateAnalyse").datepicker("getDate");
+ var td2 = $("#debutStat").datepicker("getDate");
+ var td3 = $("#finStat").datepicker("getDate");
+
+ dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // debutExercice
+ dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse
+ dt2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutStat
+ dt3=Math.round(Date.parse(td3)/(1000*3600*24)); // finStat
+
+ if (dt2dt1)
+ {
+ v_msg="Période a extraire hors de la période d\'analyse!";
+ v_msgEng="Period to extract out of the analysis period!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if (dt3dt1)
+ {
+ v_msg="Période a extraire hors de la période d\'analyse!";
+ v_msgEng="Period to extract out of the analysis period!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if (dt3
' + 'Veuillez patienter... / Please wait...' + '');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function etat_moy_categ_med_prestataire_export()
+{
+ // alert("etat_moy_moy_categ_med_prestataire_export");
+ // return;
+
+ var td0 = $("#debutExercice").datepicker("getDate");
+ var td1 = $("#dateAnalyse").datepicker("getDate");
+ var td2 = $("#debutStat").datepicker("getDate");
+ var td3 = $("#finStat").datepicker("getDate");
+
+ dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // debutExercice
+ dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse
+ dt2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutStat
+ dt3=Math.round(Date.parse(td3)/(1000*3600*24)); // finStat
+
+ if (dt2dt1)
+ {
+ v_msg="Période a extraire hors de la période d\'analyse!";
+ v_msgEng="Period to extract out of the analysis period!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if (dt3dt1)
+ {
+ v_msg="Période a extraire hors de la période d\'analyse!";
+ v_msgEng="Period to extract out of the analysis period!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if (dt3
' + 'Veuillez patienter... / Please wait...' + '');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+// assurance maladie individuelle => 01/11/2020
+function rechercher_commercail_type_param()
+{
+ var div_detail = $('#div_detail_apporteur');
+
+ codeTypeApporteur=$("#codeTypeApporteur").val();
+ libelleApporteur=$("#libelleApporteur").val();
+
+ /*
+ if(codeTypeApporteur<=' ')
+ {
+ v_msg="Veuillez sélectionner un type apporteur!";
+ v_msgEng="Please select a type of trader!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypeApporteur").focus();
+ return;
+ }
+ */
+
+ donnees = 'codeTypeApporteur='+codeTypeApporteur+'&libelleApporteur='+libelleApporteur;
+
+ div_detail.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxacommercialparam/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_detail.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+
+function rechercher_commercail_type_param_tous()
+{
+ var div_detail = $('#div_detail_apporteur');
+ libelleApporteur=$("#libelleApporteur").val();
+
+ donnees = 'libelleApporteur='+libelleApporteur;
+
+ div_detail.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxacommercialparam/tous/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_detail.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function ctrlkeypress_rechercher_commercail_type_param(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ rechercher_commercail_type_param();
+ }
+}
+
+function modifier_un_commercial(idApporteur)
+{
+ window.location.assign($("#racineWeb" ).val()+"Modifiercommercial/"+idApporteur+"/");
+}
+
+function retour_liste_commerciaux()
+{
+ window.location.assign($("#racineWeb" ).val()+"Commercial/");
+}
+
+function enregistrer_nouveau_commercial()
+{
+ codeTypeApporteur = $("#codeTypeApporteur").val();
+ libelle = $("#libelle").val();
+ telephone = $("#telephone").val();
+ email = $("#email").val();
+ adresseGeo = $("#adresseGeo").val();
+ adressePost = $("#adressePost").val();
+
+ if(codeTypeApporteur<=" ")
+ {
+ v_msg="Veuillez sélectionner le type!";
+ v_msgEng="Please select the type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypeApporteur").focus();
+ return;
+ }
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez saisir le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ donnees = 'codeTypeApporteur='+codeTypeApporteur;
+ donnees += '&libelle='+libelle;
+ donnees += '&telephone='+telephone;
+ donnees += '&email='+email;
+ donnees += '&adresseGeo='+adresseGeo;
+ donnees += '&adressePost='+adressePost;
+
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxacommercialparam/enregistrernouveaucommercial/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ retour_liste_commerciaux();
+ }
+ });
+ }
+}
+
+function enregistrer_modif_un_commercial()
+{
+ idApporteur = $("#idApporteur").val();
+ codeApporteur = $("#codeApporteur").val();
+
+ codeTypeApporteur = $("#codeTypeApporteur").val();
+ libelle = $("#libelle").val();
+ telephone = $("#telephone").val();
+ email = $("#email").val();
+ adresseGeo = $("#adresseGeo").val();
+ adressePost = $("#adressePost").val();
+
+ if(codeTypeApporteur<=" ")
+ {
+ v_msg="Veuillez sélectionner le type!";
+ v_msgEng="Please select the type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypeApporteur").focus();
+ return;
+ }
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez saisir le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ donnees = 'idApporteur='+idApporteur;
+ donnees += '&codeApporteur='+codeApporteur;
+ donnees += '&codeTypeApporteur='+codeTypeApporteur;
+ donnees += '&libelle='+libelle;
+ donnees += '&telephone='+telephone;
+ donnees += '&email='+email;
+ donnees += '&adresseGeo='+adresseGeo;
+ donnees += '&adressePost='+adressePost;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxacommercialparam/enregistrermodifcommercial/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ retour_liste_commerciaux();
+ }
+ });
+ }
+}
+
+function exporter_liste_commercial()
+{
+ var div_export = $('#div_export_apporteur');
+
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_exporter").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxacommercialparam/exporterlistecommercail/",
+ type: 'POST',
+ // data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+// Apporteurs / Courtiers
+function rechercher_apporteur_param()
+{
+ var div_detail = $('#div_detail_apporteur');
+
+ libelleApporteur=$("#libelleApporteur").val();
+
+ donnees = 'libelleApporteur='+libelleApporteur;
+
+ div_detail.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxapporteurparam/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_detail.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function ctrlkeypress_rechercher_apporteur_param(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ rechercher_apporteur_param();
+ }
+}
+
+function enregistrer_nouvel_apporteur()
+{
+ // codeTypeApporteur = $("#codeTypeApporteur").val();
+ libelle = $("#libelle").val();
+ telephone = $("#telephone").val();
+ email = $("#email").val();
+ adresseGeo = $("#adresseGeo").val();
+ adressePost = $("#adressePost").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez saisir le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ // donnees = 'codeTypeApporteur='+codeTypeApporteur;
+ donnees = 'libelle='+libelle;
+ donnees += '&telephone='+telephone;
+ donnees += '&email='+email;
+ donnees += '&adresseGeo='+adresseGeo;
+ donnees += '&adressePost='+adressePost;
+
+ // alert("enregistrer_nouvel_apporteur => "+donnees);
+ // return;
+
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxapporteurparam/enregistrernouvelapporteur/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ retour_liste_apporteurs();
+ }
+ });
+ }
+}
+
+
+function modifier_un_apporteur(idApporteur)
+{
+ window.location.assign($("#racineWeb" ).val()+"Modifierapporteur/"+idApporteur+"/");
+}
+
+function enregistrer_modif_un_apporteur()
+{
+
+ idApporteur = $("#idApporteur").val();
+ codeApporteur = $("#codeApporteur").val();
+
+ // codeTypeApporteur = $("#codeTypeApporteur").val();
+ libelle = $("#libelle").val();
+ telephone = $("#telephone").val();
+ email = $("#email").val();
+ adresseGeo = $("#adresseGeo").val();
+ adressePost = $("#adressePost").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez saisir le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ donnees = 'idApporteur='+idApporteur;
+ donnees += '&codeApporteur='+codeApporteur;
+ // donnees += '&codeTypeApporteur='+codeTypeApporteur;
+ donnees += '&libelle='+libelle;
+ donnees += '&telephone='+telephone;
+ donnees += '&email='+email;
+ donnees += '&adresseGeo='+adresseGeo;
+ donnees += '&adressePost='+adressePost;
+
+ // alert(donnees);
+ // return;
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxapporteurparam/enregistrermodifapporteur/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function()
+ {
+ retour_liste_apporteurs();
+ }
+ });
+ }
+}
+
+function retour_liste_apporteurs()
+{
+ window.location.assign($("#racineWeb" ).val()+"Courtier/");
+}
+
+function exporter_liste_courtier()
+{
+ var div_export = $('#div_export_apporteur');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_exporter").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxapporteurparam/exporterlisteapporteur/",
+ type: 'POST',
+ // data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+
+function assurance_familiale()
+{
+ codeTypeContrat = $("#codeTypeContrat_C").val();
+
+ if (codeTypeContrat!="F")
+ {
+ v_msg="Ce n\'est pas une police FAMILIALE!";
+ v_msgEng="This is not a FAMILIY policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ window.location.assign($("#racineWeb" ).val()+"Assuranceindividuelle/");
+}
+
+function ajax_init_parametres_echancier_temp()
+{
+ $("#div_echeancier_detail").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxfacturerpolice/getparametrestypeecheancier/",
+ type : 'post',
+ data: "codeTypeEcheancier="+$("#codeTypeEcheancier").val(),
+ success: function(data) {
+ $("#infonbEcheance").html(data);
+ $('#div_test_gabarit').html(data);
+ },
+ complete: function() {
+ $("#nbEcheance").val( $("#nbEcheance_info").val());
+ $("#tauxInteret").val( $("#tauxInteretEcheancier_info").val());
+
+ ajax_maj_echancier_temp();
+ }
+ });
+}
+
+function facturer_police_familiale()
+{
+ etat=$("#codeEtatPolice_C").val();
+
+ if (etat=="RE")
+ {
+ v_msg="Attention! Police résiliée!";
+ v_msgEng="Warning! Terminated policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if (etat=="AN")
+ {
+ v_msg="Attention! Police annulée!";
+ v_msgEng="Warning! Canceled policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if ($("#idPolice_C" ).val()>"")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Facturerpolicefamiliale/");
+ }
+}
+
+function creer_adherents_familiale()
+{
+ etat=$("#codeEtatPolice_C").val();
+
+ if (etat=="RE")
+ {
+ v_msg="Attention! Police résiliée!";
+ v_msgEng="Warning! Terminated policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if (etat=="SU")
+ {
+ v_msg="Attention! Police suspendue!";
+ v_msgEng="Warning! Suspended policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if (etat=="AN")
+ {
+ v_msg="Attention! Police annulée!";
+ v_msgEng="Warning! Canceled policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ window.location.assign($("#racineWeb" ).val()+"Creeradherentfamiliale/");
+}
+
+function ctrlkeypress_rechercher_commercail_type_familiale(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ rechercher_commercail_type_familiale();
+ }
+}
+
+function rechercher_commercail_type_familiale()
+{
+ var div_detail = $('#div_detail_apporteur');
+
+ codeTypeApporteur=$("#codeTypeApporteur").val();
+ libelleApporteur=$("#libelleApporteur").val();
+
+ donnees = 'codeTypeApporteur='+codeTypeApporteur+'&libelleApporteur='+libelleApporteur;
+
+ div_detail.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxacommercialfamiliale/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_detail.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function rechercher_commercail_type_familiale_tous()
+{
+ var div_detail = $('#div_detail_apporteur');
+ libelleApporteur=$("#libelleApporteur").val();
+
+ donnees = 'libelleApporteur='+libelleApporteur;
+
+ div_detail.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxacommercialfamiliale/tous/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_detail.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function()
+ {
+ }
+ });
+}
+
+function agent_commercial(idApporteur)
+{
+ if (idApporteur>" ")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Agentcommercial/"+idApporteur+"/");
+ }
+ else
+ {
+ v_msg="Aucun commercial!";
+ v_msgEng="commercial!";
+ alert_ebene(v_msg, v_msgEng);
+ }
+}
+
+function retour_agent_commercial()
+{
+ idApporteur=$("#idApporteur").val();
+
+ // alert("idApporteur "+idApporteur);
+
+ if (idApporteur>" ")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Agentcommercial/"+idApporteur+"/");
+ }
+ else
+ {
+ window.location.assign($("#racineWeb" ).val()+"Assuranceindividuelle/");
+ }
+}
+
+function facturer_famille()
+{
+ if(est_ce_police_famille())
+ {
+ if (codeTypeContrat!="F")
+ {
+ v_msg="Ce n\'est pas une police FAMILIALE!";
+ v_msgEng="This is not a FAMILIY policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ etat=$("#codeEtatPolice_C").val();
+
+ if (etat=="RE")
+ {
+ v_msg="Attention! Police résiliée!";
+ v_msgEng="Warning! Terminated policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if (etat=="AN")
+ {
+ v_msg="Attention! Police annulée!";
+ v_msgEng="Warning! Canceled policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ idAdherent = $("#idAdherent_C" ).val();
+ // if ($("#idPolice_C" ).val()>"")
+ if (idAdherent>"0")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Facturerfamille/");
+ }
+ }
+ else
+ {
+ v_msg="Ce n\'est pas une police FAMILIALE!";
+ v_msgEng="This is not a FAMILIY policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+}
+
+function aller_a_gestion_famille()
+{
+ codeTypeContrat = $("#codeTypeContrat_C").val();
+ if (codeTypeContrat=="F")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Assuranceindividuelle/");
+ return;
+ }
+}
+
+function est_ce_police_famille()
+{
+ codeTypeContrat = $("#codeTypeContrat_C").val();
+ return (codeTypeContrat=="F");
+}
+
+function recap_prime_adherent_temp()
+{
+ idCollege = $("#idCollege").val();
+ dateEntree = $("#dateEntree").val();
+ primeBase = $("#primeBase").val();
+ codeTypeEcheancier = $("#codeTypeEcheancier").val();
+
+ if (idCollege<=" ")
+ {
+ v_msg="Veuillez sélectionner un collège!";
+ v_msgEng="Please select a college!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idCollege").focus();
+ return;
+ }
+
+ if (codeTypeEcheancier<=" ")
+ {
+ v_msg="Veuillez sélectionner un type échéancier!";
+ v_msgEng="Please select a Sshedule type!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypeEcheancier").focus();
+ return;
+ }
+
+ donnees = 'idCollege='+idCollege;
+ donnees += '&dateEntree='+dateEntree;
+ donnees += '&primeBase='+primeBase;
+ donnees += '&codeTypeEcheancier='+codeTypeEcheancier;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxrecapprimeadherentfamiliale/",
+
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_prime").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function controle_bornes_primes_familiale()
+{
+ primeBase = $("#primeBase").val();
+ primeMin = $("#primeMin").val();
+
+
+ primeBase = parseInt(primeBase);
+ primeMin = parseInt(primeMin);
+
+ if((primeMin>0) && (primeBase
' + 'Veuillez patienter... / Please wait...' + '');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteadherentfamiliale/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_liste_adherent").html(data);
+ }
+ });
+}
+
+function afficher_adherents_police_familiale_export()
+{
+ debut = $("#debut").val();
+ fin = $("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+
+ $("#div_deatil_pop").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_pop").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteadherentfamiliale/exporter/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_deatil_pop").html(data);
+ }
+ });
+}
+
+function afficher_adherent_familiale_id()
+{
+ idAdherent = $("#idAdherent_C" ).val();
+
+ if (idAdherent>"0")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Ficheadherentfamiliale/"+idAdherent+"/");
+ }
+}
+
+function afficher_beneficiaire_familiale_()
+{
+ idBeneficiaire = $("#idBeneficiaire_C" ).val();
+ if (idBeneficiaire>"")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Fichebeneficiairefamiliale/"+idBeneficiaire+"/");
+ }
+}
+
+function facturer_beneficiaire()
+{
+ if(est_ce_police_famille())
+ {
+ etat=$("#codeEtatPolice_C").val();
+
+ if (etat=="RE")
+ {
+ v_msg="Attention! Police résiliée!";
+ v_msgEng="Warning! Terminated policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if (etat=="AN")
+ {
+ v_msg="Attention! Police annulée!";
+ v_msgEng="Warning! Canceled policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ idAdherent = $("#idAdherent_C" ).val();
+ // if ($("#idPolice_C" ).val()>"")
+ if (idAdherent>"0")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Facturerbeneficiaire/");
+ }
+ }
+ else
+ {
+ v_msg="Ce n\'est pas une police FAMILIALE!";
+ v_msgEng="This is not a FAMILIY policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+}
+
+function creer_beneficiaires_familiale()
+{
+ etat=$("#codeEtatPolice_C").val();
+
+ if (etat=="RE")
+ {
+ v_msg="Attention! Police résiliée!";
+ v_msgEng="Warning! Terminated policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if (etat=="SU")
+ {
+ v_msg="Attention! Police suspendue!";
+ v_msgEng="Warning! Suspended policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if (etat=="AN")
+ {
+ v_msg="Attention! Police annulée!";
+ v_msgEng="Warning! Canceled policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ etatadh=$("#codeEtatAdherent_C").val();
+
+ if (etatadh != "V")
+ {
+ v_msg="Attention! cette famille n\'est pas en vigueur!";
+ v_msgEng="Warning! this family is not in force!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ window.location.assign($("#racineWeb" ).val()+"Creerbeneficiairefamiliale/");
+}
+
+
+function recap_prime_beneficiaire_temp()
+{
+ $("#btn_submit").disable();
+
+ $("#primeTtc").val("0");
+
+ primeTtc2 = $("#primeTtc").val();
+
+ $("#div_prime").empty();
+
+ idAvenant = $("#idAvenant").val();
+
+ if(idAvenant<=" ")
+ {
+ v_msg="Veuillez sélectionner un avenant!";
+ v_msgEng="Please select an Amendment!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idAvenant").focus();
+ return;
+ }
+
+ codeLienParente=$("#codeLienParente").val();
+ if (codeLienParente=="A" || codeLienParente<=" ")
+ {
+ v_msg="Veuillez revoir le lien de parenté!";
+ v_msgEng="Please review the relationship";
+ alert_ebene(v_msg, v_msgEng);
+ $("#codeLienParente").focus();
+ return;
+ }
+
+ dateEntree=$("#dateEntree").val();
+
+ codeProduit=$("#codeProduit").val();
+
+ donnees = 'idAvenant='+idAvenant;
+ donnees += '&codeLienParente='+codeLienParente;
+ donnees += '&dateEntree='+dateEntree;
+ donnees += '&codeProduit='+codeProduit;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxrecapprimebeneficiairefamiliale/",
+
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_prime").html(data);
+ },
+ complete: function() {
+ primeTtc_info = $("#primeTtc_info").val();
+ $("#primeTtc").val(primeTtc_info);
+
+ if(primeTtc_info>"0")
+ {
+ $("#btn_submit").enable();
+ }
+ }
+ });
+}
+
+function changer_avenant_incorporation_beneficiaire_familiale()
+{
+ idAvenant = $("#idAvenant").val();
+
+ if(idAvenant<=" ")
+ {
+ v_msg="Veuillez sélectionner un avenant!";
+ v_msgEng="Please select an Amendment!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idAvenant").focus();
+ return;
+ }
+
+ donnees = 'idAvenant='+idAvenant;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxavenant/getdateavenantbeneficiaire/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_date_avenant").html(data);
+ $(".datepicker" ).datepicker();
+ },
+ complete: function()
+ {
+ // prorater_prime_beneficiaire();
+ }
+ });
+}
+
+
+// Début Entrée Familiale
+function stat_familiale_entree_detail()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert("stat_familiale_entree_detail =>"+donnees);
+ // return;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_entree_detail_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert("stat_familiale_entree_detail_export =>"+donnees);
+ // return;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function afficher_pop_recherche_commercial()
+{
+ codesearch = $("#codesearch").val();
+ nomsearch = $("#nomsearch").val();
+
+ if(codesearch+nomsearch<=" ")
+ return;
+
+ donnees = "valid=1&codeApporteur="+codesearch+"&nomsearch="+nomsearch;
+
+ $("#div_liste_commerciaux").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistecommercial/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_liste_commerciaux").html(data);
+ }
+ });
+}
+
+function reinitialiser_commercial()
+{
+ $("#codeApporteur").val("");
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistecommercial/reinitialiser/",
+ type : 'post',
+ // data: donnees,
+ success: function(data) {
+ },
+ complete: function() {
+ $("#close_pop").click();
+
+ codeLangue = $("#codeLangue").val();
+
+ if(codeLangue=="en_US")
+ {
+ $("#libelleApporteur").html("All / Search Trader...");
+
+ }
+ else
+ {
+ $("#libelleApporteur").html("Tous / Rechercher Commercial...");
+ }
+ }
+ });
+}
+
+function ctrlkeypress_commercial(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ afficher_pop_recherche_commercial();
+ }
+}
+
+function selectionner_commercial(codeApporteur, libelleApporteur)
+{
+ $("#codeApporteur").val(codeApporteur);
+ $("#libelleApporteur").html(libelleApporteur);
+
+ donnees = 'codeApporteur=' + codeApporteur;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistecommercial/mettreensession/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $('#div_test_gabarit').html(data);
+ },
+ complete: function() {
+ $("#close_pop").click();
+ }
+ });
+
+}
+
+function stat_familiale_entree_grp_fam()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert("stat_familiale_entree_grp_fam =>"+donnees);
+ // return;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_entree_grp_fam_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert("stat_familiale_entree_grp_fam_export =>"+donnees);
+ // return;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function stat_familiale_entree_grp_com_ech()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_entree_grp_com_ech_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function stat_familiale_entree_grp_com()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_entree_grp_com_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function stat_familiale_entree_grp_per_ech()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_entree_grp_per_ech_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function stat_familiale_entree_grp_per()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_entree_grp_per_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+
+function stat_familiale_entree_grp_exe_ech()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_entree_grp_exe_ech_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+//
+
+function stat_familiale_entree_grp_exe()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_entree_grp_exe_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+//
+
+function stat_familiale_entree_grp_ech()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_entree_grp_ech_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+// Fin Entree Familiale
+
+//
+
+
+// Début Sortie Familiale
+function stat_familiale_sortie_detail()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert("stat_familiale_sortie_detail =>"+donnees);
+ // return;
+
+ alert(v_url);
+ return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_sortie_detail_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert("stat_familiale_entree_detail_export =>"+donnees);
+ // return;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_fam()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ alert("stat_familiale_entree_grp_fam =>"+donnees);
+ return;
+
+ alert(v_url);
+ return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_fam_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert("stat_familiale_entree_grp_fam_export =>"+donnees);
+ // return;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_com_ech()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_com_ech_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_com()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_com_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_per_ech()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_per_ech_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_per()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_per_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+
+function stat_familiale_sortie_grp_exe_ech()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_exe_ech_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+//
+
+function stat_familiale_sortie_grp_exe()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_exe_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+//
+
+function stat_familiale_sortie_grp_ech()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function stat_familiale_sortie_grp_ech_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ codeApporteur = $("#codeApporteur").val();
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ donnees += 'codeApporteur=' + codeApporteur;
+ donnees += '&debutPeriode=' + debutPeriode;
+ donnees += '&finPeriode=' + finPeriode;
+
+ // alert(v_url);
+ // return;
+
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+// Fin Sortie Familiale
+
+// 22/11/2020
+function ajaxenteteetatprod()
+{
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un état!";
+ v_msgEng="Please select a state!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ donnees = 'codeEtat='+codeEtat;
+
+ v_url = $("#racineWeb").val()+"Ajaxentete"+codeEtat+"/";
+
+ $("#div_ente_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_ente_requete").html(data);
+ $(".datepicker" ).datepicker();
+ }
+ });
+}
+
+function ajaxenteteetatassurancefamiliale()
+{
+ $("#div_ente_requete").html("");
+
+ codeEnteteEtat=$("#codeEnteteEtat").val();
+
+ if (codeEnteteEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un entête!";
+ v_msgEng="Please select a header!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEnteteEtat").focus();
+ return;
+ }
+
+ donnees = 'codeEnteteEtat='+codeEnteteEtat;
+
+ v_url = $("#racineWeb").val()+"Etatsassuranceindividuelle/enteteetatsassuranceindividuelle/";
+
+ $("#div_sous_etat").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_sous_etat").html(data);
+ }
+ });
+}
+
+function afficher_liste_assures_a_importer()
+{
+ codeTypeContrat = $("#codeTypeContrat_C").val();
+
+ if (codeTypeContrat=="F")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Listeimportassurefamiliale/");
+ }
+ else
+ {
+ window.location.assign($("#racineWeb" ).val()+"Listeimportassure/");
+ }
+}
+
+function exporter_modele_assure_familiale()
+{
+ $('#div_form_upload').hide();
+
+ var div_export = $('#div_exporter_liste_assures');
+
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximporterlisteassurefamiliale/exportermodele/",
+ type: 'POST',
+ // data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+//
+
+function importer_modele_assure_familiale(idAvenant, dateEffet)
+{
+ etape2=$("#etape2").val();
+
+ if (etape2 != "1")
+ {
+ v_msg="Etape 2 incomplète!";
+ v_msgEng="Incomplete step 2!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ $('#div_form_upload').hide();
+
+ var div_export = $('#div_exporter_liste_assures');
+
+ div_export.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+ cheminFichier=$("#cheminFichier").val();
+
+ donnees = 'idAvenant='+idAvenant+'&cheminFichier='+cheminFichier;
+ donnees += '&dateEffet='+dateEffet;
+
+ // alert(donnees);
+ // return;
+
+ $("#div_erreur_excel").html("");
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximporterlisteassurefamiliale/importermodele/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html('');
+ $("#div_erreur_excel").html(data);
+
+ v_msg="Opération terminée avec succès!";
+ v_msgEng="Operation completed successfully!";
+ alert_ebene(v_msg, v_msgEng);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ div_export.html('');
+
+ succes_impot_execl=$("#succes_impot_execl").val();
+
+ if (succes_impot_execl == "1")
+ {
+ maj_etape_3_import_assures();
+ }
+ }
+ });
+}
+
+function init_importer_modele_assure_familiale()
+{
+ etape2=$("#etape2").val();
+
+ if (etape2 != "1")
+ {
+ v_msg="Etape 2 incomplète!";
+ v_msgEng="Incomplete step 2!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ $('#div_form_upload').hide();
+
+ var div_export = $('#div_exporter_liste_assures');
+
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximporterlisteassurefamiliale/initimportermodele/",
+ type: 'POST',
+ // data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function incorporer_assures_inmportes_familiale()
+{
+ nb_adh=$("#nb_adh").val();
+
+ if (nb_adh>"0")
+ {
+ v_msg="Veuillez revoir les collèges et relancer le calcul des primes!";
+ v_msgEng="Please review the colleges and restart the premium calculation!!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ nb_ligne_ass=$("#nb_ligne_ass").val();
+
+ if (nb_ligne_ass=="0")
+ {
+ v_msg="Rien à importer!";
+ v_msgEng="Nothing to import!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ /*
+ v_msg="Avez-vous fait l\'étape 2 => calcul des primes?";
+ v_msgEng="Did you do step 2 => premium calculation?";
+
+ if(!confirm_ebene(v_msg, v_msgEng))
+ {
+ return;
+ }
+ */
+
+ primeTtcTotal=$("#primeTtcTotal").val();
+
+ if (primeTtcTotal=="0")
+ {
+ v_msg="Pas de primes! souhaitez-vous recalculer les primes?";
+ v_msgEng="No premiums! do you want to recalculate the premiums?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ return;
+ }
+
+ v_msg="Notez que vous avez accepté l\'incorporation sans primes!";
+ v_msgEng="Note that you accepted the incorporation without premium!";
+ alert_ebene(v_msg, v_msgEng);
+ }
+
+ v_msg="Confirmez-vous l\'incorporation de cette liste?";
+ v_msgEng="Do you confirm the incorporation of this list?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ var div_attente = $('#div_liste_assure_importe');
+
+ div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximporterlisteassurefamiliale/incorpoerassuresimportesfamiliale/",
+ type: 'POST',
+ // data: donnees,
+ success: function(data) {
+ v_msg="Incorporation terminée avec succès!";
+ v_msgEng="Incorporation completed successfully!";
+ alert_ebene(v_msg, v_msgEng);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ afficher_police_id();
+ }
+ });
+ }
+}
+
+
+function liberer_medicament(idDetailprescription)
+{
+ v_msg="Confirmez-vous cette opération?";
+ v_msgEng="Do you confirm these modifications?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ donnees = 'idDetailprescription='+idDetailprescription;
+
+ // alert(donnees);
+ // return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailprescription/liberermedicament/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ v_msg="Opération terminée avec succès!";
+ v_msgEng="Operation completed successfully!";
+ alert_ebene(v_msg, v_msgEng);
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ window.location.assign($("#racineWeb" ).val()+"Prescriptioncons/");
+ }
+ });
+ }
+}
+
+// ajout du 07/01/2024
+function etat_rapport_sp_exercice_cat()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un état!";
+ v_msgEng="Please select a state!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/";
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function etat_rapport_sp_exercice_cat_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un état!";
+ v_msgEng="Please select a state!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"export/";
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function imprimer_cp_fc(lienEtat)
+{
+ var div_export = $('#div_export_a');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ donnees = 'lienEtat='+lienEtat;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximprimercp/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function supprimer_ged(idGed)
+{
+ v_msg="Confirmez-vous la suppression de ce document?";
+ v_msgEng="Do you confirm the deletion of this document?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ motifSuppression = "";
+
+ v_msg="Supprimé pour quel motif?";
+ v_msgEng="Deleted for what reason?";
+
+ motifSuppression = prompt_ebene(v_msg, v_msgEng, motifSuppression);
+ if (motifSuppression<=" ")
+ {
+ v_msg="Vous devez saisir un motif!";
+ v_msgEng="You have to enter a reason!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ donnees = 'idGed='+idGed+'&motifSuppression='+motifSuppression;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxged/supprimerged/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ v_msg="Document supprimé avec succès!";
+ v_msgEng="Document successfully removed!";
+ alert_ebene(v_msg, v_msgEng);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ window.location.assign($("#racineWeb" ).val()+"Fichepolice/");
+ }
+ });
+ }
+}
+
+
+function init_supprimer_data_face()
+{
+ window.location.assign($("#racineWeb" ).val()+"Supprimerface/");
+}
+
+function supprimer_data_face()
+{
+ faceRegistered_C=$("#faceRegistered_C" ).val();
+
+ if(faceRegistered_C<1)
+ {
+ v_msg="Pas de face enregistrée!";
+ v_msgEng="No face registered!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+
+ motif=$("#motif").val();
+
+ if (motif<=" ")
+ {
+ v_msg="Veuillez saisir un motif!";
+ v_msgEng="Please enter a reaon!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#motif").focus();
+ return;
+ }
+
+ v_msg="Confirmez-vous la suppression de la face?";
+ v_msgEng="Do you confirm the deletion of the face?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ donnees = 'motif='+motif;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxsupprimerface/supprimerface/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ v_msg="Face ré-initialisée avec succès!";
+ v_msgEng="Face re-initialized successfully!";
+ alert_ebene(v_msg, v_msgEng);
+
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ window.location.assign($("#racineWeb" ).val()+"Supprimerface/");
+ }
+ });
+ }
+}
+
+
+function re_init_photo_face()
+{
+ var photo = document.getElementById('photo_face');
+ photo.setAttribute('src', "");
+ $('#message_face').html("");
+ $('#image_face').val("");
+ $("#div_wait_face_ebene").html('');
+}
+
+function ebene_init_photo_face() // OK
+{
+ faceRegistered = $("#faceRegistered").val();
+ if(faceRegistered=="1")
+ {
+ v_msg="Cettte personne a déjà une face dans le système!";
+ v_msgEng="This person already has a face in the system!";
+ alert_ebene(v_msg, v_msgEng);
+ $('#message_face').html("");
+ return;
+ }
+ re_init_photo_face();
+ $("#btn_pop_save_face").click();
+}
+
+
+function ebene_init_confirm_photo_face() // OK
+{
+ faceRegistered = $("#faceRegistered").val();
+ if(faceRegistered!="1")
+ {
+ v_msg="Cettte personne n'a pas encore de face dans le système!";
+ v_msgEng="This person doesn't have a face in the system yet!";
+ alert_ebene(v_msg, v_msgEng);
+ $('#message_face').html("");
+ return;
+ }
+
+ re_init_photo_face();
+ $("#btn_pop_save_face").click();
+
+}
+
+function ebene_enregistrer_photo_face() // OK
+{
+ $("#ebene_confirmer_photo_face").disable();
+ $("#ebene_supprimer_photo_face").disable();
+ $("#ebene_take_photo_face").disable();
+ $("#motif").disable();
+
+ $("ebene_confirmer_photo_face").prop('disabled', true);
+ $("ebene_supprimer_photo_face").prop('disabled', true);
+ $("ebene_take_photo_face").prop('disabled', true);
+ $("motif").prop('disabled', true);
+
+ $('#message_face').html("");
+ $("#div_wait_face_ebene").html('');
+
+ $("#okId").val("-1");
+ $("#okId_face").val("-1");
+
+ $("#del_face").val("0");
+ image_face = $("#image_face").val();
+ if(image_face<=" ")
+ {
+ v_msg="Veuillez prendre une photo!";
+ v_msgEng="Please take a photo!";
+ alert_ebene(v_msg, v_msgEng);
+ return;
+ }
+
+ $("#div_wait_face_ebene").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ compare_face = $("#compare_face").val();
+
+ var dataURL = canvas.toDataURL("image/jpeg");
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Prestations/ebeneenregistrerface/",
+ type: 'POST',
+ data: {'image_face' : dataURL, 'compare_face' : compare_face , 'del_face' : "0"},
+ success: function(data) {
+ $("#ebene_take_photo_face").enable();
+ $("#div_wait_face_ebene").html('');
+ $("#message_face").html(data);
+ photo_succes = $("#photo_succes").val();
+ if(photo_succes=="1")
+ {
+ v_msg="Enrôlement effectué avec succès!";
+ v_msgEng="Enrollment completed successfully!!";
+ // alert_ebene(v_msg, v_msgEng);
+ setTimeout(() => {
+ prestations();
+ }, 2000)
+ }
+ },
+ error: function(data) {
+ },
+ complete: function(data) {
+ $("#div_wait_face_ebene").html('');
+ }
+ });
+}
+
+function ebene_confirmer_photo_face() // OK
+{
+ $("#ebene_confirmer_photo_face").disable();
+ $("#ebene_supprimer_photo_face").disable();
+ $("#ebene_take_photo_face").disable();
+ $("#motif").disable();
+
+ $("ebene_confirmer_photo_face").prop('disabled', true);
+ $("ebene_supprimer_photo_face").prop('disabled', true);
+ $("ebene_take_photo_face").prop('disabled', true);
+ $("motif").prop('disabled', true);
+
+ $('#message_face').html("");
+ $("#div_wait_face_ebene").html('');
+
+ $("#del_face").val("0");
+ faceRegistered = $("#faceRegistered").val();
+ if(faceRegistered!="1")
+ {
+ v_msg="Cette personne n'a pas encore de photo dans le système!";
+ v_msgEng="This person does not have a photo in the system yet!";
+ alert_ebene(v_msg, v_msgEng);
+ $('#message_face').html("");
+ return;
+ }
+
+ image_face = $("#image_face").val();
+ if(image_face<=" ")
+ {
+ v_msg="Veuillez prendre une photo!";
+ v_msgEng="Please take a photo!";
+ alert_ebene(v_msg, v_msgEng);
+ $('#message_face').html("");
+ return;
+ }
+
+ $("#div_wait_face_ebene").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ compare_face = $("#compare_face").val();
+
+ var dataURL = canvas.toDataURL("image/jpeg");
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Prestations/ebeneenregistrerface/",
+ type: 'POST',
+ data: {'image_face' : dataURL, 'compare_face' : compare_face , 'del_face' : "0"},
+ success: function(data) {
+ $("#ebene_take_photo_face").enable();
+ $("#div_wait_face_ebene").html('');
+ $("#message_face").html(data);
+ photo_succes = $("#photo_succes").val();
+ if(photo_succes=="1")
+ {
+ $("#okId_face").val("1");
+ v_msg="Face confirmée!";
+ v_msgEng="Face confirmed!";
+ // alert_ebene(v_msg, v_msgEng);
+ setTimeout(() => {
+ prestations();
+ }, 2000)
+ }
+ else
+ {
+ $("#okId").val("-1");
+ $("#okId_face").val("-1");
+ }
+ },
+ error: function(data) {
+ },
+ complete: function(data) {
+ $("#div_wait_face_ebene").html('');
+ }
+ });
+}
+
+function ebene_supprimer_photo_face() // OK
+{
+ $('#message_face').html("");
+ $("#div_wait_face_ebene").html('');
+
+ motif=$("#motif").val();
+ motif= motif.trim();
+ $("#motif").val(motif);
+
+ if (motif<=" ")
+ {
+ v_msg="Veuillez saisir un motif!";
+ v_msgEng="Please enter a reaon!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#motif").focus();
+ return;
+ }
+
+ $("#del_face").val("1");
+
+ faceRegistered = $("#faceRegistered").val();
+ if(faceRegistered!="1")
+ {
+ v_msg="Cette personne n'a pas encore de photo dans le système!";
+ v_msgEng="This person does not have a photo in the system yet!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ image_face = $("#image_face").val();
+ if(image_face<=" ")
+ {
+ v_msg="Veuillez prendre une photo!";
+ v_msgEng="Please take a photo!";
+ alert_ebene(v_msg, v_msgEng);
+ return;
+ }
+
+ v_msg="Confirmez-vous cette suppression?";
+ v_msgEng="Do you confirm this deletion?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $("#ebene_confirmer_photo_face").disable();
+ $("#ebene_supprimer_photo_face").disable();
+ $("#ebene_take_photo_face").disable();
+ $("#motif").disable();
+
+ $("ebene_confirmer_photo_face").prop('disabled', true);
+ $("ebene_supprimer_photo_face").prop('disabled', true);
+ $("ebene_take_photo_face").prop('disabled', true);
+ $("motif").prop('disabled', true);
+
+ $("#div_wait_face_ebene").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ compare_face = $("#compare_face").val();
+
+ var dataURL = canvas.toDataURL("image/jpeg");
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Prestations/ebeneenregistrerface/",
+ type: 'POST',
+ data: {'image_face' : dataURL, 'compare_face' : compare_face, 'del_face' : "1", 'motif' : motif},
+ success: function(data) {
+ $("#ebene_take_photo_face").enable();
+ $("#div_wait_face_ebene").html('');
+ $("#message_face").html(data);
+ photo_succes = $("#photo_succes").val();
+ if(photo_succes=="1")
+ {
+ $("#okId").val("-1");
+ $("#okId_face").val("-1");
+
+ document.getElementById('photo_face').setAttribute('src', "");
+
+ $("#faceRegistered").val("0");
+
+ $("#ebene_confirmer_photo_face").disable();
+ $("#ebene_supprimer_photo_face").disable();
+ $("#motif").disable();
+
+ $("ebene_confirmer_photo_face").prop('disabled', true);
+ $("ebene_supprimer_photo_face").prop('disabled', true);
+ $("motif").prop('disabled', true);
+
+ v_msg="Face supprimée avec succès!";
+ v_msgEng="Face removed successfully!";
+ // alert_ebene(v_msg, v_msgEng);
+ setTimeout(() => {
+ prestations();
+ }, 2000)
+ }
+ },
+ error: function(data) {
+ },
+ complete: function(data) {
+ $("#div_wait_face_ebene").html('');
+ }
+ });
+ }
+}
+
+
+function histsupprface()
+{
+ $("#div_detail_suppr_face").html("");
+
+ debut=$("#debut").val();
+ fin=$("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+
+ $("#div_detail_suppr_face").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxhistsupprface/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_detail_suppr_face").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function histsupprface_export()
+{
+ $("#div_detail_suppr_face").html("");
+
+ debut=$("#debut").val();
+ fin=$("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+ donnees_retour = "";
+
+ $("#div_detail_suppr_face").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxhistsupprfaceexport/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_suppr_face").html(donnees_retour);
+ }
+ });
+}
+
+function histo_enrollement_face()
+{
+ $("#div_detail_suppr_face").html("");
+
+ debut=$("#debut").val();
+ fin=$("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+ donnees_retour = "";
+
+ $("#div_detail_suppr_face").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxhistsupprfaceexport/historiqueenrollement/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_suppr_face").html(donnees_retour);
+ }
+ });
+}
+
+function afficher_liste_log_reconnaissance_faciale()
+{
+ debut = $("#debut").val();
+ fin = $("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+
+ $("#div_detail").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlogreconnaissancefaciale/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $("#div_test_gabarit").html(data);
+ $("#div_detail").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function exporter_log_reconnaissance_faciale()
+{
+ debut = $("#debut").val();
+ fin = $("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+
+ $("#div_deatil_pop").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_pop").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlogreconnaissancefaciale/exporterlogreconnaissancefaciale/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $("#div_test_gabarit").html(data);
+ $("#div_deatil_pop").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function afficher_liste_log_register_face()
+{
+ debut = $("#debut").val();
+ fin = $("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+
+ $("#div_detail").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlogregisterface/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $("#div_test_gabarit").html(data);
+ $("#div_detail").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function exporter_log_register_face()
+{
+ debut = $("#debut").val();
+ fin = $("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+
+ $("#div_deatil_pop").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_pop").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlogregisterface/getlogreregisterfaceexport/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $("#div_test_gabarit").html(data);
+ $("#div_deatil_pop").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function afficher_liste_log_remove_face()
+{
+ debut = $("#debut").val();
+ fin = $("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+
+ $("#div_detail").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlogremoveface/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $("#div_test_gabarit").html(data);
+ $("#div_detail").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function exporter_log_remove_face()
+{
+ debut = $("#debut").val();
+ fin = $("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+
+ $("#div_deatil_pop").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_pop").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlogremoveface/getlogreremovefaceexport/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $("#div_test_gabarit").html(data);
+ $("#div_deatil_pop").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ctrlkeypress_liste_logconnexion(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ afficher_liste_logconnexion();
+ }
+}
+
+function afficher_liste_logconnexion()
+{
+ login = $("#login").val();
+ ipConnexion = $("#ipConnexion").val();
+ debut = $("#debut").val();
+ fin = $("#fin").val();
+
+ donnees = 'login='+login+'&ipConnexion='+ipConnexion+'&debut='+debut+'&fin='+fin;
+
+ $("#div_detail").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlogconnexion/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $("#div_test_gabarit").html(data);
+ $("#div_detail").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function exporter_liste_logconnexion()
+{
+ login = $("#login").val();
+ ipConnexion = $("#ipConnexion").val();
+ debut = $("#debut").val();
+ fin = $("#fin").val();
+
+ donnees = 'login='+login+'&ipConnexion='+ipConnexion+'&debut='+debut+'&fin='+fin;
+
+ $("#div_deatil_pop").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $("#btn_pop").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlogconnexion/exporterlogconnexion/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_deatil_pop").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+// Récupère les coordonnées géographiques à partir de l'adresse IP entrée en paramètre
+// et l'affiche sur une carte google Map
+function trouve_coordonnees_geo_ip(ip)
+{
+ donnees='ipConnexion='+ip;
+
+ $.ajax({
+ url: "Ajaxlogconnexion/getcoordonneesgeoip/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData){
+ },
+
+ success: function(data) {
+ if(data !='false')
+ {
+ var str = data.split('/'),
+ lat = str[0], // Latitude de l'adresse IP retourné
+ lon = str[1], // Longitude de l'adresse IP retourné
+ out = "&output=embed"
+ src="https://maps.google.com/maps?q="+lat+","+lon+out; // Source de l'iframe
+
+ $('#map').attr("src", src);
+ $('#div_contenu_map').modal("show"); // Affiche en modal = carte google
+
+ $('#div_contenu_map').on('hidden.bs.modal', function(){
+ $('#map').html("").attr("src", ""); // Réinitialise la source de l'iframe à la fermeture du modal
+ });
+ }
+ else
+ {
+ v_msg="Impossible de trouver les coordonnées géographiques de l'adresse IP: "+ip;
+ v_msgEng="Unable to find the geographic coordinates of the IP address: "+ip;
+ alert_ebene(v_msg, v_msgEng);
+
+ }
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+function ctrlkeypress_liste_users_agence(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ afficher_liste_users_agence();
+ }
+}
+
+function afficher_liste_users_agence()
+{
+ donnees = "";
+ donnees_retour = "";
+
+ codePointVente = $("#codePointVente").val();
+ nom = $("#nom").val();
+ prenoms = $("#prenoms").val();
+
+ if (codePointVente+nom+prenoms<=" ")
+ {
+ v_msg="Veuillez indiquer au moins un critère de recherche!";
+ v_msgEng="Please enter at least one search criteria!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codePointVente").focus();
+ return;
+ }
+
+ donnees += 'codePointVente=' + codePointVente;
+ donnees += '&nom=' + nom;
+ donnees += '&prenoms=' + prenoms;
+
+ $("#div_liste_users").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxparamhabilitationass/Ajaxlisteusersagence/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_liste_users").html(donnees_retour);
+ }
+ });
+}
+
+function afficher_users_agence_id(idUtilisateur)
+{
+ window.location.assign($("#racineWeb" ).val()+"Ficheusersagence/"+idUtilisateur+"/");
+}
+
+function enregistrer_modif_usersagence()
+{
+ idUtilisateur = $("#idUtilisateur").val();
+ nom = $("#nom").val();
+ prenoms = $("#prenoms").val();
+ codePointVente = $("#codePointVente").val();
+ actif = $("#actif").val();
+ actVisible = $("#actVisibleUser").val();
+ codeLangue = $("#codeLangueUser").val();
+ AffectionVisible = $("#AffectionVisible").val();
+
+ if (nom<=" ")
+ {
+ v_msg="Veuillez saisir le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#nom").focus();
+ return;
+ }
+
+ if (codePointVente<=" ")
+ {
+ v_msg="Veuillez sélectionner une agance!";
+ v_msgEng="Please select an agency!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codePointVente").focus();
+ return;
+ }
+
+ if (actif<=" ")
+ {
+ v_msg="Utilisateur actif oui ou non?";
+ v_msgEng="Is the user active yes or no?";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#actif").focus();
+ return;
+ }
+
+ if(codeLangue<=" ")
+ {
+ v_msg="Veuillez indiquer la langue!";
+ v_msgEng="Please select the language";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeLangueUser").focus();
+ return;
+ }
+
+ if (actVisible<=" ")
+ {
+ v_msg="Actes visbles oui ou non?";
+ v_msgEng="Acts are visible yes or no?";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#actVisibleUser").focus();
+ return;
+ }
+
+ if (AffectionVisible<=" ")
+ {
+ v_msg="Affections visbles oui ou non?";
+ v_msgEng="Affections are visible yes or no?";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#AffectionVisible").focus();
+ return;
+ }
+
+ donnees = 'idUtilisateur=' + idUtilisateur;
+ donnees += '&codePointVente=' + codePointVente;
+ donnees += '&nom=' + nom;
+ donnees += '&prenoms=' + prenoms;
+ donnees += '&actif=' + actif;
+ donnees += '&actVisible=' + actVisible;
+ donnees += '&codeLangue=' + codeLangue;
+ donnees += '&AffectionVisible=' + AffectionVisible;
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxparamhabilitationass/enregistrermodifusersagence/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_test_gabarit").html(data);
+ },
+ complete: function() {
+ retour_a_usersagence();
+ }
+ });
+ }
+}
+
+function retour_a_usersagence()
+{
+ window.location.assign($("#racineWeb" ).val()+"Usersagence/");
+}
+
+function creer_user_agence()
+{
+ codePointVente = $("#codePointVente").val();
+ codeUtilisateur = $("#codeUtilisateur").val();
+ codeUtilisateur = codeUtilisateur.trim();
+ codeUtilisateur = supprimer_espace_string(codeUtilisateur);
+ codeUtilisateur = codeUtilisateur.toLowerCase();
+
+ nom = $("#nom").val();
+ prenoms = $("#prenoms").val();
+ telephone = $("#telephone").val();
+ email = $("#email").val();
+
+ codeLangue = $("#codeLangueUser").val();
+ actVisible = $("#actVisibleUser").val();
+ AffectionVisible = $("#AffectionVisibleUser").val();
+
+ nvmdp = $("#nvmdp").val();
+ cfnvmdp = $("#cfnvmdp").val();
+
+ if(nom<=" ")
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#nom").focus();
+ return;
+ }
+
+ if(codePointVente<=" ")
+ {
+ v_msg="Veuillez sélectionner une agance!";
+ v_msgEng="Please select an agency!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codePointVente").focus();
+ return;
+ }
+
+ if(codeUtilisateur<=" ")
+ {
+ v_msg="Veuillez indiquer le login!";
+ v_msgEng="Please enter the login!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeUtilisateur").focus();
+ return;
+ }
+
+
+ if(codeLangue<=" ")
+ {
+ v_msg="Veuillez indiquer la langue!";
+ v_msgEng="Please select the language";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeLangueUser").focus();
+ return;
+ }
+
+ if (actVisible<=" ")
+ {
+ v_msg="Actes visbles oui ou non?";
+ v_msgEng="Acts are visible yes or no?";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#actVisibleUser").focus();
+ return;
+ }
+
+
+ if (AffectionVisible<=" ")
+ {
+ v_msg="Affections visbles oui ou non?";
+ v_msgEng="Affections are visible yes or no?";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#AffectionVisibleUser").focus();
+ return;
+ }
+
+ if(nvmdp<=" ")
+ {
+ v_msg="Veuillez indiquer le mot de passe!";
+ v_msgEng="Please enter the password!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#nvmdp").focus();
+ return;
+ }
+
+ if(nvmdp != cfnvmdp)
+ {
+ v_msg="Veuillez confirmer votre mot de passe!";
+ v_msgEng="Please confirm your password!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#cfnvmdp").focus();
+ return;
+ }
+
+ motPass = nvmdp;
+
+ donnees = 'codePointVente='+codePointVente+'&codeUtilisateur='+codeUtilisateur;
+ donnees += '&nom='+nom+'&prenoms='+prenoms;
+ donnees += '&telephone='+telephone+'&email='+email+'&motPass='+motPass;
+ donnees += '&codeLangue='+codeLangue+'&actVisible='+actVisible+'&AffectionVisible='+AffectionVisible;
+
+ v_msg="Confirmez-vous ce nouvel utilisateur?";
+ v_msgEng="Do you confirm this new user?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxparamhabilitationass/creeruseragence/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $('#div_unicite_login').html(data);
+ },
+ complete: function()
+ {
+ uniciteLogin = $("#uniciteLogin").val();
+ if(uniciteLogin==1)
+ {
+ v_msg="Utilisateur ( "+codeUtilisateur+" ) créé avec succès!";
+ v_msgEng="User ( "+codeUtilisateur+" ) created succssfully!";
+ alert_ebene(v_msg, v_msgEng);
+
+ retour_a_usersagence();
+ }
+ else
+ {
+ v_msg="Login " + codeUtilisateur +" déjà utilisé!";
+ v_msgEng="Login " + codeUtilisateur +" already in use!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeUtilisateur").focus();
+ }
+ }
+ });
+ }
+}
+
+function etat_prod_agences()
+{
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ $('#div_export_a').html("");
+
+ donnees_retour = "";
+ donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un état!";
+ v_msgEng="Please select a state!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function etat_prod_agences_export()
+{
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ $('#div_export_a').html("");
+
+ donnees_retour = "";
+ donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
+
+ $('#div_export_a').html("");
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un état!";
+ v_msgEng="Please select a state!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function controler_piece_beneficiaire()
+{
+ v_codeNaturePiece = $("#codeNaturePiece").val();
+
+ if(v_codeNaturePiece<=' ')
+ {
+ v_msg="Veuillez sélection la nature de la pièce!";
+ v_msgEng="Please select the type of document!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeNaturePiece").focus();
+ return;
+ }
+
+ $('#numeroPiece').removeAttr('minlength');
+
+ if(v_codeNaturePiece=="CNI")
+ {
+ $('#div_controle_piece').html("");
+
+ v_numeroPiece = $("#numeroPiece").val();
+
+ $('#numeroPiece').attr('minlength', 13);
+
+ donnees = "numeroPiece="+v_numeroPiece;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcontrolepiece/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_controle_piece').html(data);
+
+ var resultatPiece = $("#resultatPiece").val();
+
+ if(resultatPiece!="0")
+ {
+ $("#numeroPiece").focus();
+ return;
+ }
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ }
+}
+
+function enregistrer_adherent_familiale()
+{
+ primeBase = $("#primeBase").val();
+ primeMin = $("#primeMin").val();
+ primeMax = $("#primeMax").val();
+
+
+ primeBase = parseInt(primeBase);
+ primeMin = parseInt(primeMin);
+ primeMax = parseInt(primeMax);
+
+ if((primeMin>0) && (primeBase' + '');
+
+ donnees = 'idPolice='+idPolice+'&idCollege='+idCollege;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistecarteassure/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_liste_carte").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function select_tous_carte_a_editer(p_choix)
+{
+ donnees = 'choix='+p_choix;
+
+ $("#div_liste_carte").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistecarteassure/toutchoisir/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_liste_carte').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+function select_un_assure_a_editer(p_choix, id)
+{
+ donnees = 'id='+id;
+ donnees += '&choix='+p_choix;
+
+ //$("#div_liste_carte").html('' + '
');
+
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistecarteassure/selectionunassure/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ //$('#div_liste_carte').html(data);
+ //appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+function confirmer_edition_carte(){
+
+ idPolice =$("#idPolice").val();
+
+ $("#div_liste_carte").html('' + '
');
+
+ donnees = 'idPolice='+idPolice;
+
+ v_msg="Confirmez-vous l'édition de carte assuré ?";
+ v_msgEng="Do you confirm the insured card edition?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistecarteassure/confirmedition/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ $("#div_test_gabarit").html(data);
+ },
+ success: function(data) {
+ $("#div_test_gabarit").html(data);
+ },
+ complete: function() {
+ afficher_liste_carteassure_police();
+ }
+ });
+ } else {
+ afficher_liste_carteassure_police();
+ }
+}
+
+function tester_edition_carteassure()
+{
+ idPolice =$("#idPolice").val();
+ donnees = 'idPolice='+idPolice;
+
+ $('#div_export_a').html("");
+ $('#div_liste_carte').html("");
+
+ $("#div_liste_carte").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistecarteassure/afficherliste/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_liste_carte").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+
+ nbChoix = $("#nbChoix").val();
+ if (nbChoix<="0")
+ {
+ v_msg="Liste vide!";
+ v_msgEng="Empty list!";
+ alert_ebene(v_msg, v_msgEng);
+ appliquerDataTable();
+ return false;
+ }
+ else
+ {
+ editer_carteassure();
+ }
+ }
+ });
+}
+
+function editer_carteassure()
+{
+ nbChoix = $("#nbChoix").val();
+ if (nbChoix<="0")
+ {
+ v_msg="Liste vide!";
+ v_msgEng="Empty list!";
+ alert_ebene(v_msg, v_msgEng);
+ return false;
+ }
+
+ idPolice =$("#idPolice").val();
+ idCollege=$("#idCollege").val();
+
+ $('#div_export_a').html("");
+ $('#div_liste_carte').html("");
+
+ donnees = 'idPolice='+idPolice+'&idCollege='+idCollege;
+
+ v_url = $("#racineWeb").val()+"Ajaxeditioncarteassure/";
+
+ $("#div_export_a").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_export_a").html(data);
+ }
+ });
+}
+
+function lister_dossiers_classiques_filtre(filtre)
+{
+ var libelle = "";
+
+ d1 = $("#d1").val();
+ d2 = $("#d2").val();
+
+ codeLangue = $("#codeLangue").val();
+
+
+ if(filtre=="0"){
+ libelle = "Filtre tous";
+ }else if(filtre=="1"){
+ libelle = "Filtre assurés";
+ }else if(filtre=="2"){
+ libelle = "Filtre polices";
+ }
+
+ if(codeLangue=="en_US")
+ {
+ if(filtre=="0"){
+ libelle = "Filter all";
+ }else if(filtre=="1"){
+ libelle = "Filter insured";
+ }else if(filtre=="2"){
+ libelle = "Insurance policy filter";
+ }
+
+ }
+
+ $("#libelleFiltre").val(libelle);
+ $("#filtre").val(filtre);
+
+ donnees = 'd1='+d1+'&d2='+d2+'&filtre='+filtre;
+
+ $("#div_export_a").html('');
+
+ $("#div_dossiers").html('' + '
');
+
+ // alert(donnees);
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxfacturesclassiquesfiltre/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_dossiers").html(data);
+ },
+ complete: function() {
+ }
+ });
+
+}
+
+function apercu_mouvement_assures()
+{
+ debut=$("#debut").val();
+ fin=$("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+
+ $("#div_mvt").html(`
+
+
+ Loading...
+
+
+ Veuillez patienter... / Please wait...
+
+
+ `);
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmouvementsrh/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_mvt").html(data);
+ appliquerDataTable('.tabliste');
+ },
+ complete: function() {
+ }
+ });
+}
+
+
+function apercu_mouvement_assures_export()
+{
+ debut=$("#debut").val();
+ fin=$("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+ donnees_retour = "";
+
+ // alert("apercu_mouvement_assures_export => "+donnees);
+
+ $("#div_detail_suppr_face").html(`
+
+
+ Loading...
+
+
+ Veuillez patienter... / Please wait...
+
+
+ `);
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmouvementsrhexport/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_mvt").html(donnees_retour);
+ }
+ });
+}
+
+function selectionner_consulter_mvt_police(idPolice)
+{
+ donnees = 'idPolice='+idPolice;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcontextpolice/",
+ type : 'post',
+ data: donnees,
+ complete: function() {
+ window.location.assign($("#racineWeb" ).val()+"Mouvementassure/");
+ }
+ });
+}
+
+
+function selectionner_valider_mvt_police(idPolice)
+{
+ donnees = 'idPolice='+idPolice;
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcontextpolice/",
+ type : 'post',
+ data: donnees,
+ complete: function() {
+ window.location.assign($("#racineWeb" ).val()+"Mouvementassurevalider/");
+ }
+ });
+}
+
+function liste_mouvemements_rh()
+{
+ codeSensMouvement=$("#codeSensMouvement").val();
+ valide=$("#valide").val();
+ debut=$("#debut").val();
+ fin=$("#fin").val();
+
+ donnees = 'codeSensMouvement='+codeSensMouvement;
+ donnees += '&valide='+valide;
+ donnees += '&debut='+debut+'&fin='+fin;
+
+ // alert(donnees);
+ // return;
+
+ $("#div_mvt").html(`
+
+
+ Loading...
+
+
+ Veuillez patienter... / Please wait...
+
+
+ `);
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmouvementassure/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_mvt").html(data);
+ appliquerDataTable('.tabliste');
+ },
+ complete: function() {
+ }
+ });
+}
+
+function liste_mouvemements_rh_valider()
+{
+ codeSensMouvement=$("#codeSensMouvement").val();
+ debut=$("#debut").val();
+ fin=$("#fin").val();
+
+ donnees = 'codeSensMouvement='+codeSensMouvement;
+ donnees += '&debut='+debut+'&fin='+fin;
+
+ $("#div_mvt").html(`
+
+
+ Loading...
+
+
+ Veuillez patienter... / Please wait...
+
+
+ `);
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmouvementassurevalider/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_mvt").html(data);
+ appliquerDataTable('.tabliste');
+ },
+ complete: function() {
+ }
+ });
+}
+
+function selectionner_mouvement_rh(idMvtTemp, choix)
+{
+ donnees = 'idMvtTemp='+idMvtTemp+'&choix='+choix;
+ v_url = $("#racineWeb").val()+"Ajaxmouvementassurevalider/selectionner/";
+ $.ajax({
+ url: v_url,
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ // alert(data);
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function selectionner_mouvement_rh_tout(choix)
+{
+ codeSensMouvement=$("#codeSensMouvement").val();
+ debut=$("#debut").val();
+ fin=$("#fin").val();
+
+ donnees = 'codeSensMouvement='+codeSensMouvement;
+ donnees += '&debut='+debut+'&fin='+fin;
+ donnees += '&choix='+choix;
+
+ v_url = $("#racineWeb").val()+"Ajaxmouvementassurevalider/selectionnertout/";
+
+ $("#div_mvt").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ // alert(data);
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ liste_mouvemements_rh_valider();
+ }
+ });
+}
+
+function valider_mouvement_rh()
+{
+ v_url = $("#racineWeb").val()+"Ajaxmouvementassurevalider/valider/";
+
+ $.ajax({
+ url: v_url,
+ type: 'POST',
+ success: function(data) {
+ // alert(data);
+ // $('#div_test_gabarit').html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ window.location.assign($("#racineWeb" ).val()+"Mouvementsrh/");
+ }
+ });
+}
+
+function activer_extranet_client(idClient, choix)
+{
+ v_msg="Confirmez-vous l\'activation?";
+ v_msgEng="Do you confirm the activation?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ donnees = "idClient="+idClient+"&choix="+choix;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxextranetclient/activer/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ },
+ complete: function() {
+ v_msg="Opération effectuée avec succès!";
+ v_msgEng="Operation successfully completed";
+ alert_ebene(v_msg, v_msgEng);
+
+ window.location.assign($("#racineWeb" ).val()+"Extranetclient/");
+ }
+ });
+ return;
+ }
+ else
+ {
+ v_msg="Opération annulée!";
+ v_msgEng="Operation canceled!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+}
+
+function activer_validation_rhrd(idClient, choix)
+{
+ v_msg="Confirmez-vous l\'activation?";
+ v_msgEng="Do you confirm the activation?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ donnees = "idClient="+idClient+"&choix="+choix;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxextranetclient/activervalidationrhrd/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ },
+ complete: function() {
+ v_msg="Opération effectuée avec succès!";
+ v_msgEng="Operation successfully completed";
+ alert_ebene(v_msg, v_msgEng);
+
+ window.location.assign($("#racineWeb" ).val()+"Extranetclient/");
+ }
+ });
+ return;
+ }
+ else
+ {
+ v_msg="Opération annulée!";
+ v_msgEng="Operation canceled!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+}
+
+function lister_dossiers_classiques_filtre_export(filtre)
+{
+ var libelle = "";
+
+ d1 = $("#d1").val();
+ d2 = $("#d2").val();
+
+ codeLangue = $("#codeLangue").val();
+
+
+ if(filtre=="0"){
+ libelle = "Filtre tous";
+ }else if(filtre=="1"){
+ libelle = "Filtre assurés";
+ }else if(filtre=="2"){
+ libelle = "Filtre polices";
+ }
+
+ if(codeLangue=="en_US")
+ {
+ if(filtre=="0"){
+ libelle = "Filter all";
+ }else if(filtre=="1"){
+ libelle = "Filter insured";
+ }else if(filtre=="2"){
+ libelle = "Insurance policy filter";
+ }
+ }
+
+ $("#libelleFiltre").val(libelle);
+ $("#filtre").val(filtre);
+
+ donnees = 'd1='+d1+'&d2='+d2+'&filtre='+filtre;
+
+ $("#div_export_a").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxfacturesclassiquesfiltreexport/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_export_a").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function listerremboursement()
+{
+ d1 = $("#d1").val();
+ d2 = $("#d2").val();
+ codeEtatDemandeRemboursement = $("#codeEtatDemandeRemboursement").val();
+
+ donnees = 'd1='+ d1+'&d2='+d2+'&codeEtatDemandeRemboursement='+codeEtatDemandeRemboursement;
+
+ $("#div_dossiers").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdemanderemboursement/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ // alert(data);
+
+
+ $('#div_dossiers').html(data);
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+function actualiser_remboursement()
+{
+ window.location.assign($("#racineWeb" ).val()+"Demanderemboursement/");
+
+}
+
+function selectionner_remboursement(idDemande)
+{
+ donnees = 'idDemande='+idDemande;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdemanderemboursement/selectionnerremb/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ // alert(data);
+
+ },
+ complete: function() {
+ actualiser_remboursement();
+ }
+ });
+}
+
+function valider_reponse_demande_rd()
+{
+ idDemandeRemboursement = $("#idDemandeRemboursement").val();
+ idBeneficiaire = $("#idBeneficiaire").val();
+ codeEtatDemandeRemboursement = $("#codeEtatDemandeRemboursement").val();
+ motifReponseDemandeRemboursement = $("#motifReponseDemandeRemboursement").val();
+
+ nbreFichier = $("#nbreFichier").val();
+
+ if(codeEtatDemandeRemboursement=="0"){
+
+ v_msg="Un autre état de réponse est obligatoire!";
+ v_msgEng="Another response status is required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtatDemandeRemboursement").focus();
+
+ return;
+ }
+
+ if(motifReponseDemandeRemboursement<=" "){
+
+ v_msg="Le motif est obligatoire!";
+ v_msgEng="The pattern is mandatory!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#motifReponseDemandeRemboursement").focus();
+
+ return;
+ }
+
+ if(codeEtatDemandeRemboursement=="1" && nbreFichier=="0"){
+
+ v_msg="Au moins une facture doit être incluse à la demande !";
+ v_msgEng="At least one invoice must be included with the request!";
+ alert_ebene(v_msg, v_msgEng);
+ return;
+ }
+
+ donnees = 'idDemandeRemboursement='+idDemandeRemboursement;
+ donnees += '&codeEtatDemandeRemboursement='+codeEtatDemandeRemboursement;
+ donnees += '&motifReponseDemandeRemboursement='+motifReponseDemandeRemboursement;
+
+ v_msg="Confirmez-vous cette réponse ?";
+ v_msgEng="Do you confirm this answer?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdemanderemboursement/majreponse/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ // $('#div_test_gabarit').html(data);
+ // alert(data);
+ },
+ complete: function() {
+ if(codeEtatDemandeRemboursement=="1"){
+ ajax_context_adherent(idBeneficiaire);
+ }else{
+ window.location.assign($("#racineWeb" ).val()+"Historiquedemanderemboursement/");
+
+ }
+ }
+ });
+ }
+}
+
+function creer_dossier_demande_rd()
+{
+ idBeneficiaire = $("#idBeneficiaire").val();
+
+ v_msg="Confirmez-vous la création du dossier de remboursement ?";
+ v_msgEng="Do you confirm the creation of the reimbursement file?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ ajax_context_adherent(idBeneficiaire);
+ }
+}
+
+function ajax_context_adherent(idBeneficiaire)
+{
+ if (idBeneficiaire=="0")
+ {
+ v_msg="Veuillez sélectionner un assuré!";
+ v_msgEng="Please select one person!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ donnees = "idBeneficiaire="+idBeneficiaire;
+ donnees_retour = "";
+
+ $("#div_attente").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcontextadherent/",
+ type : 'post',
+ data: donnees,
+ success: function(data)
+ {
+ window.location.assign($("#racineWeb" ).val()+"Creerdossierclassique/");
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajax_saisir_pass_new_user()
+{
+ codeModeGenerationPass = $("#codeModeGenerationPass").val();
+
+ donnees = 'codeModeGenerationPass='+codeModeGenerationPass;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxsaisirpassnewuser/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_passwd").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ if(codeModeGenerationPass=="0")
+ {
+ $("#nvmdp").focus();
+ }
+ else
+ {
+ $("#btn_enreg").focus();
+ }
+ }
+ });
+}
+
+function creer_user_rh_client()
+{
+ codeUtilisateur = $("#codeUtilisateur").val();
+ codeUtilisateur = codeUtilisateur.trim();
+ codeUtilisateur = supprimer_espace_string(codeUtilisateur);
+ codeUtilisateur = codeUtilisateur.toLowerCase();
+
+ codeModeGenerationPass = $("#codeModeGenerationPass").val();
+ codeModeEnvoiPass = $("#codeModeEnvoiPass").val();
+
+ nom = $("#nom").val();
+ prenoms = $("#prenoms").val();
+ telephone = $("#telephone").val();
+ email = $("#email").val();
+
+ codeProfil = $("#codeProfil").val();
+
+ codeLangue = $("#codeLangueUser").val();
+
+ nvmdp = $("#nvmdp").val();
+ cfnvmdp = $("#cfnvmdp").val();
+
+ if(nom<=" ")
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+
+ alert_ebene(v_msg, v_msgEng);
+ return;
+
+ $("#nom").focus();
+ return;
+ }
+
+
+ if(codeUtilisateur<=" ")
+ {
+ v_msg="Veuillez indiquer le login!";
+ v_msgEng="Please enter the login!";
+
+ alert_ebene(v_msg, v_msgEng);
+ return;
+
+ $("#codeUtilisateur").focus();
+ return;
+ }
+
+
+ if(codeLangue<=" ")
+ {
+ v_msg="Veuillez indiquer la langue!";
+ v_msgEng="Please select the language";
+
+ alert_ebene(v_msg, v_msgEng);
+ return;
+
+ $("#codeLangueUser").focus();
+ return;
+ }
+
+ if (codeProfil<=" ")
+ {
+ v_msg="Le profil utilisateur est obligatoire!";
+ v_msgEng="The user profile is required!";
+
+ alert_ebene(v_msg, v_msgEng);
+ return;
+
+ $("#codeProfil").focus();
+ return;
+ }
+
+
+ if ((codeModeEnvoiPass=="1" || codeModeEnvoiPass=="2") && (telephone <=" ") )
+ {
+ v_msg="Veuillez revoir le téléphone!";
+ v_msgEng="Please review the phone!";
+
+ alert_ebene(v_msg, v_msgEng);
+ return;
+
+ $("#telephone").focus();
+ return;
+ }
+
+ if ((codeModeEnvoiPass=="0" || codeModeEnvoiPass=="2") && (email <=" ") )
+ {
+ v_msg="Veuillez revoir l'adresse mail!";
+ v_msgEng="Please review the email address!";
+
+ alert_ebene(v_msg, v_msgEng);
+ return;
+ }
+
+ if(codeModeGenerationPass=="0")
+ {
+ if(nvmdp<=" ")
+ {
+ v_msg="Veuillez indiquer le mot de passe!";
+ v_msgEng="Please enter the password!";
+
+ alert_ebene(v_msg, v_msgEng);
+ return;
+ }
+
+ if(nvmdp != cfnvmdp)
+ {
+ v_msg="Veuillez confirmer votre mot de passe!";
+ v_msgEng="Please confirm your password!";
+
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#cfnvmdp").focus();
+ return;
+ }
+ }
+
+ if(!verifMailValeur(email))
+ {
+ v_msg="Veuillez revoir l'adresse mail!";
+ v_msgEng="Please review the email address!";
+
+ alert_ebene(v_msg, v_msgEng);
+ $("#email").focus();
+ return;
+ }
+
+ motPass = nvmdp;
+
+ donnees = 'codeUtilisateur='+codeUtilisateur;
+ donnees += '&nom='+nom+'&prenoms='+prenoms;
+ donnees += '&telephone='+telephone+'&email='+email+'&motPass='+motPass;
+ donnees += '&codeLangue='+codeLangue,
+ donnees += '&codeModeGenerationPass='+codeModeGenerationPass;
+ donnees += '&codeModeEnvoiPass='+codeModeEnvoiPass;
+ donnees += '&codeProfil=' + codeProfil;
+
+ v_msg="Confirmez-vous ce nouvel utilisateur?";
+ v_msgEng="Do you confirm this new user?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxuserrhclient/creeruser/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ // $('#div_test_gabarit').html(data);
+ $('#div_unicite_login').html(data);
+ },
+ complete: function()
+ {
+ uniciteLogin = $("#uniciteLogin").val();
+
+ if(uniciteLogin==1)
+ {
+ v_msg="Utilisateur ( "+codeUtilisateur+" ) créé avec succès!";
+ v_msgEng="User ( "+codeUtilisateur+" ) created succssfully!";
+
+ alert_ebene(v_msg, v_msgEng);
+
+ window.location.assign($("#racineWeb" ).val()+"Usersrhclient/");
+ }
+ else
+ {
+ v_msg="Login " + codeUtilisateur +" déjà utilisé!";
+ v_msgEng="Login " + codeUtilisateur +" already in use!";
+
+ alert_ebene(v_msg, v_msgEng);
+ return;
+
+ $("#codeUtilisateur").focus();
+ return;
+ }
+ }
+ });
+ }
+}
+
+function verifMailValeur(v_mail)
+{
+ if (v_mail.length==0)
+ {
+ return true;
+ }
+ else
+ {
+ var regex = /^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$/;
+ if(!regex.test(v_mail))
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+}
+
+function etat_prod_par_emission_syst()
+{
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ $('#div_export_a').html("");
+
+ donnees_retour = "";
+ donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un état!";
+ v_msgEng="Please select a state!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
+
+ $("#div_detail_requete").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function etat_prod_par_emission_syst_export()
+{
+ debutPeriode = $("#debutPeriode").val();
+ finPeriode = $("#finPeriode").val();
+
+ $('#div_export_a').html("");
+
+ donnees_retour = "";
+ donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
+
+ $('#div_export_a').html("");
+
+ codeEtat=$("#codeEtat").val();
+
+ if (codeEtat<=" ")
+ {
+ v_msg="Veuillez sélectionner un état!";
+ v_msgEng="Please select a state!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeEtat").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function imprimer_avenant(idAvenant, lienTexteAvenant)
+{
+ var div_export = $('#div_export_a');
+ div_export.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ donnees_retour = "";
+ donnees = 'idAvenant='+idAvenant;
+
+ v_url = $("#racineWeb").val()+"Ajax"+lienTexteAvenant+"/";
+
+ $.ajax({
+ url: v_url,
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ // donnees_retour = data;
+ div_export.html(data);
+ },
+ complete: function() {
+ // $('#div_export').html(donnees_retour);
+ }
+ });
+}
+
+function exporter_paiement_decompte_cpt()
+{
+ debut=$("#debut").val();
+ fin=$("#fin").val();
+
+ donnees = 'debut='+debut+'&fin='+fin;
+
+ $("#div_detail_paiement_decompte").html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexporterpaiementdecompte/payesdatecpt/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ $("#div_detail_paiement_decompte").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function pop_afficher_selection_reincorporation()
+{
+ var div_selection_assure = $('#div_selection_assure');
+ div_selection_assure.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+ $("#btn_pop").click();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxselectionreincorporation/",
+
+ type : 'post',
+ success: function(data) {
+ div_selection_assure.html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function enregistrer_reincorporation()
+{
+ var div_assure_a_retirer = $('#div_assure_a_retirer');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailretrait/recapituler/",
+ type: 'POST',
+ success: function(data) {
+ div_assure_a_retirer.html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ nbAliment=$("#nbAliment").val();
+
+ alert("enregistrer_reincorporation => nbAliment => "+nbAliment);
+ return;
+
+ if (nbAliment<"1")
+ {
+ v_msg="Veuillez sélectionner les personnes à retirer!";
+ v_msgEng="Please select the people to remove!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous la réincorporation des personnes sélectionnées de cette police?";
+ v_msgEng="Do you confirm the reinstatement of the selected individuals from this police force?";
+
+ if(confirm_ebene(v_msg, v_msgEng))
+ {
+ window.location.assign($("#racineWeb" ).val()+"Fichereincorporation/enregistrerreincorporation/");
+ }
+ }
+ });
+}
+
+function beneficiaire_a_reincorporer(p_choix, p_id_beneficiaire)
+{
+ donnees = 'idBeneficiaire='+p_id_beneficiaire;
+ donnees += '&choix='+p_choix;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxselectionreincorporation/selectionner/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function recapituler_reincorporer()
+{
+ var div_assure_a_retirer = $('#div_assure_a_retirer');
+ div_assure_a_retirer.html('
' + 'Veuillez patienter... / Please wait...' + ' ');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailreincorporation/recapituler/",
+ type: 'POST',
+ success: function(data) {
+ div_assure_a_retirer.html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}