diff --git a/Js/fonctions.js b/Js/fonctions.js
index 1a781b3b..bb7bc621 100755
--- a/Js/fonctions.js
+++ b/Js/fonctions.js
@@ -11075,4 +11075,10767 @@ function requetes_optique()
// Ligne 4
donnees += '&libelleOptique=' + libelleOptique;
- $("#div_detail_requete").html('
' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function requetes_optique_export()
+{
+ $('#div_detail_requete').html('');
+ $('#div_export_a').html("");
+
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ // Ligne 1
+ codePrestataire = $("#codePrestataire").val();
+ dateLivraison1 = $("#dateLivraison1").val();
+ dateLivraison2 = $("#dateLivraison2").val();
+ numeroAdherent = $("#numeroAdherent").val();
+ numeroBeneficiaire = $("#numeroBeneficiaire").val();
+
+ // Ligne 2
+ codeMedecin = $("#codeMedecin").val();
+
+ numeroBonConsultation1 = $("#numeroBonConsultation1").val();
+ numeroBonConsultation2 = $("#numeroBonConsultation2").val();
+
+ numeroBonOptique1 = $("#numeroBonOptique1").val();
+ numeroBonOptique2 = $("#numeroBonOptique2").val();
+
+ numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
+ numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
+
+ codePrestatairePrescription = $("#codePrestatairePrescription").val();
+
+ // Ligne 3
+ adherent = $("#adherent").val();
+ beneficiaire = $("#beneficiaire").val();
+
+ // Ligne 4
+ libelleOptique = $("#libelleOptique").val();
+
+ // FIN champs
+
+ // DEBUT convertir_en_entier
+ numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
+ numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
+
+ numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
+ numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
+
+ numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1);
+ numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2);
+ // FIN convertir_en_entier
+
+ // Ligne 1
+ donnees += 'codePrestataire=' + codePrestataire;
+ donnees += '&dateLivraison1=' + dateLivraison1;
+ donnees += '&dateLivraison2=' + dateLivraison2;
+ donnees += '&numeroAdherent=' + numeroAdherent;
+ donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
+
+ // Ligne 2
+ donnees += '&codeMedecin=' + codeMedecin;
+
+ donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
+ donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
+
+ donnees += '&numeroBonOptique1=' + numeroBonOptique1;
+ donnees += '&numeroBonOptique2=' + numeroBonOptique2;
+
+ donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
+ donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
+
+ donnees += '&codePrestatairePrescription=' + codePrestatairePrescription;
+
+ // Ligne 3
+ donnees += '&adherent=' + adherent;
+ donnees += '&beneficiaire=' + beneficiaire;
+
+ // Ligne 4
+ donnees += '&libelleOptique=' + libelleOptique;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+
+function requetes_assure()
+{
+ $('#div_export').html("");
+ $('#div_export_a').html("");
+
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
+
+ // Ligne 1
+ numeroAdherent = $("#numeroAdherent").val();
+ numeroBeneficiaire = $("#numeroBeneficiaire").val();
+ adherent = $("#adherent").val();
+ beneficiaire = $("#beneficiaire").val();
+
+ // Ligne 2
+ numeroPolice = $("#numeroPolice").val();
+ codeProduit = $("#codeProduit").val();
+ codeEtatPolice = $("#codeEtatPolice").val();
+ codeLienParente = $("#codeLienParente").val();
+ codeEtatBeneficiaire = $("#codeEtatBeneficiaire").val();
+ sexe = $("#sexe").val();
+
+ // Ligne 3
+ numeroClient1 = $("#numeroClient1").val();
+ numeroClient2 = $("#numeroClient2").val();
+ telephonePortableAdherent = $("#telephonePortableAdherent").val();
+ emailAdherent = $("#emailAdherent").val();
+ decede = $("#decede").val();
+ nomClient = $("#nomClient").val();
+
+ // FIN champs
+
+ // DEBUT convertir_en_entier
+ numeroClient1 = convertir_en_entier(numeroClient1);
+ numeroClient2 = convertir_en_entier(numeroClient2);
+ // FIN convertir_en_entier
+
+ // Ligne 1
+ donnees += '&numeroAdherent=' + numeroAdherent;
+ donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
+ donnees += '&adherent=' + adherent;
+ donnees += '&beneficiaire=' + beneficiaire;
+
+ // Ligne 2
+ donnees += '&numeroPolice=' + numeroPolice;
+ donnees += '&codeProduit=' + codeProduit;
+ donnees += '&codeEtatPolice=' + codeEtatPolice;
+ donnees += '&codeLienParente=' + codeLienParente;
+ donnees += '&codeEtatBeneficiaire=' + codeEtatBeneficiaire;
+ donnees += '&sexe=' + sexe;
+
+ // Ligne 3
+ donnees += '&numeroClient1=' + numeroClient1;
+ donnees += '&numeroClient2=' + numeroClient2;
+ donnees += '&telephonePortableAdherent=' + telephonePortableAdherent;
+ donnees += '&emailAdherent=' + emailAdherent;
+ donnees += '&decede=' + decede;
+ donnees += '&nomClient=' + nomClient;
+
+ $("#div_detail_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function(data) {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function requetes_assure_export()
+{
+ $('#div_detail_requete').html('');
+ $('#div_export_a').html("");
+
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ // Ligne 1
+ numeroAdherent = $("#numeroAdherent").val();
+ numeroBeneficiaire = $("#numeroBeneficiaire").val();
+ adherent = $("#adherent").val();
+ beneficiaire = $("#beneficiaire").val();
+
+ // Ligne 2
+ numeroPolice = $("#numeroPolice").val();
+ codeProduit = $("#codeProduit").val();
+ codeEtatPolice = $("#codeEtatPolice").val();
+ codeLienParente = $("#codeLienParente").val();
+ codeEtatBeneficiaire = $("#codeEtatBeneficiaire").val();
+ sexe = $("#sexe").val();
+
+ // Ligne 3
+ numeroClient1 = $("#numeroClient1").val();
+ numeroClient2 = $("#numeroClient2").val();
+ telephonePortableAdherent = $("#telephonePortableAdherent").val();
+ emailAdherent = $("#emailAdherent").val();
+ decede = $("#decede").val();
+ nomClient = $("#nomClient").val();
+
+ // FIN champs
+
+ // DEBUT convertir_en_entier
+ numeroClient1 = convertir_en_entier(numeroClient1);
+ numeroClient2 = convertir_en_entier(numeroClient2);
+ // FIN convertir_en_entier
+
+ // Ligne 1
+ donnees += '&numeroAdherent=' + numeroAdherent;
+ donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
+ donnees += '&adherent=' + adherent;
+ donnees += '&beneficiaire=' + beneficiaire;
+
+ // Ligne 2
+ donnees += '&numeroPolice=' + numeroPolice;
+ donnees += '&codeProduit=' + codeProduit;
+ donnees += '&codeEtatPolice=' + codeEtatPolice;
+ donnees += '&codeLienParente=' + codeLienParente;
+ donnees += '&codeEtatBeneficiaire=' + codeEtatBeneficiaire;
+ donnees += '&sexe=' + sexe;
+
+ // Ligne 3
+ donnees += '&numeroClient1=' + numeroClient1;
+ donnees += '&numeroClient2=' + numeroClient2;
+ donnees += '&telephonePortableAdherent=' + telephonePortableAdherent;
+ donnees += '&emailAdherent=' + emailAdherent;
+ donnees += '&decede=' + decede;
+ donnees += '&nomClient=' + nomClient;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function consulter_limite_avant_facturation()
+{
+ facture=$("#facture").val();
+
+ if (facture==0)
+ {
+ v_msg="Pas encore facturée!";
+ v_msgEng="Not yet charged!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturecons/");
+}
+
+function consulter_limite_avant_facturation_dec()
+{
+ window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturecdec/");
+}
+
+function limite_avant_facture_dec(idFacture)
+{
+ donnees = 'idFacture='+idFacture;
+ $.ajax({
+ url: $("#racineWeb").val()+"AjaxPlafondavantfacturecdec/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_limites").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function afficher_pharmacien()
+{
+ window.location.assign($("#racineWeb" ).val()+"Pharmaciencons/");
+}
+
+function afficher_pharmacien_dec()
+{
+ window.location.assign($("#racineWeb" ).val()+"Pharmaciendec/");
+}
+
+
+function consulter_limite_avant_facturation_pha()
+{
+ window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturephacons/");
+}
+
+function consulter_limite_avant_facturation_pha_dec()
+{
+ window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturephadec/");
+}
+
+
+function imprimer_livraison_bon()
+{
+ var div_wait = $('#div_wait');
+ div_wait.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximprimerlivraisonbons/",
+ type: 'POST',
+ success: function(data)
+ {
+ div_wait.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function convertir_en_entier(valeur)
+{
+ if(isNaN(valeur))
+ {
+ valeur = "0";
+ }
+
+ if (valeur=="")
+ {
+ valeur="0";
+ }
+
+ valeur = parseInt(valeur);
+
+ return valeur;
+}
+
+function verifier_feuille_maladie_dec_opt(donnees)
+{
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxverifierfactureopt/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_verification_facture").html(data);
+ },
+ complete: function() {
+ $("#btn_pop").click();
+ }
+ });
+}
+
+function valider_prestation_opt(idPrestationactes, p_choix)
+{
+ numeroFeuilleMaladie = $("#numeroFeuilleMaladie").val();
+ idFacture = $("#idFacture").val();
+
+ donnees = 'idPrestationactes='+idPrestationactes+"&choix="+p_choix;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxafficherverifierfactureopt/validerprestation/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_verification_facture").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function maj_montantForce_prestation_opt(idPrestationactes, montantForce)
+{
+ donnees = 'idPrestationactes='+idPrestationactes+"&montantForce="+montantForce;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxafficherverifierfactureopt/majmontantforce/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_verification_facture").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function reinit_facture_dec_opt()
+{
+ numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
+ idFacture = $("#idFacture").val();
+
+ donnees = 'idFacture='+idFacture+"&numeroFeuilleMaladie="+numeroFeuilleMaladie;
+
+ v_msg="Confirmez-vous la ré-initialisation?";
+ v_msgEng="Do you confirm the re-initialization?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxafficherverifierfactureopt/reinitfacturedec/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_verification_facture").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function valider_facture_dec_opt()
+{
+ ndPrestNonTraites=$("#ndPrestNonTraites").val();
+
+ if (ndPrestNonTraites>"0")
+ {
+ v_msg="Des prestations non traitées!";
+ v_msgEng="Unprocessed benefits!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
+ idFacture = $("#idFacture").val();
+ codeTypeFacture = $("#codeTypeFacture").val();
+
+ donnees = 'idFacture='+idFacture;
+
+ var ctrl_montantForce = $("#montantForce"+idFacture);
+ var ctrl_montantApayer = $("#montantApayer"+idFacture);
+ var ctrl_montantRedresse = $("#montantRedresse"+idFacture);
+
+ v_msg="Confirmez-vous ces montants?";
+ v_msgEng="Do you confirm these amounts?";
+
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxafficherverifierfactureopt/validerfacturedec/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ montantForce_dec = $("#montantForce_dec").val();
+ montantApayer_dec = $("#montantApayer_dec").val();
+ montantRedresse_dec = $("#montantRedresse_dec").val();
+
+ ctrl_montantForce.html(montantForce_dec);
+
+ c_html = " ";
+
+ ctrl_montantApayer.html(c_html);
+
+ ctrl_montantRedresse.html(montantRedresse_dec);
+
+ $("#btn_close_pop").click();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ afficher_recap_decompte();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+
+}
+
+function verifier_feuille_maladie_dec_opt_cons(donnees)
+{
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxverifierfactureoptcons/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_verification_facture").html(data);
+ },
+ complete: function() {
+ $("#btn_pop").click();
+ }
+ });
+}
+
+function supprimer_empreinte_digitale()
+{
+ finger_id_C=$("#finger_id_C" ).val();
+
+ if(finger_id_C<1)
+ {
+ v_msg="Pas d\'empreinte digitale!";
+ v_msgEng="No fingerprint!";
+ 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 l\'empreinte digitale?";
+ v_msgEng="Do you confirm the deletion of the fingerprint?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ donnees = 'motif='+motif;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxsupprimerempreinte/supprimerempreinte/",
+ type : 'post',
+ data: donnees,
+ success: function(data) {
+ v_msg="Empreinte digitale ré-initialisée avec succès!";
+ v_msgEng="Fingerprint re-initialized successfully!";
+ alert_ebene(v_msg, v_msgEng);
+
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ window.location.assign($("#racineWeb" ).val()+"Supprimerempreinte/");
+ }
+ });
+
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function remboursement_classique()
+{
+ idDemandeRemboursement = $("#idDemandeRemboursement").val();
+
+ if(idDemandeRemboursement > "0"){
+ selectionner_remboursement(idDemandeRemboursement);
+ }else{
+ window.location.assign($("#racineWeb" ).val()+"Remboursementclassique/");
+ }
+}
+
+function creer_dossier_classique_assure()
+{
+ window.location.assign($("#racineWeb" ).val()+"Creerdossierclassique/");
+}
+
+function listerremboursementbeneficiaire()
+{
+ d1=$("#d1").val();
+ d2=$("#d2").val();
+
+ donnees = 'd1='+d1+'&d2='+d2;
+
+ $("#div_dossiers").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxfacturesclassiques/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_dossiers").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function nouvelle_facture_classique()
+{
+ regle=$("#regle").val();
+
+ if (regle==1)
+ {
+ v_msg="Déjà payé!";
+ v_msgEng="Already paid!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ demandeReglement=$("#demandeReglement").val();
+ demandeReglement = parseInt(demandeReglement);
+
+ if (demandeReglement==1)
+ {
+ v_msg="Demande de règlement déjà effectuée!";
+ v_msgEng="Request for payment already made!";
+ alert_ebene(v_msg, v_msgEng);
+
+
+ return;
+ }
+
+ if (appartient_a_un_bordereau_rbcl())
+ {
+ v_msg="Fait partie d'un bordereau!";
+ v_msgEng="Part of a slip!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ window.location.assign($("#racineWeb" ).val()+"Factureclassique/");
+}
+
+
+function enregistrerfacture_classique()
+{
+ codePrestataire = $("#codePrestataire").val();
+ if (codePrestataire<=" ")
+ {
+ v_msg="Veuillez indiquer le prestataire qui a consulté!";
+ v_msgEng="Please indicate the provider who consulted!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#button_popRecherchePrestataire").click();
+ return;
+ }
+
+ prestataire = $("#prestataire").val();
+ if (prestataire<=" ")
+ {
+ v_msg="Veuillez indiquer le prestataire!";
+ v_msgEng="Please indicate the provider!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#prestataire").focus();
+ return;
+ }
+
+ //alert(codePrestataire+'/'+prestataire);
+ //return;
+
+ dateFacture=$("#dateFacture").val();
+
+ if (dateFacture<=" ")
+ {
+ v_msg="Veuillez saisir la date de la facture!";
+ v_msgEng="Please enter the date of the invoice!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateFacture").focus();
+ return;
+ }
+
+ var v_prixActe = $("#prixActe").val();
+ var v_rejet = $("#v_rejet").val();
+ var v_exclu = $("#v_exclu").val();
+
+ if (v_prixActe==0 && v_rejet==0 && v_exclu==0)
+ {
+ v_msg="Rien à enregistrer!";
+ v_msgEng="Nothing to save!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous cette facture?";
+ v_msgEng="Do you confirm this invoice?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ donnees = 'prestataire='+prestataire
+ donnees+='&dateFacture='+dateFacture;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailfactureclassique/validerfactureclassique/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ v_msg="Facture ajoutée avec succès!";
+ v_msgEng="Invoice added successfully!";
+ alert_ebene(v_msg, v_msgEng);
+
+ afficher_dossier_classique();
+ }
+ });
+
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function ajax_maj_tm_facture(tm, controle)
+{
+ donnees = 'tm='+tm;
+
+ tm=tm.replace(",",".");
+ controle.value=tm;
+
+ if(controle_numerique(controle))
+ {
+ enregistrerfacture_classique_temp("0");
+ }
+}
+
+function ajax_maj_prix_acte_classique(idPrestation, valeurActe, controle)
+{
+ valeurActe=valeurActe.replace(/ /g,"");
+ controle.value=valeurActe;
+
+ if(controle_numerique(controle))
+ {
+ donnees = 'idPrestation='+idPrestation+"&valeurActe="+valeurActe;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailfactureclassique/majprix/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_facture").html(data);
+ $(".datepicker").datepicker();
+ //$("#codeMotifRejetPop").selectpicker();
+ //$("#codeMotifExclusionPop").selectpicker();
+ },
+ error: function(data) {
+ },
+ complete: function(data) {
+ alerter_depassement_limite_classique();
+ $("#div_selection_acte").hide();
+ }
+ });
+ }
+}
+
+
+function maj_prix_acte_classique(idPrestation, valeurActe, controle)
+{
+ donnees = 'idPrestation='+idPrestation+"&valeurActe="+valeurActe;
+
+ valeurActe=valeurActe.replace(",",".");
+ controle.value=valeurActe;
+
+ if(controle_numerique(controle))
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmodifierfactureclassique/majprix/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_facture").html(data);
+ $(".datepicker").datepicker();
+ $("#prestataire").selectpicker();
+ },
+ error: function(data) {
+ },
+ complete: function(data) {
+ alerter_depassement_limite_classique();
+ }
+ });
+ }
+}
+
+function valider_facture_classique_temp()
+{
+ enregistrerfacture_classique_temp("1");
+}
+
+function modifier_facture_classique(idFacture){
+
+ prestataire = $("#prestataire").val();
+ dateFacture = $("#dateFacture").val();
+ hospitalisation = $("#hospitalisation").val();
+ observations = $("#observations").val();
+
+
+ donnees = 'prestataire='+prestataire+"&dateFacture="+dateFacture;
+ donnees += '&hospitalisation='+hospitalisation+"&observations="+observations;
+
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmodifierfactureclassique/modifierfacture/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_facture").html(data);
+ $(".datepicker").datepicker();
+ $("#prestataire").selectpicker();
+
+ v_msg="Enregistré avec succès!";
+ v_msgEng="Successfully registered!";
+ alert_ebene(v_msg, v_msgEng);
+ },
+ error: function(data) {
+ },
+ complete: function(data) {
+ alerter_depassement_limite_classique();
+ //consulter_facture_classique(idFacture);
+ window.location.assign($("#racineWeb" ).val()+"Dossierclassique/");
+ }
+ });
+
+}
+
+
+function enregistrerfacture_classique_temp(v_entete)
+{
+
+ codePrestataire = $("#codePrestataire").val();
+
+ /*
+ if (codePrestataire<=" ")
+ {
+ v_msg="Veuillez indiquer le prestataire qui a consulté!";
+ v_msgEng="Please indicate the provider who consulted!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#button_popRecherchePrestataire").click();
+ return;
+ }
+ */
+ prestataire = $("#prestataire").val();
+
+
+ /*if (prestataire<=" ")
+ {
+ v_msg="Veuillez indiquer le prestataire!";
+ v_msgEng="Please indicate the provider!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#prestataire").focus();
+ return;
+ }*/
+
+
+ dateFacture=$("#dateFacture").val();
+
+ if (dateFacture<=" ")
+ {
+ v_msg="Veuillez saisir la date de la facture!";
+ v_msgEng="Please enter the date of the invoice!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateFacture").focus();
+ return;
+ }
+
+ dateEffetPolice = $("#dateEffetPolice_C").val();
+ dateEcheancePolice = $("#dateEcheancePolice_C").val();
+ dateConsultation = $("#dateConsultation").val();
+
+
+
+ //var td0 = new Date(dateEffetPolice);
+ dateEntreeBeneficiaire= $("#dateEntreeBeneficiaire_C").val();
+ var td0 = $("#dateEntreeBeneficiaire").datepicker("getDate");//new Date(dateEntreeBeneficiaire);
+ var td1 = $("#dateConsultation").datepicker("getDate");//new Date(dateConsultation);
+ var td2 = $("#datejourfr_C").datepicker("getDate");
+ var td3 = $("#dateEcheancePolice").datepicker("getDate");//new Date(dateEcheancePolice);
+ var td4 = $("#dateFacture").datepicker("getDate");
+
+ dt0=Math.round(Date.parse(td0)/(1000*3600*24));
+ dt1=Math.round(Date.parse(td1)/(1000*3600*24));
+ dt2=Math.round(Date.parse(td2)/(1000*3600*24));
+ dt3=Math.round(Date.parse(td3)/(1000*3600*24));
+ dt4=Math.round(Date.parse(td4)/(1000*3600*24));
+
+
+ if (dt4dt2)
+ {
+ v_msg="La date des Prestations ne peut être supérieure à la date du jour!";
+ v_msgEng="The date of the Services can not be greater than today";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateConsultation").focus();
+ return;
+ }
+
+ if (dt4>dt3 || dt40)
+ {
+ v_msg="Attention ! Dépassement de limite";
+ v_msgEng="Warning ! Overflow";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+}
+
+
+
+function consulter_facture_classique(idFacture)
+{
+ window.location.assign($("#racineWeb" ).val()+"Consulteractureclassique/"+idFacture+"/");
+}
+
+function consulter_limite_avant_facturation_classique()
+{
+ idFacture=$("#idFacture_C").val();
+
+ if (idFacture==0)
+ {
+ v_msg="Pas encore facturée!";
+ v_msgEng="Not yet charged!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureclassique/");
+}
+
+function retour_facture_classique()
+{
+ idFacture=$("#idFacture_C").val();
+ window.location.assign($("#racineWeb" ).val()+"Consulteractureclassique/"+idFacture+"/");
+}
+
+function payerfactureclassique()
+{
+ regle=$("#regle").val();
+
+ if (regle==1)
+ {
+ v_msg="Déjà payé!";
+ v_msgEng="Already paid!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ window.location.assign($("#racineWeb" ).val()+"Payerfactureclassique/");
+}
+
+
+function ajaxcommissionautre()
+{
+ donnees = "codeApporteur="+$("#codeCommercial").val()+"&codeEtape="+$("#codeEtape").val();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcommissionautre/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#infocommautre").html(data);
+ },
+ complete: function() {
+ $("#tauxCommissionAutre").val( $("#tauxCommissionautre_info").val());
+ }
+ });
+}
+
+function creer_optiontarif()
+{
+ transforme = $("#transforme").val();
+ if (transforme=="1")
+ {
+ v_msg="Cotation déjà transformée!";
+ v_msgEng="Quote already transformed!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous la création d\'une nouvelle option?";
+ v_msgEng="Do you confirm the creation of a new option?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnouvelleoptiontarif/",
+ type : 'post',
+ error: function(errorData) {
+ },
+ success: function(data) {
+
+ },
+ complete: function() {
+ v_msg="Nouvelle option créée avec succès!";
+ v_msgEng="New option created successfully!";
+ alert_ebene(v_msg, v_msgEng);
+
+ // afficher_police_d_id();
+ window.location.assign($("#racineWeb" ).val()+"Fichedevis/");
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+
+}
+
+function actualiser_liste_college_d()
+{
+ numeroOptionTarif = $("#numeroOptionTarif").val();
+
+ donnees = "numeroOptionTarif="+numeroOptionTarif;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistecolleged/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_listecollege").html(data);
+ appliquerDataTable();
+ },
+ complete: function() {
+ }
+ });
+}
+
+function supprimer_option()
+{
+ transforme = $("#transforme").val();
+ if (transforme=="1")
+ {
+ v_msg="Cotation déjà transformée!";
+ v_msgEng="Quote already transformed!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ nbPersonneReel_total = parseInt($("#nbPersonneReel_total").val());
+ if(nbPersonneReel_total > 0)
+ {
+ v_msg="Incorporation d'assurés sur l'option. Suppression impossible!";
+ v_msgEng="Incorporation of policyholders on the option. Cannot delete!";
+
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ numeroOptionTarif = $("#numeroOptionTarif").val();
+
+ donnees = "numeroOptionTarif="+numeroOptionTarif;
+
+ v_msg="Confirmez-vous la suppression de cette option?";
+ v_msgEng="Do you confirm the deletion of this option?";
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistecolleged/supprimeroption/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ v_msg="Option supprimée avec succès!";
+ v_msgEng="Option removed successfully!";
+ alert_ebene(v_msg, v_msgEng);
+
+ afficher_police_d_id();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function texte_cpd()
+{
+ window.location.assign($("#racineWeb" ).val()+"Textecpd/");
+}
+
+function prestataire_en_plus()
+{
+ window.location.assign($("#racineWeb" ).val()+"Prestatairenplus/");
+}
+
+function prestataire_en_moins()
+{
+ window.location.assign($("#racineWeb" ).val()+"Prestatairenmoins/");
+}
+
+
+function ajouter_un_prestataire_en_plus(codePrestataire)
+{
+ donnees = 'codePrestataire='+codePrestataire;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairenplus/ajouterunprestataireenplus/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_complet").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function retirer_un_prestataire_en_plus(idPrestation)
+{
+ donnees = 'idPrestation='+idPrestation;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairenplus/retirer/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_complet").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajax_maj_tm_en_plus(idPrestation, tm, controle)
+{
+ tm=tm.replace(",",".");
+ controle.value=tm;
+
+ donnees = 'idPrestation='+idPrestation+"&tm="+tm;
+
+ if(controle_numerique(controle))
+ {
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairenplus/majtm/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_complet").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+ }
+}
+
+function ajouter_un_prestataire_en_moins(codePrestataire)
+{
+ donnees = 'codePrestataire='+codePrestataire;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairenmoins/ajouterunprestataireenmoins/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_complet").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function retirer_un_prestataire_en_moins(idPrestation)
+{
+ donnees = 'idPrestation='+idPrestation;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairenmoins/retirer/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_complet").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function prestataire_en_plus_cons()
+{
+ window.location.assign($("#racineWeb" ).val()+"Prestatairenpluscons/");
+}
+
+function afficher_prestataire_en_plus()
+{
+ idCollege = $("#idCollege").val();
+
+ donnees = 'idCollege='+idCollege;
+
+
+ $("#div_complet").html('' + '
');
+
+ if(idCollege > "0") {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairenpluscons/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_complet").html(data);
+ //dataTableSpecialeMini();
+ appliquerDataTableMini();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+ }else{
+ $("#div_complet").html('');
+
+ }
+}
+function exporter_liste_assures_sans_format()
+{
+ $('#div_export_assures_sans_format').html('');
+
+ $("#btn_liste_assures_sans_format").click();
+}
+
+//
+
+function requetes_demandederogations()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
+
+ // Ligne 1
+ codePrestataire = $("#codePrestataire").val();
+ dateDemande1 = $("#dateDemande1").val();
+ dateDemande2 = $("#dateDemande2").val();
+ numeroAdherent = $("#numeroAdherent").val();
+ numeroBeneficiaire = $("#numeroBeneficiaire").val();
+
+ // Ligne 2
+ numeroDerogation1 = $("#numeroDerogation1").val();
+ numeroDerogation2 = $("#numeroDerogation2").val();
+
+ // Ligne 3
+ codeDerogation = $("#codeDerogation").val();
+ codeReponseDerogation = $("#codeReponseDerogation").val();
+
+ // Ligne 4
+ adherent = $("#adherent").val();
+ beneficiaire = $("#beneficiaire").val();
+
+ // FIN champs
+
+ // DEBUT convertir_en_entier
+ numeroDerogation1 = convertir_en_entier(numeroDerogation1);
+ numeroDerogation2 = convertir_en_entier(numeroDerogation2);
+
+ // FIN convertir_en_entier
+
+ // Ligne 1
+
+ donnees += 'codePrestataire=' + codePrestataire;
+ donnees += '&dateDemande1=' + dateDemande1;
+ donnees += '&dateDemande2=' + dateDemande2;
+ donnees += '&numeroAdherent=' + numeroAdherent;
+ donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
+
+ // Ligne 2
+ donnees += '&numeroDerogation1=' + numeroDerogation1;
+ donnees += '&numeroDerogation2=' + numeroDerogation2;
+
+ // Ligne 3
+ donnees += '&codeDerogation=' + codeDerogation;
+ donnees += '&codeReponseDerogation=' + codeReponseDerogation;
+
+ // Ligne 4
+ donnees += '&adherent=' + adherent;
+ donnees += '&beneficiaire=' + beneficiaire;
+
+ $("#div_detail_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function requetes_demandederogations_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ // Ligne 1
+ codePrestataire = $("#codePrestataire").val();
+ dateDemande1 = $("#dateDemande1").val();
+ dateDemande2 = $("#dateDemande2").val();
+ numeroAdherent = $("#numeroAdherent").val();
+ numeroBeneficiaire = $("#numeroBeneficiaire").val();
+
+ // Ligne 2
+ numeroDerogation1 = $("#numeroDerogation1").val();
+ numeroDerogation2 = $("#numeroDerogation2").val();
+
+ // Ligne 3
+ codeDerogation = $("#codeDerogation").val();
+ codeReponseDerogation = $("#codeReponseDerogation").val();
+
+ // Ligne 4
+ adherent = $("#adherent").val();
+ beneficiaire = $("#beneficiaire").val();
+
+ // FIN champs
+
+ // DEBUT convertir_en_entier
+ numeroDerogation1 = convertir_en_entier(numeroDerogation1);
+ numeroDerogation2 = convertir_en_entier(numeroDerogation2);
+
+ // FIN convertir_en_entier
+
+ // Ligne 1
+
+ donnees += 'codePrestataire=' + codePrestataire;
+ donnees += '&dateDemande1=' + dateDemande1;
+ donnees += '&dateDemande2=' + dateDemande2;
+ donnees += '&numeroAdherent=' + numeroAdherent;
+ donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
+
+ // Ligne 2
+ donnees += '&numeroDerogation1=' + numeroDerogation1;
+ donnees += '&numeroDerogation2=' + numeroDerogation2;
+
+ // Ligne 3
+ donnees += '&codeDerogation=' + codeDerogation;
+ donnees += '&codeReponseDerogation=' + codeReponseDerogation;
+
+ // Ligne 4
+ donnees += '&adherent=' + adherent;
+ donnees += '&beneficiaire=' + beneficiaire;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+//
+
+function requetes_ententeprealable()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
+
+ // Ligne 1
+ codePrestataire = $("#codePrestataire").val();
+ dateDemande1 = $("#dateDemande1").val();
+ dateDemande2 = $("#dateDemande2").val();
+ numeroAdherent = $("#numeroAdherent").val();
+ numeroBeneficiaire = $("#numeroBeneficiaire").val();
+
+ // Ligne 2
+ numeroEntentePrealable1 = $("#numeroEntentePrealable1").val();
+ numeroEntentePrealable2 = $("#numeroEntentePrealable2").val();
+
+ // Ligne 3
+ codeReponseEntentePrealable = $("#codeReponseEntentePrealable").val();
+
+ // Ligne 4
+ adherent = $("#adherent").val();
+ beneficiaire = $("#beneficiaire").val();
+
+ libelleActe = $("#libelleActe").val();
+ libelleFamilleActe = $("#libelleFamilleActe").val();
+
+ // FIN champs
+
+ // DEBUT convertir_en_entier
+ numeroEntentePrealable1 = convertir_en_entier(numeroEntentePrealable1);
+ numeroEntentePrealable2 = convertir_en_entier(numeroEntentePrealable2);
+
+ // FIN convertir_en_entier
+
+ // Ligne 1
+
+ donnees += 'codePrestataire=' + codePrestataire;
+ donnees += '&dateDemande1=' + dateDemande1;
+ donnees += '&dateDemande2=' + dateDemande2;
+ donnees += '&numeroAdherent=' + numeroAdherent;
+ donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
+
+ // Ligne 2
+ donnees += '&numeroEntentePrealable1=' + numeroEntentePrealable1;
+ donnees += '&numeroEntentePrealable2=' + numeroEntentePrealable2;
+
+ // Ligne 3
+ donnees += '&codeReponseEntentePrealable=' + codeReponseEntentePrealable;
+
+ // Ligne 4
+ donnees += '&libelleActe=' + libelleActe;
+ donnees += '&beneficiaire=' + beneficiaire;
+
+ donnees += '&adherent=' + adherent;
+ donnees += '&libelleFamilleActe=' + libelleFamilleActe;
+
+ $("#div_detail_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function requetes_ententeprealable_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ // Ligne 1
+ codePrestataire = $("#codePrestataire").val();
+ dateDemande1 = $("#dateDemande1").val();
+ dateDemande2 = $("#dateDemande2").val();
+ numeroAdherent = $("#numeroAdherent").val();
+ numeroBeneficiaire = $("#numeroBeneficiaire").val();
+
+ // Ligne 2
+ numeroEntentePrealable1 = $("#numeroEntentePrealable1").val();
+ numeroEntentePrealable2 = $("#numeroEntentePrealable2").val();
+
+ // Ligne 3
+ codeReponseEntentePrealable = $("#codeReponseEntentePrealable").val();
+
+ // Ligne 4
+ adherent = $("#adherent").val();
+ beneficiaire = $("#beneficiaire").val();
+
+ libelleActe = $("#libelleActe").val();
+ libelleFamilleActe = $("#libelleFamilleActe").val();
+
+ // FIN champs
+
+ // DEBUT convertir_en_entier
+ numeroEntentePrealable1 = convertir_en_entier(numeroEntentePrealable1);
+ numeroEntentePrealable2 = convertir_en_entier(numeroEntentePrealable2);
+
+ // FIN convertir_en_entier
+
+ // Ligne 1
+
+ donnees += 'codePrestataire=' + codePrestataire;
+ donnees += '&dateDemande1=' + dateDemande1;
+ donnees += '&dateDemande2=' + dateDemande2;
+ donnees += '&numeroAdherent=' + numeroAdherent;
+ donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
+
+ // Ligne 2
+ donnees += '&numeroEntentePrealable1=' + numeroEntentePrealable1;
+ donnees += '&numeroEntentePrealable2=' + numeroEntentePrealable2;
+
+ // Ligne 3
+ donnees += '&codeReponseEntentePrealable=' + codeReponseEntentePrealable;
+
+ // Ligne 4
+ donnees += '&libelleActe=' + libelleActe;
+ donnees += '&beneficiaire=' + beneficiaire;
+
+ donnees += '&adherent=' + adherent;
+ donnees += '&libelleFamilleActe=' + libelleFamilleActe;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function statistiques()
+{
+ window.location.assign($("#racineWeb" ).val()+"Initstatistiques/");
+}
+
+function initierstatistiques()
+{
+ dateAnalyse = $("#dateAnalyse").val();
+ debutArchivageFr = $("#debutArchivageFr").val();
+
+ if (dateAnalyse<=" ")
+ {
+ v_msg="Veuillez indiquer une date!";
+ v_msgEng="Please enter a date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateAnalyse").focus();
+ return;
+ }
+
+ donnees = 'dateAnalyse='+dateAnalyse;
+
+ var td0 = $("#datejourfr_C").datepicker("getDate");
+ var td1 = $("#dateAnalyse").datepicker("getDate");
+ var td2 = $("#debutArchivageFr").datepicker("getDate");
+
+ dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // datejourfr_C
+ dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse
+ td2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutArchivageFr
+
+ if ((dt1==dt0))
+ {
+ v_msg="Journée non ecore archivée!";
+ v_msgEng="No archived day!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if ((dt1>dt0))
+ {
+ v_msg="Date trop grande!";
+ v_msgEng="Date too big!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ // /* mis en commentaire le 28/08/2018 pour les tests
+ if ((dt1dt0))
+ {
+ v_msg="Date trop grande!";
+ v_msgEng="Date too big!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxinitstat/initstat/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ afficherstatnonarchives();
+ }
+ });
+}
+
+function afficherstat()
+{
+ window.location.assign($("#racineWeb" ).val()+"Statistiques/");
+}
+
+
+function afficherstatnonarchives()
+{
+ window.location.assign($("#racineWeb" ).val()+"Statistiquesnonarchives/");
+}
+
+function reinitialiser_prestataire()
+{
+ $("#codePrestataire").val("");
+ $("#nomPrestataire").html("Tous / Rechercher Prestataire ...");
+ $("#close_pop").click();
+}
+
+function ctrlkeypress_prestataire(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ afficher_pop_recherche_prestataire();
+ }
+}
+
+
+function ctrlkeypress_prestataire3(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ afficher_pop_recherche_prestataire_enplus();
+ }
+}
+
+function ctrlkeypress_prestataire4(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ afficher_pop_recherche_prestataire_enmoins();
+ }
+}
+
+
+function reinitialiser_prestataire3()
+{
+ afficher_pop_recherche_prestataire_enplus();
+
+
+}
+
+function reinitialiser_prestataire4()
+{
+ afficher_pop_recherche_prestataire_enmoins();
+
+
+}
+
+function afficher_pop_recherche_prestataire_enplus()
+{
+ codesearch = $("#codesearch").val();
+ nomsearch = $("#nomsearch").val();
+
+ if(codesearch+nomsearch<=" "){
+ valid = 0;
+ }else{
+ valid = 1;
+ }
+
+ donnees = "valid="+valid+"&codesearch="+codesearch+"&nomsearch="+nomsearch;
+
+ $("#div_listeprestataires").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteprestatairesenplus/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_listeprestataires").html(data);
+ }
+ });
+}
+
+
+function afficher_pop_recherche_prestataire_enmoins()
+{
+ codesearch = $("#codesearch2").val();
+ nomsearch = $("#nomsearch2").val();
+
+ if(codesearch+nomsearch<=" "){
+ valid = 0;
+ }else{
+ valid = 1;
+ }
+
+ donnees = "valid="+valid+"&codesearch="+codesearch+"&nomsearch="+nomsearch;
+
+ //alert(donnees);
+ //return;
+
+ $("#div_listeprestataires2").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteprestatairesenmoins/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_listeprestataires2").html(data);
+ }
+ });
+}
+
+function selectionner_prestataire(codePrestataire, nomPrestataire)
+{
+
+
+ $("#codePrestataire").val(codePrestataire);
+ $("#nomPrestataire").html(nomPrestataire);
+
+ $("#prestataire").val(nomPrestataire);
+
+ //alert(codePrestataire+'/'+nomPrestataire);
+ //return;
+ enregistrerfacture_classique_prestataire(codePrestataire, nomPrestataire);
+
+ $("#close_pop").click();
+
+}
+
+function enregistrerfacture_classique_prestataire(codePrestataire, prestataire)
+{
+
+
+ $("#codePrestataire").val(codePrestataire);
+ $("#prestataire").val(prestataire);
+
+ donnees = "codePrestataire="+codePrestataire+"&prestataire="+prestataire;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailfactureclassique/modifierprestatairefacture/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_prestataire").html(data);
+ },
+ complete: function() {
+
+ }
+ });
+
+}
+
+function enregistrerfacture_classique_date()
+{
+
+ enregistrerfacture_classique_temp("0");
+
+}
+
+// 2
+
+function reinitialiser_prestataire2()
+{
+ $("#codePrestataire").val("");
+ $("#nomPrestataire").html("Tous / Rechercher Prestataire ...");
+ $("#close_pop2").click();
+}
+
+function ajouter_prestatairesenplus(codePrestataire)
+{
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxajouterprestatairesenplus/",
+ type : 'post',
+ data: 'codePrestataire='+codePrestataire,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_prestataires_en_plus").html(data);
+ //dataTableSpecialeMini();
+ }
+ });
+
+ $("#close_pop").click();
+}
+
+function ajouter_prestatairesenmoins(codePrestataire)
+{
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxajouterprestatairesenmoins/",
+ type : 'post',
+ data: 'codePrestataire='+codePrestataire,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_prestataires_en_moins").html(data);
+ //dataTableSpecialeMini();
+ }
+ });
+
+ $("#close_pop2").click();
+}
+
+function ctrlkeypress_prestataire2(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ afficher_pop_recherche_prestataire2();
+ }
+}
+
+function afficher_pop_recherche_prestataire()
+{
+ codesearch = $("#codesearch").val();
+ nomsearch = $("#nomsearch").val();
+
+ if(codesearch+nomsearch<=" ")
+ return;
+
+ donnees = "valid=1&codesearch="+codesearch+"&nomsearch="+nomsearch;
+
+ $("#div_listeprestataires").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteprestataires/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_listeprestataires").html(data);
+ }
+ });
+}
+
+function afficher_pop_recherche_prestataire2()
+{
+ codesearch = $("#codesearch2").val();
+ nomsearch = $("#nomsearch2").val();
+
+ if(codesearch+nomsearch<=" ")
+ return;
+
+ donnees = "valid=1&codesearch="+codesearch+"&nomsearch="+nomsearch;
+
+ $("#div_listeprestataires").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteprestatairesb/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_listeprestataires").html(data);
+ }
+ });
+}
+
+function selectionner_prestataire2(codePrestataire, nomPrestataire)
+{
+ $("#codePrestataire").val(codePrestataire);
+ $("#nomPrestataire").html(nomPrestataire);
+ $("#close_pop2").click();
+}
+
+function prestataire_tm()
+{
+ window.location.assign($("#racineWeb" ).val()+"Prestatairetm/");
+}
+
+function ajouter_un_prestataire_tm(codePrestataire)
+{
+ var idCollege = $('#idCollege').val();
+
+
+ donnees = 'codePrestataire='+codePrestataire+'&idCollege='+idCollege;
+
+ //alert(donnees);
+ //return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairetm/ajouterunprestatairetm/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ //$("#div_complet").html(data);
+ afficher_prestataire_tm();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function retirer_un_prestataire_tm(idPrestation)
+{
+ donnees = 'idPrestation='+idPrestation;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairetm/retirer/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ //$("#div_complet").html(data);
+ afficher_prestataire_tm();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajax_maj_tm_tm(idPrestation, tm, controle)
+{
+
+ tm=tm.replace(",",".");
+ controle.value=tm;
+
+ donnees = 'idPrestation='+idPrestation+"&tm="+tm;
+
+ if(controle_numerique(controle))
+ {
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairetm/majtm/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ //$("#div_complet").html(data);
+ //afficher_prestataire_tm();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+ }
+}
+
+function prestataire_tm_cons()
+{
+ window.location.assign($("#racineWeb" ).val()+"Prestatairetmcons/");
+}
+
+function afficher_prestataire_tm()
+{
+ idCollege = $("#idCollege").val();
+
+ if(idCollege<=' ')
+ {
+ v_msg="Veuillez sélectionner un collège!";
+ v_msgEng="Please select an insurance college!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idCollege").focus();
+ return;
+ }
+
+ var div_attente = $('#div_complet');
+
+
+ div_attente.html('' + '
');
+
+
+ donnees = 'idCollege='+idCollege;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestatairetm/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ div_attente.html(data);
+ appliquerDataTable();
+ //$("#codeGarantie").selectpicker();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function de_archiver_garantie_college(idCollege)
+{
+ contratFacture=$("#contratFacture").val();
+ if (contratFacture=="1")
+ {
+ v_msg="Contrat déjà facturé!";
+ v_msgEng="Contract already billed!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ contratConsomme=$("#contratConsomme").val();
+ if (contratConsomme=="1")
+ {
+ v_msg="Contrat déjà consommé!";
+ v_msgEng="Contract already consumed";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ codeTypeAvenant=$("#codeTypeAvenant").val();
+
+ if (codeTypeAvenant!="REN" && codeTypeAvenant!="AFN" && codeTypeAvenant!="CHE")
+ {
+ v_msg="Opréation impossible à causes des avenants au contrat!";
+ v_msgEng="Impossible operation due to the state of the contract!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous l'invalidation de ce collège?";
+ v_msgEng="Do you confirm the invalidation of this college?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcollege/desarchivergarntie/",
+ type : 'post',
+ data: "idCollege="+idCollege,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function()
+ {
+ college_police();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function ajaxentetestat()
+{
+ 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()+"Ajaxetatentete"+codeEtat+"/";
+
+ $("#div_ente_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_ente_requete").html(data);
+ $(".datepicker" ).datepicker();
+
+ $(".selectpicker").selectpicker();
+
+ }
+ });
+}
+
+function ajaxentetestatmaladiepolicemontantreferent() {
+ ////////
+ 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 (dt2 < dt0 || dt2 > dt1) {
+ 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 < dt0) {
+ 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 < dt2) {
+ v_msg = "Revoir les bornes de la période!";
+ v_msgEng = "Review the boundaries of the period!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ debutStat = $("#debutStat").val();
+ finStat = $("#finStat").val();
+
+ idPolice = $("#idPolice").val();
+
+ codeGcAssureur = $("#codeGcAssureur").val();
+
+
+ $('#div_export_a').html("");
+
+ donnees = 'debutStat=' + debutStat + "&finStat=" + finStat + "&idPolice=" + idPolice + "&codeGcAssureur=" + codeGcAssureur;
+
+
+ v_url = $("#racineWeb").val() + "Ajaxetatentetestatsmaladiepolice/calculermontantreferent/";
+
+ $("#div_ente_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type: 'post',
+ data: donnees,
+ error: function (errorData) {
+ },
+ success: function (data) {
+ $("#div_ente_requete").html(data);
+ $(".datepicker").datepicker();
+ $("#codeGcAssureur").selectpicker();
+ $("#idPolice").selectpicker();
+ filtrespolicegarant();
+
+ }
+ });
+}
+
+function etat_cumul_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' + '');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ appliquerDataTable();
+ }
+ });
+}
+
+
+function etat_cumul_prestataire_export()
+{
+ 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' + '');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+// factures cleints
+
+function requetes_factures_client()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
+
+ // Ligne 1
+ codePrestataire = $("#codePrestataire").val();
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+ numeroAdherent = $("#numeroAdherent").val();
+ numeroBeneficiaire = $("#numeroBeneficiaire").val();
+
+ // Ligne 2
+ numeroBonConsultation1 = $("#numeroBonConsultation1").val();
+ numeroBonConsultation2 = $("#numeroBonConsultation2").val();
+
+ numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
+ numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
+
+ numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val();
+ numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val();
+
+ numeroBonOptique1 = $("#numeroBonOptique1").val();
+ numeroBonOptique2 = $("#numeroBonOptique2").val();
+
+ // Ligne 3
+ codeTypePrestataire = $("#codeTypePrestataire").val();
+ numeroDecompte1 = $("#numeroDecompte1").val();
+ numeroDecompte2 = $("#numeroDecompte2").val();
+ hospitalisation = $("#hospitalisation").val();
+ numeroChambre = $("#numeroChambre").val();
+ chirurgie = $("#chirurgie").val();
+
+ // Ligne 4
+ adherent = $("#adherent").val();
+ beneficiaire = $("#beneficiaire").val();
+
+ // FIN champs
+
+ // DEBUT convertir_en_entier
+ numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
+ numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
+
+ numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
+ numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
+
+ numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
+ numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
+
+ numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1);
+ numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2);
+ // FIN convertir_en_entier
+
+ // Ligne 1
+ donnees += 'codePrestataire=' + codePrestataire;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+ donnees += '&numeroAdherent=' + numeroAdherent;
+ donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
+
+ // Ligne 2
+ donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
+ donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
+
+ donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
+ donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
+
+ donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1;
+ donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2;
+
+ donnees += '&numeroBonOptique1=' + numeroBonOptique1;
+ donnees += '&numeroBonOptique2=' + numeroBonOptique2;
+
+ // Ligne 3
+ donnees += '&codeTypePrestataire=' + codeTypePrestataire;
+
+ donnees += '&numeroDecompte1=' + numeroDecompte1;
+ donnees += '&numeroDecompte2=' + numeroDecompte2;
+
+ donnees += '&hospitalisation=' + hospitalisation;
+ donnees += '&numeroChambre=' + numeroChambre;
+ donnees += '&chirurgie=' + chirurgie;
+
+ // Ligne 4
+ donnees += '&adherent=' + adherent;
+ donnees += '&beneficiaire=' + beneficiaire;
+
+ $("#div_detail_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function requetes_factures_client_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ // Ligne 1
+ codePrestataire = $("#codePrestataire").val();
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+ numeroAdherent = $("#numeroAdherent").val();
+ numeroBeneficiaire = $("#numeroBeneficiaire").val();
+
+ // Ligne 2
+ numeroBonConsultation1 = $("#numeroBonConsultation1").val();
+ numeroBonConsultation2 = $("#numeroBonConsultation2").val();
+
+ numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
+ numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
+
+ numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val();
+ numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val();
+
+ numeroBonOptique1 = $("#numeroBonOptique1").val();
+ numeroBonOptique2 = $("#numeroBonOptique2").val();
+
+ // Ligne 3
+ codeTypePrestataire = $("#codeTypePrestataire").val();
+ numeroDecompte1 = $("#numeroDecompte1").val();
+ numeroDecompte2 = $("#numeroDecompte2").val();
+ hospitalisation = $("#hospitalisation").val();
+ numeroChambre = $("#numeroChambre").val();
+ chirurgie = $("#chirurgie").val();
+
+ // Ligne 4
+ adherent = $("#adherent").val();
+ beneficiaire = $("#beneficiaire").val();
+ // FIN champs
+
+ // DEBUT convertir_en_entier
+ numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
+ numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
+
+ numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
+ numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
+
+ numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
+ numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
+
+ numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1);
+ numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2);
+ // FIN convertir_en_entier
+
+ // Ligne 1
+ donnees += 'codePrestataire=' + codePrestataire;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+ donnees += '&numeroAdherent=' + numeroAdherent;
+ donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
+
+ // Ligne 2
+ donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
+ donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
+
+ donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
+ donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
+
+ donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1;
+ donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2;
+
+ donnees += '&numeroBonOptique1=' + numeroBonOptique1;
+ donnees += '&numeroBonOptique2=' + numeroBonOptique2;
+
+ // Ligne 3
+ donnees += '&codeTypePrestataire=' + codeTypePrestataire;
+
+ donnees += '&numeroDecompte1=' + numeroDecompte1;
+ donnees += '&numeroDecompte2=' + numeroDecompte2;
+
+ donnees += '&hospitalisation=' + hospitalisation;
+ donnees += '&numeroChambre=' + numeroChambre;
+ donnees += '&chirurgie=' + chirurgie;
+
+ // Ligne 4
+ donnees += '&adherent=' + adherent;
+ donnees += '&beneficiaire=' + beneficiaire;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+//
+
+function etat_cumul_type_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' + '');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function etat_cumul_type_prestataire_export()
+{
+ 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' + '');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function etat_detail_facture_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+// cumul par mois
+
+function etat_cumul_mois()
+{
+ 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' + '');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function etat_cumul_mois_export()
+{
+ 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' + '');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+
+// raport SP
+
+function etat_rapport_sp_exo()
+{
+ $('#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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function etat_rapport_sp_exo_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+//
+
+function etat_rapport_sp()
+{
+ $('#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;
+ }
+
+ codeGcAssureur = $("#codeGcAssureur").val();
+
+ if (codeGcAssureur<=" ")
+ {
+ v_msg="Veuillez sélectionner un garant!";
+ v_msgEng="Please select a guarantor!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGcAssureur").focus();
+ return;
+ }
+
+ donnees = "codeGcAssureur="+codeGcAssureur;
+ donnees_retour = "";
+
+ v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/";
+
+ $("#div_detail_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function etat_rapport_sp_export()
+{
+ $('#div_export_a').html("");
+
+ 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;
+ }
+
+ codeGcAssureur = $("#codeGcAssureur").val();
+
+ if (codeGcAssureur<=" ")
+ {
+ v_msg="Veuillez sélectionner un garant!";
+ v_msgEng="Please select a guarantor!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGcAssureur").focus();
+ return;
+ }
+
+ donnees = "codeGcAssureur="+codeGcAssureur;
+
+ v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"export/";
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function charger_detail_stat_prestataire()
+{
+ $('#div_export_b').html("");
+ codePrestataire = $("#codePrestataire").val();
+ donnees = "codePrestataire="+codePrestataire;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxrequetefactureprestataire/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+function afficher_detail_stat_prestataire(codePrestataire)
+{
+ $('#div_export_b').html("");
+ $("#codePrestataire").val(codePrestataire);
+ $("#btn_pop_detail").click();
+}
+
+
+function afficher_detail_stat_type_prestataire(codeTypePrestataire)
+{
+ $('#div_export_b').html("");
+ $("#codeTypePrestataire").val(codeTypePrestataire);
+ $("#btn_pop_detail").click();
+}
+
+function charger_detail_stat_type_prestataire()
+{
+ $('#div_export_b').html("");
+ codeTypePrestataire = $("#codeTypePrestataire").val();
+ donnees = "codeTypePrestataire="+codeTypePrestataire;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxrequetefacturetypeprestataire/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+
+function afficher_detail_stat_prestataire_mois(codePrestataire, mois)
+{
+ $('#div_export_b').html("");
+ $("#codePrestataire").val(codePrestataire);
+ $("#mois").val(mois);
+ $("#btn_pop_detail").click();
+}
+
+function charger_detail_stat_prestataire_mois()
+{
+ $('#div_export_b').html("");
+
+ codePrestataire = $("#codePrestataire").val();
+ mois = $("#mois").val();
+
+ donnees = "codePrestataire="+codePrestataire+"&mois="+mois;
+
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxrequetefactureprestatairemois/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+function maj_date_sortie()
+{
+ 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()+"Majdatesortie/");
+}
+
+function enregistrer_maj_date_sortie()
+{
+ codeEtatBeneficiaire=$("#codeEtatBeneficiaire").val();
+
+ motifSortie=$("#motifSortie").val();
+
+ if (motifSortie<" ")
+ {
+ v_msg="Veuillez indiquer le motif!";
+ v_msgEng="Please enter the reason!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous ce changement?";
+ v_msgEng="Do you confirm this change?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $("#btn_enreg").click();
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function etat_rapport_sp_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function etat_rapport_sp_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function etat_rapport_sp_pol_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function etat_rapport_sp_pol_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+// etat DG
+
+function etat_rapport_sp_pol_cat_det()
+{
+ $('#div_export_a').html("");
+ donnees = "codeProduit="+$("#codeProduit").val();
+ 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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+
+function etat_rapport_sp_pol_cat_det_export()
+{
+
+ $('#div_export_a').html("");
+ donnees = "codeProduit="+$("#codeProduit").val();
+ 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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function saisirefacdecompte()
+{
+ idSaisieDecompte = $("#idSaisieDecompte" ).val();
+ lienPrestation_C = $("#lienPrestation_C" ).val();
+ lienProduction_C = $("#lienProduction_C" ).val();
+
+ //
+ v_url = lienPrestation_C+"/Connexiondecompte/"+idSaisieDecompte;
+
+ if (idSaisieDecompte>"")
+ {
+ window.location.assign(v_url);
+ }
+}
+
+// etat 10
+
+function etat_rapport_sp_cat_det()
+{
+ $('#div_export_a').html("");
+ donnees = "codeProduit="+$("#codeProduit").val();
+ 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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function etat_rapport_sp_cat_det_export()
+{
+ $('#div_export_a').html("");
+ donnees = "codeProduit="+$("#codeProduit").val();
+ 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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function creer_substitut_non_assure()
+{
+ v_msg="Confirmez-vous la substitution?";
+ v_msgEng="Do you confirm the substitution?";
+
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ nomSubstitut = $("#nomSubstitut").val();
+ prenomsSubstitut = $("#prenomsSubstitut").val();
+ codeLienSubstitut = $("#codeLienSubstitut").val();
+ codeNaturePiece = $("#codeNaturePiece").val();
+ numeroPieceSubstitut = $("#numeroPieceSubstitut").val();
+ sexeSubstitut = $("#sexeSubstitut").val();
+ dateNaissanceSubstitut = $("#dateNaissanceSubstitut").val();
+ telephonePortableSubstitut = $("#telephonePortableSubstitut").val();
+
+ donnees = "nomSubstitut="+nomSubstitut;
+ donnees += "&prenomsSubstitut="+prenomsSubstitut;
+
+ donnees += "&codeLienSubstitut="+codeLienSubstitut;
+ donnees += "&codeNaturePiece="+codeNaturePiece;
+ donnees += "&numeroPieceSubstitut="+numeroPieceSubstitut;
+ donnees += "&sexeSubstitut="+sexeSubstitut;
+ donnees += "&dateNaissanceSubstitut="+dateNaissanceSubstitut;
+ donnees += "&telephonePortableSubstitut="+telephonePortableSubstitut;
+
+ $.ajax({
+
+ url: $("#racineWeb").val()+"Ajaxsubstitutnonassure/creersubstitutnonassure/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ v_msg="Substitut créé avec succès!";
+ v_msgEng="Substitute successfully created!";
+ alert_ebene(v_msg, v_msgEng);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ prestations();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+
+function supprimer_substitut_non_assure()
+{
+ idSubstitut = $("#idSubstitut_C").val();
+
+ v_msg="Confirmez-vous la suppression du substitut?";
+ v_msgEng="Do you confirm the removal of the substitute?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ let motifSortie = "";
+
+ let v_msg = "Supprimé pour quel motif?";
+ let v_msgEng = "Deleted for what reason?";
+
+ prompt_ebene(v_msg, v_msgEng, "", function(motifSortie) {
+ if (motifSortie<=" ")
+ {
+ v_msg="Vous devez saisir un motif!";
+ v_msgEng="You have to enter a reason!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ let donnees = 'idSubstitut='+idSubstitut;
+ donnees += '&motifSortie=' + encodeURIComponent(motifSortie);
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxsubstitutnonassure/supprimersubstitutnonassure/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ v_msg="Substitut supprimé avec succès!";
+ v_msgEng="Substitute successfully removed!";
+ alert_ebene(v_msg, v_msgEng);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ prestations();
+ }
+ });
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+// Polices non renouvellées
+
+function etat_polices_non_renouvellees()
+{
+ $('#div_export_a').html("");
+
+ donnees = "codeProduit="+$("#codeProduit").val();
+ 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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function etat_polices_non_renouvellees_export()
+{
+ $('#div_export_a').html("");
+
+ donnees = "codeProduit="+$("#codeProduit").val();
+ 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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function maj_plafond_gar_opt(idGarantie, plafond, controle)
+{
+ if(controle_numerique(controle))
+ {
+ donnees = 'idGarantie='+idGarantie+"&plafond="+plafond;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxgarantiescollege/majplafondopt/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#div_garanties").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ controle.focus();
+ }
+ });
+ }
+}
+
+function derogation_medicament()
+{
+ window.location.assign($("#racineWeb" ).val()+"Derogationmedicement/");
+}
+
+
+function refuser_derogation_medicament(idCollege)
+{
+ v_msg="Confirmez-vous ce refus?";
+ v_msgEng="Do you confirm this refusal?";
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcollege/refuserderogationmedicament/",
+ type : 'post',
+ data: "idCollege="+idCollege,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function()
+ {
+ derogation_medicament();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+
+function accorder_derogation_medicament(idCollege)
+{
+ v_msg="Confirmez-vous cet accord?";
+ v_msgEng="Do you confirm this agreement?";
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcollege/accorderderogationmedicament/",
+ type : 'post',
+ data: "idCollege="+idCollege,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function()
+ {
+ derogation_medicament();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+
+function afficher_detail_stat_police(idPolice, emailRapport, emailGarant)
+{
+ $('#div_export_b').html("");
+ $("#idPolice").val(idPolice);
+ $("#emailRapport_0").val(emailRapport);
+ $("#emailGarant").val(emailGarant);
+ $("#emailRapport").val(emailRapport+';'+emailGarant);
+
+ $("#btn_pop_detail").click();
+}
+
+function charger_detail_stat_police()
+{
+ $('#div_export_b').html("");
+ idPolice = $("#idPolice").val();
+ donnees = "idPolice="+idPolice;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportsp/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+function charger_detail_stat_police_pdf()
+{
+ $('#div_export_b').html("");
+ idPolice = $("#idPolice").val();
+ donnees = "idPolice="+idPolice;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportsppdf/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+function charger_detail_stat_police_facture()
+{
+ $('#div_export_b').html("");
+ idPolice = $("#idPolice").val();
+ donnees = "idPolice="+idPolice;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportspfacture/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+
+function charger_detail_stat_police_garantie()
+{
+ $('#div_export_b').html("");
+ idPolice = $("#idPolice").val();
+ donnees = "idPolice="+idPolice;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportspgarantie/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+
+function charger_detail_stat_police_facture_pdf()
+{
+
+ $('#div_export_b').html("");
+ idPolice = $("#idPolice").val();
+ donnees = "idPolice="+idPolice;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportspfacturepdf/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+
+function charger_detail_stat_police_garantie_pdf()
+{
+ $('#div_export_b').html("");
+ idPolice = $("#idPolice").val();
+ donnees = "idPolice="+idPolice;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportspgarantiepdf/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+function de_archiver_adherent(idAherent)
+{
+ v_msg="Confirmez-vous le désarchivage de cette famille?";
+ v_msgEng="Do you confirm the unarchiving of this family?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcollege/desarchiveradherent/",
+ type : 'post',
+ data: "idAherent="+idAherent,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function()
+ {
+ adherents_police();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function archiver_adherent(idAherent)
+{
+ v_msg="Confirmez-vous l\'archivage de cette famille?";
+ v_msgEng="Do you confirm the archiving of this family?";
+
+ /*
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ window.location.assign($("#racineWeb" ).val()+"Fichelimiteadditionnelle/enregistrerlimiteadditionnelle/");
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+ */
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcollege/archiveradherent/",
+ type : 'post',
+ data: "idAherent="+idAherent,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function()
+ {
+ adherents_police();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function archiver_adherent_fiche(idAherent)
+{
+ v_msg="Confirmez-vous l\'archivage de cette famille?";
+ v_msgEng="Do you confirm the archiving of this family?";
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcollege/archiveradherent/",
+ type : 'post',
+ data: "idAherent="+idAherent,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function()
+ {
+ afficher_adherent_id();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function de_archiver_adherent_fiche(idAherent)
+{
+ v_msg="Confirmez-vous le désarchivage de cette famille?";
+ v_msgEng="Do you confirm the unarchiving of this family?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcollege/desarchiveradherent/",
+ type : 'post',
+ data: "idAherent="+idAherent,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function()
+ {
+ afficher_adherent_id();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function archiver_beneficiaire(idBeneficiaire)
+{
+ v_msg="Confirmez-vous l\'archivage de cette personne?";
+ v_msgEng="Do you confirm the archiving of this person?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcollege/archiverbeneficiaire/",
+ type : 'post',
+ data: "idBeneficiaire="+idBeneficiaire,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function()
+ {
+ afficher_adherent_id();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function de_archiver_beneficiaire(idBeneficiaire)
+{
+ v_msg="Confirmez-vous le désarchivage de cette personne?";
+ v_msgEng="Do you confirm the unarchiving of this person?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcollege/desarchiverbeneficiaire/",
+ type : 'post',
+ data: "idBeneficiaire="+idBeneficiaire,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function()
+ {
+ afficher_adherent_id();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function afficher_lite_prestataire()
+{
+ donnees = "";
+ donnees_retour = "";
+
+
+ codeTypePrestataire = $("#codeTypePrestataire").val();
+ categoriePresataire = $("#categoriePresataire").val();
+ libelle = $("#libelle").val();
+
+ codePays = $("#codePays").val();
+ codeVille = $("#codeVille").val();
+ codeLocalite = $("#codeLocalite").val();
+
+ donnees += 'codeTypePrestataire=' + codeTypePrestataire;
+ donnees += '&categoriePresataire=' + categoriePresataire;
+ donnees += '&libelle=' + libelle;
+
+ donnees += '&codePays=' + codePays;
+ donnees += '&codeVille=' + codeVille;
+ donnees += '&codeLocalite=' + codeLocalite;
+
+ $("#div_liste_prestataire").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteprestataireparametrage/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_liste_prestataire").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function afficher_lite_prestataire_lot()
+{
+ donnees = "";
+ donnees_retour = "";
+
+
+ codeTypePrestataire = $("#codeTypePrestataire").val();
+ categoriePresataire = $("#categoriePresataire").val();
+ libelle = $("#libelle").val();
+
+ codePays = $("#codePays").val();
+ codeVille = $("#codeVille").val();
+ codeLocalite = $("#codeLocalite").val();
+
+ donnees += 'codeTypePrestataire=' + codeTypePrestataire;
+ donnees += '&categoriePresataire=' + categoriePresataire;
+ donnees += '&libelle=' + libelle;
+
+ donnees += '&codePays=' + codePays;
+ donnees += '&codeVille=' + codeVille;
+ donnees += '&codeLocalite=' + codeLocalite;
+
+ $("#div_liste_prestataire").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteprestataireparlot/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_liste_prestataire").html(donnees_retour);
+ $("#nbligne").val("Lignes Filtrées : "+$("#nbligne_info").val());
+ dataTableSpeciale();
+ }
+ });
+}
+
+
+function selection_prestataire_lot()
+{
+ var nbcoche = $('#nbcoche').val();
+
+
+ donnees = "";
+ donnees_retour = "";
+
+
+
+ codeTypePrestataire = $("#codeTypePrestataire").val();
+ categoriePresataire = $("#categoriePresataire").val();
+ libelle = $("#libelle").val();
+
+ codePays = $("#codePays").val();
+ codeVille = $("#codeVille").val();
+ codeLocalite = $("#codeLocalite").val();
+
+ donnees += 'codeTypePrestataire=' + codeTypePrestataire;
+ donnees += '&categoriePresataire=' + categoriePresataire;
+ donnees += '&libelle=' + libelle;
+
+ donnees += '&codePays=' + codePays;
+ donnees += '&codeVille=' + codeVille;
+ donnees += '&codeLocalite=' + codeLocalite;
+
+ $("#div_liste_prestataire").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteprestataireparlot/selectionnetout/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_liste_prestataire").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ dataTableSpeciale();
+ }
+ });
+}
+
+function afficher_prestataire_id(idPrestataire)
+{
+ window.location.assign($("#racineWeb" ).val()+"Ficheprestataire/"+idPrestataire+"/");
+}
+
+function modifier_prestataire()
+{
+ idPrestataire = $("#idPrestataire" ).val();
+
+ if (idPrestataire>"0")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Modifierprestataire/"+idPrestataire+"/");
+ }
+}
+
+function enregistrer_modif_prestataire()
+{
+ idPrestataire = $("#idPrestataire").val();
+ libelle = $("#libelle").val();
+ codeTypePrestataire = $("#codeTypePrestataire").val();
+ categoriePresataire = $("#categoriePresataire").val();
+ codeTarifActe = $("#codeTarifActe").val();
+ codeTarifMedicament = $("#codeTarifMedicament").val();
+ codeTarifOptique = $("#codeTarifOptique").val();
+ codePays = $("#codePays").val();
+ villeSignature = $("#villeSignature").val();
+ codeTypeDecompte = $("#codeTypeDecompte").val();
+ adresseGeo = $("#adresseGeo").val();
+ numeroCompte = $("#numeroCompte").val();
+ adressePost = $("#adressePost").val();
+ conventionne = $("#conventionne").val();
+ gestionreseau = $("#gestionreseau").val();
+ emailGestionPrestataire = $("#emailGestionPrestataire").val();
+
+ prefixePaiementMobile = $("#prefixePaiementMobile").val();
+ mobilePaiement = $("#mobilePaiement").val();
+
+ if(!verifMailValeur(emailGestionPrestataire))
+ {
+ v_msg="Veuillez revoir l'adresse mail!";
+ v_msgEng="Please review the email address!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#emailGestionPrestataire").focus();
+ return;
+ }
+
+ // Prise en compte des comptes bancaires prestataire
+ codeBanque = $("#codeBanque").val();
+ codeBanqueInterne = $("#codeBanqueInterne").val();
+ codeGuichet = $("#codeGuichet").val();
+ numeroCompteBancaire = $("#numeroCompteBancaire").val();
+ cleRib = $("#cleRib").val();
+ iban = $("#iban").val();
+ intituleCompteBancaire = $("#intituleCompteBancaire").val();
+ //
+
+ codeVille = $("#codeVille").val();
+ codeLocalite = $("#codeLocalite").val();
+ smsGestionPrestataire = $("#smsGestionPrestataire").val();
+ registreCommerce = $("#registreCommerce").val();
+
+ codeLanguePrestataire = $("#codeLangueUser").val();
+
+ nomResponsable = $("#nomResponsable").val();
+ nomInterlocuteur = $("#nomInterlocuteur").val();
+ telephoneFixe = $("#telephoneFixe").val();
+
+ faxPrestataire = $("#faxPrestataire").val();
+ telephonePortable = $("#telephonePortable").val();
+ contactInterlocuteur = $("#contactInterlocuteur").val();
+
+ centreReference = $("#centreReference").val();
+
+ appliquerTarifNuit = $("#appliquerTarifNuit").val();
+
+ latitude = $("#latitude").val();
+ longitude = $("#longitude").val();
+
+ filtreMedecin = $("#filtreMedecin").val();
+ codeModeBiometrie = $("#codeModeBiometrie").val();
+
+ if(codeTypePrestataire=="PHA"){
+ accesAjoutPh = $("#accesAjoutPh").val();
+ ajoutPrescription = $("#ajoutPrescription").val();
+ interdirVentePartielleMedicament = $("#interdirVentePartielleMedicament").val();
+ }else{
+ accesAjoutPh = "0";
+ ajoutPrescription = "0";
+ interdirVentePartielleMedicament = "0";
+ }
+
+
+ pharmacieInterne = $("#pharmacieInterne").val();
+ optiqueInterne = $("#optiqueInterne").val();
+
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez indiquer le nom du prestataire!";
+ v_msgEng="Please enter the name of the provider";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(codeTypePrestataire<=" ")
+ {
+ v_msg="Veuillez indiquer le type de prestataire!";
+ v_msgEng="Please indicate the type of provider!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypePrestataire").focus();
+ return;
+ }
+
+ if(categoriePresataire<=" ")
+ {
+ v_msg="Veuillez indiquer la produit du prestataire!";
+ v_msgEng="Please indicate the category of provider!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+
+ if (codeTypePrestataire=="CSO" || codeTypePrestataire=="DEN" || codeTypePrestataire=="HRW" || codeTypePrestataire=="LAB"|| codeTypePrestataire=="SEA")
+ {
+ if (codeTarifActe<" ")
+ {
+ v_msg="Veuillez fournir le tarif des actes!";
+ v_msgEng="Please provide the rates of the acts!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+ }
+
+
+ if (codeTypePrestataire=="PHA")
+ {
+ if (codeTarifMedicament<" ")
+ {
+ v_msg="Veuillez fournir le tarif des médicaments!";
+ v_msgEng="Please provide the price of the drugs!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifMedicament").focus();
+ return;
+ }
+ }
+
+ /*
+ if (codeTypePrestataire=="OPT")
+ {
+ if (codeTarifOptique<" ")
+ {
+ v_msg="Veuillez fournir le tarif optique!";
+ v_msgEng="Please provide the optical rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifOptique").focus();
+ return;
+ }
+ }
+ */
+
+ if(villeSignature<=" ")
+ {
+ v_msg="Veuillez indiquer la ville de signature!";
+ v_msgEng="Please indicate the city of signature!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#villeSignature").focus();
+ return;
+ }
+
+ if(codeTypeDecompte<=" ")
+ {
+ v_msg="Veuillez indiquer la type de décompte!";
+ v_msgEng="Please indicate the type of count!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypeDecompte").focus();
+ return;
+ }
+
+ if(conventionne<=" ")
+ {
+ v_msg="Le prestataire est-il conventionné ou pas?";
+ v_msgEng="Do the provider have an convetion or not?";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#conventionne").focus();
+ return;
+ }
+
+ if(gestionreseau<=" ")
+ {
+ v_msg="Tenir compte des réseaux de soins ou pas?";
+ v_msgEng="Consider care networks or not?";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#gestionreseau").focus();
+ return;
+ }
+
+ if(codeLanguePrestataire<=" ")
+ {
+ v_msg="Veuillez sélectionner une langue";
+ v_msgEng="Please select a language";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeLangueUser").focus();
+ return;
+ }
+
+ appliquerTarifPrestataire = $("#appliquerTarifPrestataire").val();
+
+ activerOtp = $("#activerOtp").val();
+ filtrerIp = $("#filtrerIp").val();
+
+ autoriserUnBonPrincipal = $("#autoriserUnBonPrincipal").val();
+ prixActeModifiable = $("#prixActeModifiable").val();
+
+
+ donnees = 'idPrestataire='+idPrestataire+'&libelle='+libelle+'&codeTypePrestataire='+codeTypePrestataire;
+ donnees += '&categoriePresataire='+categoriePresataire+'&codeTarifActe='+codeTarifActe+'&codeTarifMedicament='+codeTarifMedicament;
+ donnees += '&codeTarifOptique='+codeTarifOptique+'&codePays='+codePays+'&villeSignature='+villeSignature;
+ donnees += '&codeTypeDecompte='+codeTypeDecompte+'&adresseGeo='+adresseGeo+'&numeroCompte='+numeroCompte;
+ donnees += '&adressePost='+adressePost+'&conventionne='+conventionne+'&gestionreseau='+gestionreseau+'&emailGestionPrestataire='+emailGestionPrestataire;
+
+ donnees += '&codeBanque='+codeBanque+'&codeBanqueInterne='+codeBanqueInterne+'&codeGuichet='+codeGuichet;
+ donnees += '&numeroCompteBancaire='+numeroCompteBancaire+'&cleRib='+cleRib+'&iban='+iban+'&intituleCompteBancaire='+intituleCompteBancaire;
+
+ donnees += '&codeVille='+codeVille+'&codeLocalite='+codeLocalite+'&smsGestionPrestataire='+smsGestionPrestataire+'®istreCommerce='+registreCommerce;
+
+ donnees += '&codeLanguePrestataire='+codeLanguePrestataire;
+
+ donnees += '&nomResponsable='+nomResponsable+'&nomInterlocuteur='+nomInterlocuteur+'&telephoneFixe='+telephoneFixe;
+
+ donnees += '&faxPrestataire='+faxPrestataire+'&telephonePortable='+telephonePortable+'&contactInterlocuteur='+contactInterlocuteur;
+
+ donnees += '¢reReference='+centreReference+'&appliquerTarifNuit='+appliquerTarifNuit+'&latitude='+latitude+'&longitude='+longitude;
+
+ donnees += '&accesAjoutPh='+accesAjoutPh+'&ajoutPrescription='+ajoutPrescription+'&interdirVentePartielleMedicament='+interdirVentePartielleMedicament;
+
+ donnees += '&filtreMedecin='+filtreMedecin+'&codeModeBiometrie='+codeModeBiometrie+'&pharmacieInterne='+pharmacieInterne+'&optiqueInterne='+optiqueInterne;
+
+ donnees += '&appliquerTarifPrestataire='+appliquerTarifPrestataire;
+
+ donnees += '&activerOtp='+activerOtp;
+ donnees += '&filtrerIp='+filtrerIp;
+ donnees += '&autoriserUnBonPrincipal='+autoriserUnBonPrincipal;
+
+ donnees += '&mobilePaiement='+mobilePaiement;
+ donnees += '&prefixePaiementMobile='+prefixePaiementMobile;
+ donnees += '&prixActeModifiable='+prixActeModifiable;
+
+ //console.log(donnees);
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestataire/enregistrermodif/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ retour_prestataire_id();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+
+function enreg_prestatairereseausoins()
+{
+ idPrestataire = $("#idPrestataire").val();
+ libelle = $("#libelle").val();
+ codeTypePrestataire = $("#codeTypePrestataire").val();
+ categoriePresataire = $("#categoriePresataire").val();
+ codeTarifActe = $("#codeTarifActe").val();
+ codeTarifMedicament = $("#codeTarifMedicament").val();
+ codeTarifOptique = $("#codeTarifOptique").val();
+ codePays = $("#codePays").val();
+ villeSignature = $("#villeSignature").val();
+ codeTypeDecompte = $("#codeTypeDecompte").val();
+ adresseGeo = $("#adresseGeo").val();
+ numeroCompte = $("#numeroCompte").val();
+ adressePost = $("#adressePost").val();
+ conventionne = $("#conventionne").val();
+ gestionreseau = $("#gestionreseau").val();
+ emailGestionPrestataire = $("#emailGestionPrestataire").val();
+
+ if(!verifMailValeur(emailGestionPrestataire))
+ {
+ v_msg="Veuillez revoir l'adresse mail!";
+ v_msgEng="Please review the email address!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#emailGestionPrestataire").focus();
+ return;
+ }
+
+ // Prise en compte des comptes bancaires prestataire
+ codeBanque = $("#codeBanque").val();
+ codeBanqueInterne = $("#codeBanqueInterne").val();
+ codeGuichet = $("#codeGuichet").val();
+ numeroCompteBancaire = $("#numeroCompteBancaire").val();
+ cleRib = $("#cleRib").val();
+ iban = $("#iban").val();
+ intituleCompteBancaire = $("#intituleCompteBancaire").val();
+ //
+
+ codeVille = $("#codeVille").val();
+ codeLocalite = $("#codeLocalite").val();
+ smsGestionPrestataire = $("#smsGestionPrestataire").val();
+ registreCommerce = $("#registreCommerce").val();
+
+ codeLanguePrestataire = $("#codeLangueUser").val();
+
+ nomResponsable = $("#nomResponsable").val();
+ nomInterlocuteur = $("#nomInterlocuteur").val();
+ telephoneFixe = $("#telephoneFixe").val();
+
+ faxPrestataire = $("#faxPrestataire").val();
+ telephonePortable = $("#telephonePortable").val();
+ contactInterlocuteur = $("#contactInterlocuteur").val();
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez indiquer le nom du prestataire!";
+ v_msgEng="Please enter the name of the provider";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(codeTypePrestataire<=" ")
+ {
+ v_msg="Veuillez indiquer le type de prestataire!";
+ v_msgEng="Please indicate the type of provider!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypePrestataire").focus();
+ return;
+ }
+
+ if(categoriePresataire<=" ")
+ {
+ v_msg="Veuillez indiquer la produit du prestataire!";
+ v_msgEng="Please indicate the category of provider!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+
+ if (codeTypePrestataire=="CSO" || codeTypePrestataire=="DEN" || codeTypePrestataire=="HRW" || codeTypePrestataire=="LAB"|| codeTypePrestataire=="SEA")
+ {
+ if (codeTarifActe<" ")
+ {
+ v_msg="Veuillez fournir le tarif des actes!";
+ v_msgEng="Please provide the rates of the acts!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+ }
+
+ if (codeTypePrestataire=="PHA")
+ {
+ if (codeTarifMedicament<" ")
+ {
+ v_msg="Veuillez fournir le tarif des médicaments!";
+ v_msgEng="Please provide the price of the drugs!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifMedicament").focus();
+ return;
+ }
+ }
+
+ if (codeTypePrestataire=="OPT")
+ {
+ if (codeTarifOptique<" ")
+ {
+ v_msg="Veuillez fournir le tarif optique!";
+ v_msgEng="Please provide the optical rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifOptique").focus();
+ return;
+ }
+ }
+
+ if(villeSignature<=" ")
+ {
+ v_msg="Veuillez indiquer la ville de signature!";
+ v_msgEng="Please indicate the city of signature!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#villeSignature").focus();
+ return;
+ }
+
+ if(codeTypeDecompte<=" ")
+ {
+ v_msg="Veuillez indiquer la type de décompte!";
+ v_msgEng="Please indicate the type of count!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTypeDecompte").focus();
+ return;
+ }
+
+ if(conventionne<=" ")
+ {
+ v_msg="Le prestataire est-il conventionné ou pas?";
+ v_msgEng="Do the provider have an convetion or not?";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#conventionne").focus();
+ return;
+ }
+
+ if(gestionreseau<=" ")
+ {
+ v_msg="Tenir compte des réseaux de soins ou pas?";
+ v_msgEng="Consider care networks or not?";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#gestionreseau").focus();
+ return;
+ }
+
+ if(codeLanguePrestataire<=" ")
+ {
+ v_msg="Veuillez sélectionner une langue";
+ v_msgEng="Please select a language";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeLangueUser").focus();
+ return;
+ }
+
+ donnees = 'idPrestataire='+idPrestataire+'&libelle='+libelle+'&codeTypePrestataire='+codeTypePrestataire;
+ donnees += '&categoriePresataire='+categoriePresataire+'&codeTarifActe='+codeTarifActe+'&codeTarifMedicament='+codeTarifMedicament;
+ donnees += '&codeTarifOptique='+codeTarifOptique+'&codePays='+codePays+'&villeSignature='+villeSignature;
+ donnees += '&codeTypeDecompte='+codeTypeDecompte+'&adresseGeo='+adresseGeo+'&numeroCompte='+numeroCompte;
+ donnees += '&adressePost='+adressePost+'&conventionne='+conventionne+'&gestionreseau='+gestionreseau+'&emailGestionPrestataire='+emailGestionPrestataire;
+
+ donnees += '&codeBanque='+codeBanque+'&codeBanqueInterne='+codeBanqueInterne+'&codeGuichet='+codeGuichet;
+ donnees += '&numeroCompteBancaire='+numeroCompteBancaire+'&cleRib='+cleRib+'&iban='+iban+'&intituleCompteBancaire='+intituleCompteBancaire;
+
+ donnees += '&codeVille='+codeVille+'&codeLocalite='+codeLocalite+'&smsGestionPrestataire='+smsGestionPrestataire+'®istreCommerce='+registreCommerce;
+
+ donnees += '&codeLanguePrestataire='+codeLanguePrestataire;
+
+ donnees += '&nomResponsable='+nomResponsable+'&nomInterlocuteur='+nomInterlocuteur+'&telephoneFixe='+telephoneFixe;
+
+ donnees += '&faxPrestataire='+faxPrestataire+'&telephonePortable='+telephonePortable+'&contactInterlocuteur='+contactInterlocuteur;
+
+ v_msg="Confirmez-vous ces modifications?";
+ v_msgEng="Do you confirm these modifications?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestataire/enregistrermodif/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ retour_prestatairereseausoins();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function retour_prestataire_id()
+{
+ idPrestataire = $("#idPrestataire").val();
+ afficher_prestataire_id(idPrestataire);
+}
+
+function requetes_factures_leger()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
+
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+ // Ligne 1
+ donnees += 'dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ $("#div_detail_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function requetes_factures_leger_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+ // Ligne 1
+ donnees += 'dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function liste_ententeprealables_pha()
+{
+ window.location.assign($("#racineWeb" ).val()+"Listeententeprealablespha/");
+}
+
+function listeententeprealablespha()
+{
+ demandeTraite = $("#demandeTraite").val();
+ debut = $("#debut").val();
+ fin = $("#fin").val();
+
+ donnees = 'demandeTraite='+demandeTraite;
+ donnees += '&debut='+debut+'&fin='+fin;
+
+ $("#div_ententeprealable").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxententeprealablespha/entetesententeprealable/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_ententeprealable").html(data);
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+function accepter_ententeprealable_pha(idDemandeententeprealable, facture)
+{
+ if (facture==1)
+ {
+ v_msg="Déjà facturé!";
+ v_msgEng="Already charged!";
+ alert_ebene(v_msg, v_msgEng);
+ return;
+ }
+
+ window.location.assign($("#racineWeb" ).val()+"Accepterententeprealablespha/"+idDemandeententeprealable+"/");
+}
+
+function refuser_ententeprealable_pha(idDemandeententeprealable, facture)
+{
+ if (facture==1)
+ {
+ v_msg="Déjà facturé!";
+ v_msgEng="Already charged!";
+ alert_ebene(v_msg, v_msgEng);
+ return;
+ }
+
+ window.location.assign($("#racineWeb" ).val()+"Refuserententeprealablespha/"+idDemandeententeprealable+"/");
+}
+
+function enregistreraccordententepreslable_pha()
+{
+ idDemandeententeprealable = $("#idDemandeententeprealable").val();
+ motifReel = $("#motifReel").val();
+ prixAccorde = $("#prixAccorde").val();
+ quantiteAccorde = $("#quantiteAccorde").val();
+
+ if (motifReel<=" ")
+ {
+ v_msg="Veuillez saisir le motif!";
+ v_msgEng="Please enter the reason!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#motifReel").focus();
+ return;
+ }
+
+ prixAccorde=prixAccorde.replace(",",".");
+ $("#prixAccorde").val(prixAccorde);
+
+ if(isNaN(prixAccorde))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#prixAccorde").val("0");
+ $("#prixAccorde").focus();
+ return;
+ }
+
+ if(prixAccorde==0)
+ {
+ $("#prixAccorde").focus();
+ v_msg="Veuillez saisir le prix!";
+ v_msgEng="Please enter the price!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ // qte accordee
+
+ quantiteAccorde=quantiteAccorde.replace(",",".");
+ $("#quantiteAccorde").val(quantiteAccorde);
+
+ if(isNaN(quantiteAccorde))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#quantiteAccorde").val("0");
+ $("#quantiteAccorde").focus();
+ return;
+ }
+
+ if(quantiteAccorde==0)
+ {
+ $("#quantiteAccorde").focus();
+ v_msg="Veuillez saisir la quantité!";
+ v_msgEng="Please enter the quantity!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ // fin qte accordee
+
+ v_msg="Confirmez-vous cet accord?";
+ v_msgEng="Do you confirm this agreement?";
+
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ codePrestataire = $("#codePrestataire").val();
+
+ donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&prixAccorde='+prixAccorde+'&quantiteAccorde='+quantiteAccorde;
+ donnees += '&codePrestataire='+codePrestataire;
+
+ donnees_sav = donnees;
+ typeMail='accordententeprealablepha';
+ typeSms = "accordententeprealablepha";
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistreraccordententeprealablepha/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ preparesms(typeSms);
+ },
+ complete: function() {
+ v_msg="Accord envoyé avec succès!";
+ v_msgEng="Agreement sent successfully!";
+ alert_ebene(v_msg, v_msgEng);
+
+ liste_ententeprealables_pha();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function enregistrerrefusententepreslable_pha()
+{
+ idDemandeententeprealable = $("#idDemandeententeprealable").val();
+ motifReel = $("#motifReel").val();
+ motifRefusAssure = $("#motifRefusAssure").val();
+
+
+ if (motifReel<=" ")
+ {
+ v_msg="Veuillez saisir le motif réel!";
+ v_msgEng="Please enter the real reason!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#motifReel").focus();
+ return;
+ }
+
+ if (motifRefusAssure<=" ")
+ {
+ v_msg="Veuillez saisir un motif pour l\'assuré!";
+ v_msgEng="Please enter a reason for the insured!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#motifRefusAssure").focus();
+ return;
+ }
+
+ v_msg="Confirmez-vous ce refus?";
+ v_msgEng="Do you confirm this refusal?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ codePrestataire = $("#codePrestataire").val();
+
+ donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure;
+ donnees += '&codePrestataire='+codePrestataire;
+
+ donnees_sav = donnees;
+ typeMail='refusententeprealablepha';
+ typeSms="refusententeprealablepha";
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistrerrefusententeprealablepha/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ preparesms(typeSms);
+ },
+ complete: function() {
+
+ v_msg="Refus envoyé avec succès!";
+ v_msgEng="Disagreement sent successfully!";
+ alert_ebene(v_msg, v_msgEng);
+
+ liste_ententeprealables_pha();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function controle_longeur_passe(controle)
+{
+ longueur = controle.value.length;
+
+ if(longueur==0)
+ {
+ return false;
+ }
+
+ if(longueur<6)
+ {
+ v_msg="6 caractères minimum exigé!";
+ v_msgEng="6 characters minmum required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ controle.value="";
+ controle.focus();
+ return false;
+ }
+}
+
+// 14/05/2018
+
+function modifier_parametresgeneraux()
+{
+ window.location.assign($("#racineWeb" ).val()+"Modifierparametresgeneraux/");
+}
+
+function afficher_parametresgeneraux()
+{
+ window.location.assign($("#racineWeb" ).val()+"Parametresgeneraux/");
+}
+
+function enregistrer_modif_parametresgeneraux()
+{
+ idSocieteuser = $("#idSocieteuser").val();
+ donnees = 'idSocieteuser='+idSocieteuser;
+
+ nomCentreGestion = $("#nomCentreGestion").val();
+
+ if(nomCentreGestion<=" ")
+ {
+ v_msg="Veuillez indiquer le nom du centre de gestion!";
+ v_msgEng="Please indicate the management center name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#nomCentreGestion").focus();
+ return;
+ }
+
+ donnees = 'idSocieteuser='+idSocieteuser+'&nomCentreGestion='+nomCentreGestion;
+
+ adresseGeoSociete = $("#adresseGeoSociete").val();
+ adressePostSociete = $("#adressePostSociete").val();
+ codePays = $("#codePays").val();
+ ville = $("#ville").val();
+
+ telephoneSociete = $("#telephoneSociete").val();
+ faxSociete = $("#faxSociete").val();
+
+ portable = $("#portable").val();
+ nomResponsable = $("#nomResponsable").val();
+ sigleSociete = $("#sigleSociete").val();
+
+
+ donnees += '&adresseGeoSociete='+adresseGeoSociete+'&adressePostSociete='+adressePostSociete;
+ donnees += '&codePays='+codePays+'&ville='+ville+'&telephoneSociete='+telephoneSociete;
+ donnees += '&faxSociete='+faxSociete+'&portable='+portable+'&nomResponsable='+nomResponsable;
+ donnees += '&sigleSociete='+sigleSociete;
+
+
+ emailSociete = $("#emailSociete").val();
+ emailMedecinConseil = $("#emailMedecinConseil").val();
+ emailGestionBon = $("#emailGestionBon").val();
+
+ emailCcomptabilite = $("#emailCcomptabilite").val();
+ emailDerogation = $("#emailDerogation").val();
+ emailAccordPrealable = $("#emailAccordPrealable").val();
+
+ emailFraudeFinger = $("#emailFraudeFinger").val();
+ email_standard = "";
+ email_reply = "";
+
+ emailAlertLimiteConsommation = $("#emailAlertLimiteConsommation").val();
+
+ activerLogVisitePages = $("#activerLogVisitePages").val();
+ alertLimiteConsommation = $("#alertLimiteConsommation").val();
+
+ emailRd = $("#emailRd").val();
+ smsRd = $("#smsRd").val();
+
+ if (emailSociete<=" ")
+ {
+ v_msg="Veuillez indiquer les destinataires!";
+ v_msgEng="Please indicate the recipients!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#emailSociete").focus();
+ return;
+ }
+
+ if (emailAlertLimiteConsommation <=" " && alertLimiteConsommation > "0")
+ {
+ v_msg="Veuillez indiquer l'e-mail de l'alerte de la limite de consommation !";
+ v_msgEng="Please indicate the consumption limit alert email!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#emailAlertLimiteConsommation").focus();
+ return;
+ }
+
+ mauvais_mailSociete=false;
+ email_errSociete = "";
+
+ mauvais_mailMedecinConseil=false;
+ email_errMedecinConseil = "";
+
+ mauvais_mailGestionBon=false;
+ email_errGestionBon = "";
+
+ mauvais_mailCcomptabilite=false;
+ email_errCcomptabilite = "";
+
+ mauvais_mailDerogation=false;
+ email_errDerogation = "";
+
+ mauvais_mailAccordPrealable=false;
+ email_errAccordPrealable = "";
+
+ mauvais_mailFraudeFinger=false;
+ email_errFraudeFinger = "";
+
+ mauvais_mail_standard=false;
+ email_err_standard = "";
+
+ mauvais_mail_reply=false;
+ email_err_reply = "";
+
+
+ mauvais_emailAlertLimiteConsommation=false;
+ email_err_limiteConsommation= "";
+
+ mauvais_mail_rd=false;
+ email_err_rd = "";
+
+ var addrSociete = emailSociete.split(";"),
+ addrMedecinConseil = emailMedecinConseil.split(";"),
+ addrGestionBon = emailGestionBon.split(";"),
+ addrCcomptabilite = emailCcomptabilite.split(";"),
+ addrDerogation = emailDerogation.split(";"),
+ addrAccordPrealable = emailAccordPrealable.split(";"),
+ addrFraudeFinger = emailFraudeFinger.split(";"),
+ addr_standard = email_standard.split(";"),
+ addr_reply = email_reply.split(";");
+
+ addr_limiteConsommation = emailAlertLimiteConsommation.split(";");
+
+ addr_rd = emailRd.split(";");
+
+ emailSociete = emailSociete.trim();
+
+
+
+
+ addrSociete.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_errSociete = element;
+ mauvais_mailSociete = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mailSociete==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_errSociete;
+ v_msgEng="Please review this address : "+email_errSociete;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if(emailMedecinConseil.length > 0){
+ addrMedecinConseil.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_errMedecinConseil = element;
+ mauvais_mailMedecinConseil = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mailMedecinConseil==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_errMedecinConseil;
+ v_msgEng="Please review this address : "+email_errMedecinConseil;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ }
+
+
+ if(emailGestionBon.length > 0){
+ addrGestionBon.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_errGestionBon = element;
+ mauvais_mailGestionBon = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mailGestionBon==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_errGestionBon;
+ v_msgEng="Please review this address : "+email_errGestionBon;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ }
+
+ if(emailCcomptabilite.length > 0){
+ addrCcomptabilite.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_errCcomptabilite = element;
+ mauvais_mailCcomptabilite = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mailCcomptabilite==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_errCcomptabilite;
+ v_msgEng="Please review this address : "+email_errCcomptabilite;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ }
+
+ if(emailDerogation.length > 0){
+ addrDerogation.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_errDerogation = element;
+ mauvais_mailDerogation = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mailDerogation==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_errDerogation;
+ v_msgEng="Please review this address : "+email_errDerogation;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ }
+
+ if(emailAccordPrealable.length > 0){
+ addrAccordPrealable.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_errAccordPrealable = element;
+ mauvais_mailAccordPrealable = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mailAccordPrealable==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_errAccordPrealable;
+ v_msgEng="Please review this address : "+email_errAccordPrealable;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ }
+
+ if(emailFraudeFinger.length > 0){
+ addrFraudeFinger.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_errFraudeFinger = element;
+ mauvais_mailFraudeFinger = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mailFraudeFinger==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_errFraudeFinger;
+ v_msgEng="Please review this address : "+email_errFraudeFinger;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ }
+
+ if(email_standard.length > 0){
+ addr_standard.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_err_standard = element;
+ mauvais_mail_standard = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mailMedecinConseil==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_err_standard;
+ v_msgEng="Please review this address : "+email_err_standard;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ }
+
+ if(email_reply.length > 0){
+ addr_reply.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_err_reply = element;
+ mauvais_mail_reply = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mail_reply==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_err_reply;
+ v_msgEng="Please review this address : "+email_err_reply;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ }
+
+ if(emailAlertLimiteConsommation.length > 0){
+ addr_limiteConsommation.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_err_limiteConsommation = element;
+ mauvais_emailAlertLimiteConsommation = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_emailAlertLimiteConsommation==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_err_limiteConsommation;
+ v_msgEng="Please review this address : "+email_err_limiteConsommation;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ }
+
+ if(emailRd.length > 0){
+ addr_rd.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_err_rd = element;
+ mauvais_mail_rd = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mail_rd==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_err_rd;
+ v_msgEng="Please review this address : "+email_err_rd;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ }
+
+
+ smsMedecinConseil = $("#smsMedecinConseil").val();
+
+ donnees += '&emailMedecinConseil='+emailMedecinConseil+'&emailGestionBon='+emailGestionBon;
+ donnees += '&emailCcomptabilite='+emailCcomptabilite+'&emailDerogation='+emailDerogation+'&emailAccordPrealable='+emailAccordPrealable;
+ donnees += '&emailFraudeFinger='+emailFraudeFinger+'&email_standard='+email_standard+'&smsMedecinConseil='+smsMedecinConseil+'&email_reply='+email_reply;
+ donnees += '&emailSociete='+emailSociete;
+
+
+ smsGestionBon = $("#smsGestionBon").val();
+ smsDerogation = $("#smsDerogation").val();
+ smsAccordPrealable = $("#smsAccordPrealable").val();
+
+ donnees += '&smsGestionBon='+smsGestionBon;
+ donnees += '&smsDerogation='+smsDerogation;
+ donnees += '&smsAccordPrealable='+smsAccordPrealable;
+
+ fraisCarteAN = $("#fraisCarteAN").val();
+ spMax = $("#spMax").val();
+
+ donnees +='&fraisCarteAN='+fraisCarteAN;
+ donnees += '&spMax='+spMax;
+
+
+ codeLangueSociete = $("#codeLangueUser").val();
+
+ if(codeLangueSociete<=" ")
+ {
+ v_msg="Veuillez sélectionner une langue";
+ v_msgEng="Please select a language";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeLangueUser").focus();
+ return;
+ }
+
+ codePrefixePolice = $("#codePrefixePolice").val();
+
+ codeTypeSociete = $("#codeTypeSociete").val();
+
+
+
+
+ donnees += '&codeLangueSociete='+codeLangueSociete+'&codePrefixePolice='+codePrefixePolice;
+ donnees += '&codeTypeSociete='+codeTypeSociete;
+
+ donnees += '&emailAlertLimiteConsommation='+emailAlertLimiteConsommation;
+ donnees += '&activerLogVisitePages='+activerLogVisitePages;
+ donnees += '&alertLimiteConsommation='+alertLimiteConsommation;
+
+ donnees += '&emailRd='+emailRd+'&smsRd='+smsRd;
+
+ //console.log(donnees);
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxparametresgeneraux/enregistrermodif/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ afficher_parametresgeneraux();
+ }
+ });
+}
+
+function changer_verificateur()
+{
+ userCourant = $("#userCourant").val();
+ codeUtilisateur = $("#codeUtilisateur").val();
+
+ if(codeUtilisateur==userCourant)
+ {
+ v_msg="Vous êtes déjà le vérificateur!";
+ v_msgEng="You are already the auditor!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous être le vérificateur?";
+ v_msgEng="Do you confirm to be the auditor?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdecompte/changerverificateur/",
+ success: function(data) {
+ },
+ error: function(data) {
+ },
+ complete: function() {
+
+ codeUtilisateur = $("#userCourant").val();
+
+ $("#codeUtilisateur").val(codeUtilisateur);
+
+ v_msg="Opération effectuée avec succès!";
+ v_msgEng="Operation successfully completed";
+ alert_ebene(v_msg, v_msgEng);
+ }
+ });
+ return;
+ } else {
+ // L'utilisateur a annulé
+ v_msg="Opération annulée!";
+ v_msgEng="Operation canceled!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ });
+}
+
+function requetes_verification()
+{
+
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
+
+ codeExercice=$("#codeExercice").val();
+ codeMois=$("#codeMois").val();
+
+ donnees += 'codeExercice=' + codeExercice;
+ donnees += '&codeMois=' + codeMois;
+
+ $("#div_detail_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function requetes_verificateur()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
+
+ codeExercice=$("#codeExercice").val();
+ codeMois=$("#codeMois").val();
+
+ donnees += 'codeExercice=' + codeExercice;
+ donnees += '&codeMois=' + codeMois;
+
+ // lert(donnees);
+ // return;
+
+ $("#div_detail_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function requetes_verification_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ codeExercice=$("#codeExercice").val();
+ codeMois=$("#codeMois").val();
+
+ donnees += 'codeExercice=' + codeExercice;
+ donnees += '&codeMois=' + codeMois;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function requetes_verificateur_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ codeExercice=$("#codeExercice").val();
+ codeMois=$("#codeMois").val();
+
+ donnees += 'codeExercice=' + codeExercice;
+ donnees += '&codeMois=' + codeMois;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function etat_rapport_sp_adheleve()
+{
+ $('#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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function afficher_detail_factures_famille(idAdherent,emailAdherent)
+{
+ $('#div_export_b').html("");
+
+ $("#idAdherent").val(idAdherent);
+
+ $("#emailAdherent_0").val(emailAdherent);
+ $("#emailAdherent").val(emailAdherent);
+
+ $("#btn_pop_detail").click();
+
+}
+
+function charger_detail_stat_adherent_facture_pdf()
+{
+
+ $('#div_export_b').html("");
+ idAdherent = $("#idAdherent").val();
+ donnees = "idAdherent="+idAdherent;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportspfactureadhpdf/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+function charger_detail_stat_adherent_garantie_pdf()
+{
+ $('#div_export_b').html("");
+ idAdherent = $("#idAdherent").val();
+ donnees = "idAdherent="+idAdherent;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportspgarantieadhpdf/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+function charger_detail_stat_adherent_facture()
+{
+ $('#div_export_b').html("");
+ idAdherent = $("#idAdherent").val();
+ donnees = "idAdherent="+idAdherent;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportspfactureadh/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+function charger_detail_stat_adherent_garantie()
+{
+ $('#div_export_b').html("");
+ idAdherent = $("#idAdherent").val();
+ donnees = "idAdherent="+idAdherent;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportspgarantieadh/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_export_b').html(donnees_retour);
+ }
+ });
+}
+
+function etat_rapport_sp_adheleve_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function users_prestataire()
+{
+ codePrestataire = $("#codePrestataire").val();
+
+ if (codePrestataire>" ")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Usersprestaire/");
+ }
+}
+
+function reinitpaswd_prestataire(codeUtilisateur)
+{
+ v_msg="Confirmez-vous la réinitialisation?";
+ v_msgEng="Do you confirm the reset?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ donnees = "codeUtilisateur="+codeUtilisateur;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestataire/reinitpaswd/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ 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);
+
+ users_prestataire();
+ }
+ });
+ return;
+ } else {
+ // L'utilisateur a annulé
+ v_msg="Opération annulée!";
+ v_msgEng="Operation canceled!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ });
+
+}
+
+function ajouter_facture_dec()
+{
+ codePrestataire = $("#codePrestataire").val();
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxajoutactesdec/",
+ type : 'post',
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_ajout_actes").html(data);
+
+ },
+ complete: function() {
+ $("#div_selection_acte").hide();
+ }
+ });
+}
+
+function ajax_actes_possibles_selection_dec()
+{
+ codeFamilleActe=$("#codeFamilleActe").val();
+
+ donnees = 'codeFamilleActe='+codeFamilleActe;
+
+ $("#listeacte").html('' + '
');
+
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxactespossiblesselectiondec/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#listeacte").html(data);
+ appliquerDataTable();
+ },
+ complete: function() {
+ }
+ });
+}
+
+function recap_ajout_acte_dec()
+{
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxafficherverifierfacture/",
+ type: 'POST',
+ success: function(data) {
+ $("#div_verification_facture").html(data);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajouter_un_acte_selection_dec(codeActe)
+{
+ donnee_a_affciher = "";
+
+ donnees=""
+
+ if (codeActe<=" ")
+ {
+ v_msg="Veuillez sélectionner un acte!";
+ v_msgEng="Please select an act!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ //numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val();
+
+ donnees = 'codeActe='+codeActe;
+
+
+ $("#div_prestations").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxafficherajoutactesdec/ajouteractedecompte/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnee_a_affciher = data;
+
+ $("#searchInputActe").val('');
+ $("#div_selection_acte").hide();
+ },
+ complete: function() {
+ $("#div_prestations").html(donnee_a_affciher);
+ }
+ });
+}
+
+function retirer_un_acte_selection_dec(idActe)
+{
+
+ donnee_a_affciher = "";
+
+ donnees = 'idActe='+idActe;
+
+ $("#div_prestations").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxafficherajoutactesdec/retireractedecompte/",
+ type: 'post',
+ data: donnees,
+ success: function(data) {
+ donnee_a_affciher = data;
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ $("#div_prestations").html(donnee_a_affciher);
+ }
+ });
+}
+
+function mail_detail_stat_police()
+{
+ $('#div_export_b').html("");
+ idPolice = $("#idPolice").val();
+ emailRapport = $("#emailRapport").val();
+
+ emailRapport = emailRapport.trim();
+
+ if (emailRapport<=" ")
+ {
+ v_msg="Veuillez indiques les destinataires!";
+ v_msgEng="Please indicate the recipients!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#emailRapport").focus();
+ return;
+ }
+
+ mauvais_mail=false;
+
+ email_err = "";
+
+ var addr = emailRapport.split(";");
+
+ addr.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_err = element;
+ mauvais_mail = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mail==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_err;
+ v_msgEng="Please review this address : "+email_err ;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous cet envoi?";
+ v_msgEng="Do you confirm this sending?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ donnees = "idPolice="+idPolice+"&emailRapport="+emailRapport;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportmail/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ div_export.html(" ");
+
+ v_msg="Opération terminée avec succès!";
+ v_msgEng="Operation completed successfully!";
+ alert_ebene(v_msg, v_msgEng);
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function mail_detail_stat_police_facture()
+{
+ $('#div_export_b').html("");
+ idPolice = $("#idPolice").val();
+ emailRapport = $("#emailRapport").val();
+
+ emailRapport = emailRapport.trim();
+
+ if (emailRapport<=" ")
+ {
+ v_msg="Veuillez indiques les destinataires!";
+ v_msgEng="Please indicate the recipients!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#emailRapport").focus();
+ return;
+ }
+
+ mauvais_mail=false;
+
+ email_err = "";
+
+ var addr = emailRapport.split(";");
+
+ addr.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_err = element;
+ mauvais_mail = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mail==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_err;
+ v_msgEng="Please review this address : "+email_err ;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+
+ v_msg="Confirmez-vous cet envoi?";
+ v_msgEng="Do you confirm this sending?";
+
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ donnees = "idPolice="+idPolice+"&emailRapport="+emailRapport;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportspfacturemail/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ div_export.html(" ");
+
+ v_msg="Opération terminée avec succès!";
+ v_msgEng="Operation completed successfully!";
+ alert_ebene(v_msg, v_msgEng);
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+
+function mail_detail_stat_police_garantie()
+{
+ $('#div_export_b').html("");
+ idPolice = $("#idPolice").val();
+ emailRapport = $("#emailRapport").val();
+
+ emailRapport = emailRapport.trim();
+
+ if (emailRapport<=" ")
+ {
+ v_msg="Veuillez indiques les destinataires!";
+ v_msgEng="Please indicate the recipients!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#emailRapport").focus();
+ return;
+ }
+
+ mauvais_mail=false;
+
+ email_err = "";
+
+ var addr = emailRapport.split(";");
+
+ addr.forEach(function(element)
+ {
+ if (test_adresse_email(element)==false)
+ {
+ email_err = element;
+ mauvais_mail = true;
+ // break;
+ return;
+ }
+ });
+
+ if(mauvais_mail==true)
+ {
+ v_msg="Veuillez revoir cette adresse : "+email_err;
+ v_msgEng="Please review this address : "+email_err ;
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+
+ v_msg="Confirmez-vous cet envoi?";
+ v_msgEng="Do you confirm this sending?";
+
+
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ donnees = "idPolice="+idPolice+"&emailRapport="+emailRapport;
+ donnees_retour = "";
+
+ var div_export = $('#div_export_b');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailrapportspgarantiemail/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ div_export.html(" ");
+
+ v_msg="Opération terminée avec succès!";
+ v_msgEng="Operation completed successfully!";
+ alert_ebene(v_msg, v_msgEng);
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+
+}
+
+function test_adresse_email(email)
+{
+ var reg = new RegExp('^[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*@[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*[\.]{1}[a-z]{2,6}$', 'i');
+
+ if(reg.test(email)==false)
+ {
+ return(false);
+ }
+}
+
+function reinitialiser_email_rapport()
+{
+ emailRapport = $("#emailRapport_0").val();
+ $("#emailRapport").val(emailRapport);
+}
+
+function consulter_derogation_2(idDemandederogation)
+{
+ window.location.assign($("#racineWeb" ).val()+"Consulterderogations/"+idDemandederogation+"/");
+}
+
+function consulter_derogation(idDemandederogation)
+{
+ window.location.assign($("#racineWeb" ).val()+"Consulterderogation/"+idDemandederogation+"/");
+}
+
+function consulter_ententeprealable_2(idDemandeententeprealable)
+{
+ window.location.assign($("#racineWeb" ).val()+"Consulterententeprealables/"+idDemandeententeprealable+"/");
+}
+
+function consulter_ententeprealable(idDemandeententeprealable)
+{
+ window.location.assign($("#racineWeb" ).val()+"Consulterententeprealable/"+idDemandeententeprealable+"/");
+}
+
+
+function consulter_ententeprealable_pha_2(idDemandeententeprealable)
+{
+ window.location.assign($("#racineWeb" ).val()+"Consulterententeprealablespha/"+idDemandeententeprealable+"/");
+}
+
+
+function pop_messagerie()
+{
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmessagerieliste/",
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_messagerie").html(data);
+ },
+ complete: function() {
+ $("#btn_pop_messagerie").click();
+ }
+ });
+}
+
+function marquer_message_comme_lu(idMessagerie, controle)
+{
+ donnees = 'idMessagerie='+idMessagerie;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmessagerieliste/marquercommelu/",
+ type: 'POST',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ controle.parentElement.removeChild(controle);
+ }
+ });
+}
+
+function envoyer_messagerie(textMessage, idParent)
+{
+
+ codePrestataireExamen = $("#codePrestataireExamen").val();
+ codePrestataireMedicament = $("#codePrestataireMedicament").val();
+
+ if(codePrestataireExamen!=undefined && codePrestataireExamen!="undefined")
+ {
+ codePrestataire = $("#codePrestataireExamen").val();
+
+ }else if(codePrestataireMedicament!=undefined && codePrestataireMedicament!="undefined")
+ {
+ codePrestataire = $("#codePrestataireMedicament").val();
+ }else
+ {
+ codePrestataire = $("#codePrestataire").val();
+ }
+
+ donnees = 'textMessage='+textMessage+"&idParent="+idParent+"&codePrestataire="+codePrestataire;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmessagerie/creermessage/",
+ type: 'POST',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+// gestion messagerie
+function repondre_message(idMessagerie, idParent, codePrestataire, controle)
+{
+ donnees = 'idMessagerie='+idMessagerie+'&idParent='+idParent+'&codePrestataire='+codePrestataire;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmessageriereponse/",
+ type: 'POST',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_messagerie_reponse").html(data);
+ },
+ complete: function() {
+ repondu = $("#repondu").val();
+ if(repondu=="1")
+ {
+ v_msg="Déjà répondu!";
+ v_msgEng="Already answered!";
+ alert_ebene(v_msg, v_msgEng);
+
+ controle.parentElement.removeChild(controle);
+ return;
+ }
+ else
+ {
+ $("#btn_pop_messagerie_reponse").click();
+ }
+ }
+ });
+}
+
+function gerer_messagerie()
+{
+ window.location.assign($("#racineWeb").val()+"Messagerie/");
+}
+
+function afficher_lite_messagerie()
+{
+ donnees = "";
+ donnees_retour = "";
+
+ date1 = $("#date1").val();
+ date2 = $("#date2").val();
+
+ messageLu = $("#messageLu").val();
+ textMessage = $("#textMessage").val();
+ codePrestataire = $("#codePrestataire").val();
+
+ donnees += 'date1=' + date1;
+ donnees += '&date2=' + date2;
+ donnees += '&messageLu=' + messageLu;
+ donnees += '&textMessage=' + textMessage;
+ donnees += '&codePrestataire=' + codePrestataire;
+
+ $("#div_messagerie_gestion").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistemessagerie/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_messagerie_gestion").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function enregistrer_repondre_message()
+{
+ idMessagerie = $("#idMessagerie").val();
+ idParent = $("#idParentReponse").val();
+
+ textMessage = $("#textMessageReponse").val();
+ textMessage = textMessage.trim();
+
+ if (textMessage<=" ")
+ {
+ v_msg="Veuillez saisir la réponse!";
+ v_msgEng="Please enter the answer!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#textMessageReponse").focus();
+ return;
+ }
+
+ donnees = 'idMessagerie='+idMessagerie+"&idParent="+idParent+"&textMessage="+textMessage;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmessagerie/repondremessage/",
+ type: 'POST',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ $("#btn_pop_messagerie_reponse_quit").click();
+ }
+ });
+}
+
+function historique_message(idParent)
+{
+ donnees = 'idParent='+idParent;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmessageriehistorique/",
+ type: 'POST',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_messagerie_historique").html(data);
+ },
+ complete: function() {
+ $("#btn_pop_messagerie_historique").click();
+ }
+ });
+}
+
+// btn_pop_messagerie_new
+function initiermessage()
+{
+ codePrestataire = $("#codePrestataire").val();
+
+ if (codePrestataire<=" ")
+ {
+ v_msg="Veuillez sélectionner un prestataire!";
+ v_msgEng="Please select a provider!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#btn_search_prestataire").click();
+ return;
+ }
+
+ donnees = "codePrestataire="+codePrestataire;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmessagerienew/",
+ type: 'POST',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_messagerie_new").html(data);
+ },
+ complete: function() {
+ $("#btn_pop_messagerie_new").click();
+ }
+ });
+}
+
+function enregistrer_new_message()
+{
+ codePrestataire = $("#codePrestataire").val();
+
+ textMessage = $("#textMessageNew").val();
+ textMessage = textMessage.trim();
+
+ if (codePrestataire<=" ")
+ {
+ v_msg="Veuillez sélectionner un prestataire!";
+ v_msgEng="Please select a provider!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#btn_pop_messagerie_new_quit").click();
+ return;
+ }
+
+ if (textMessage<=" ")
+ {
+ v_msg="Veuillez saisir le message!";
+ v_msgEng="Please enter the message!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#textMessageNew").focus();
+ return;
+ }
+
+ donnees = "textMessage="+textMessage+"&idParent=0&codePrestataire="+codePrestataire;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmessagerie/creermessage/",
+ type: 'POST',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ $("#btn_pop_messagerie_new_quit").click();
+ }
+ });
+}
+
+
+function imprimer_liste_assures_date()
+{
+ dateAnalyse = $("#dateAnalyse").val();
+
+ if (dateAnalyse<=" ")
+ {
+ v_msg="Veuillez indiquer une date!";
+ v_msgEng="Please enter a date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateAnalyse").focus();
+ return;
+ }
+
+ donnees = 'dateAnalyse='+dateAnalyse;
+
+ var div_export = $('#div_export_assures');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaximprimerlisteassure/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function exporter_liste_assures_date()
+{
+ dateAnalyse = $("#dateAnalyse_export").val();
+
+ if (dateAnalyse<=" ")
+ {
+ v_msg="Veuillez indiquer une date!";
+ v_msgEng="Please enter a date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateAnalyse").focus();
+ return;
+ }
+
+ donnees = 'dateAnalyse='+dateAnalyse;
+
+ var div_export = $('#div_exporter_liste_assures');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexporterlisteassure/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function exporter_liste_assures_sans_format_date()
+{
+ dateAnalyse = $("#dateAnalyse_sans_format").val();
+
+ if (dateAnalyse<=" ")
+ {
+ v_msg="Veuillez indiquer une date!";
+ v_msgEng="Please enter a date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateAnalyse").focus();
+ return;
+ }
+
+ donnees = 'dateAnalyse='+dateAnalyse;
+
+ var div_export = $('#div_export_assures_sans_format');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexporterlisteassure/exportersansformat",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function liste_assures_actifs()
+{
+ dateAnalyse = $("#dateAnalyse").val();
+
+ if (dateAnalyse<=" ")
+ {
+ v_msg="Veuillez indiquer une date!";
+ v_msgEng="Please enter a date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateAnalyse").focus();
+ return;
+ }
+
+ donnees = 'dateAnalyse='+dateAnalyse;
+
+ var div_export = $('#div_assures_actifs');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxassuresactifs/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+function liste_assures_actifs_export()
+{
+ dateAnalyse = $("#dateAnalyse").val();
+
+ if (dateAnalyse<=" ")
+ {
+ v_msg="Veuillez indiquer une date!";
+ v_msgEng="Please enter a date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateAnalyse").focus();
+ return;
+ }
+
+ donnees = 'dateAnalyse='+dateAnalyse;
+
+ var div_export = $('#div_assures_actifs');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxassuresactifsexport/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ div_export.html(data);
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ }
+ });
+}
+
+// RENOUVELLEMENT COURTE DUREE => 06/07/2018
+/*
+function CalculerEcheanceRen()
+{
+ $("#dateEcheanceRen").disable();
+
+ codePeriodicite=$("#codePeriodicite").val();
+
+ var typdate = $("#dateAvenant").datepicker("getDate");
+
+ switch (codePeriodicite) {
+ case "A":
+ typdate.addMonths(12);
+ break;
+ case "L":
+ $("#dateEcheanceRen").enable();
+ typdate = $("#dateEcheanceRen").datepicker("getDate");
+ break;
+ default:
+ typdate.addMonths(12);
+ }
+
+ $( "#dateEcheanceRen").datepicker( "setDate", typdate );
+}
+*/
+
+function CalculerEcheanceRen()
+{
+ $("#dateEcheanceRen").disable();
+
+ codePeriodicite=$("#codePeriodicite").val();
+
+ var typdate = $("#dateAvenant").datepicker("getDate");
+
+ switch (codePeriodicite) {
+ case "A":
+ typdate.addMonths(12);
+ break;
+ case "S":
+ typdate.addMonths(6);
+ break;
+ case "T":
+ typdate.addMonths(3);
+ break;
+ case "M":
+ typdate.addMonths(1);
+ break;
+ case "L":
+ $("#dateEcheanceRen").enable();
+ typdate = $("#dateEcheanceRen").datepicker("getDate");
+ break;
+ default:
+ typdate.addMonths(12);
+ }
+ $( "#dateEcheanceRen" ).datepicker( "setDate", typdate );
+}
+
+function CalculerFinRen()
+{
+ $("#dateFinRen").disable();
+
+ codeFractionnement=$("#codeFractionnement").val();
+
+ var typdate = $("#dateAvenant").datepicker("getDate");
+ var dtech = $("#dateEcheanceRen").datepicker("getDate");
+
+ switch (codeFractionnement) {
+ case "A":
+ typdate.addMonths(12);
+ break;
+ case "S":
+ typdate.addMonths(6);
+ break;
+ case "T":
+ typdate.addMonths(3);
+ break;
+ case "M":
+ typdate.addMonths(1);
+ break;
+ default:
+ typdate.addMonths(12);
+ }
+ if (typdate>dtech)
+ {
+ typdate=dtech;
+ }
+ $( "#dateFinRen" ).datepicker( "setDate", typdate );
+}
+
+function ControlerEcheanceRen()
+{
+ codePeriodicite=$("#codePeriodicite").val();
+ if (codePeriodicite!="L") return true;
+ else {
+ var eff = $("#dateAvenant").datepicker("getDate");
+ var ech = $("#dateEcheanceRen").datepicker("getDate");
+
+ if (echeff.addMonths(12)) {
+ v_msg="Période supérieur à un an!";
+ v_msgEng="Period greater than one year!";
+ alert_ebene(v_msg, v_msgEng);
+ }
+ }
+}
+
+function verifier_Echeance_ren()
+{
+ codeTypeAvenant=$("#codeTypeAvenant").val();
+
+ if(codeTypeAvenant!="REN")
+ {
+ return;
+ }
+
+ CalculerEcheanceRen();
+ CalculerFinRen();
+}
+
+function factures_famille()
+{
+ window.location.assign($("#racineWeb" ).val()+"Facturesfamille/");
+}
+
+
+function factures_famille_2()
+{
+ window.location.assign($("#racineWeb" ).val()+"Facturesfamilleadh/");
+}
+
+function listerfacturefamille()
+{
+ d1=$("#d1").val();
+ d2=$("#d2").val();
+
+ donnees = 'd1='+d1+'&d2='+d2;
+
+ $("#div_dossiers").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxfacturesfamille/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_dossiers").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+
+function ctrlkeypress_lite_prestataire(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ afficher_lite_prestataire();
+ }
+}
+
+function desactiver_user_prestataire(codeUtilisateur)
+{
+ v_msg="Confirmez-vous la désactivation?";
+ v_msgEng="Do you confirm the deactivation?";
+
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ donnees = "codeUtilisateur="+codeUtilisateur;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestataire/desactiver/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ 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);
+
+ users_prestataire();
+ }
+ });
+ return;
+ } else {
+ // L'utilisateur a annulé
+ v_msg="Opération annulée!";
+ v_msgEng="Operation canceled!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ });
+
+}
+
+function activer_user_prestataire(codeUtilisateur)
+{
+ v_msg="Confirmez-vous l\'activation?";
+ v_msgEng="Do you confirm the activation?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ donnees = "codeUtilisateur="+codeUtilisateur;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxprestataire/activer/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ 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);
+
+ users_prestataire();
+ }
+ });
+ return;
+ } else {
+ // L'utilisateur a annulé
+ v_msg="Opération annulée!";
+ v_msgEng="Operation canceled!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ });
+
+}
+
+function consulter_une_factures()
+{
+ window.location.assign($("#racineWeb" ).val()+"Facturecons/");
+}
+
+function ctrlkeypressfacture(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ $("#idFacture").blur();
+ }
+}
+
+function maj_date_reception_facture_decompte()
+{
+ dateReception = $("#dateReception_pop").val();
+
+ if(dateReception<=" ")
+ {
+ v_msg="Veuillez indicquer la date de réception!";
+ v_msgEng="Please enter the date of receipt!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ donnees = 'dateReception='+dateReception;
+
+ v_msg="Confirmez-vous cette date?";
+ v_msgEng="Do you confirm this date?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdecompte/majdatereception/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $("#btn_close_pop_reception").click();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+
+ dateReception = $("#dateReception_pop").val();
+
+ $("#dateReception").val(dateReception);
+ $("#btn_dateReception").val(dateReception);
+
+ v_msg="Opération effectuée avec succès!";
+ v_msgEng="Operation successfully completed";
+ alert_ebene(v_msg, v_msgEng);
+ }
+ });
+ return;
+ } else {
+ // L'utilisateur a annulé
+ v_msg="Opération annulée!";
+ v_msgEng="Operation canceled!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ });
+
+}
+
+function etatsproduction()
+{
+ window.location.assign($("#racineWeb" ).val()+"Etatsproduction/");
+}
+
+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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_ente_requete").html(data);
+ $(".datepicker" ).datepicker();
+ }
+ });
+}
+
+
+function etat_prod_par_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function etat_prod_par_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function etat_prod_par_mois()
+{
+ 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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ 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_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function etat_prod_par_emission()
+{
+ 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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ 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_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function initiermessagecommun()
+{
+ window.location.assign($("#racineWeb" ).val()+"Messageriecommun/");
+}
+
+function enregistrer_message_commun()
+{
+ objet = $("#objet").val();
+ textMessage = $("#textMessageCommun").val();
+ textMessage = textMessage.trim();
+
+ if (objet<=" ")
+ {
+ v_msg="Veuillez saisir l\'objet!";
+ v_msgEng="Please enter the object!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#objet").focus();
+ return;
+ }
+
+ if (textMessage<=" ")
+ {
+ v_msg="Veuillez saisir le message!";
+ v_msgEng="Please enter the message!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#textMessageCommun").focus();
+ return;
+ }
+
+ donnees = "objet="+objet+"&textMessage="+textMessage;
+
+ var div_wait = $('#div_wait');
+ div_wait.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxmessageriecommun/creermessagecommun/",
+ type: 'POST',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ div_wait.html(data);
+ },
+ complete: function() {
+ div_wait.html('');
+
+ v_msg="Message envoyé avec succès!";
+ v_msgEng="Message sent successfully!";
+ alert_ebene(v_msg, v_msgEng);
+
+ gerer_messagerie();
+ }
+ });
+}
+
+//
+
+function requetes_factures_mois()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
+
+
+ idPolice = $("#idPolice").val();
+ codeGcAssureur = $("#codeGcAssureur").val();
+ codePrestataire = $("#codePrestataire").val();
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees += '&idPolice=' + idPolice;
+ donnees += '&codeGcAssureur=' + codeGcAssureur;
+ donnees += '&codePrestataire=' + codePrestataire;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ $("#div_detail_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ $("#codeGcAssureur" ).selectpicker();
+ $("#idPolice" ).selectpicker();
+ }
+ });
+}
+
+function requetes_factures_mois_export()
+{
+
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ codePrestataire = $("#codePrestataire").val();
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees += 'codePrestataire=' + codePrestataire;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function desactiver_medicament(idDetail)
+{
+ v_msg="Confirmez-vous cette désactivation?";
+ v_msgEng="Do you confirm this deactivation?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtarifmedicament/desactivermedicament/",
+ type : 'post',
+ data: "idDetail="+idDetail,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function()
+ {
+ afficher_tarifpharmacie();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function activer_medicament(idDetail)
+{
+ v_msg="Confirmez-vous cette activation?";
+ v_msgEng="Do you confirm this activation?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtarifmedicament/activermedicament/",
+ type : 'post',
+ data: "idDetail="+idDetail,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function()
+ {
+ afficher_tarifpharmacie();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function init_supprimer_empreinte_digitale()
+{
+ window.location.assign($("#racineWeb" ).val()+"Supprimerempreinte/");
+}
+
+
+function requetes_factures_jour()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
+
+ idPolice = $("#idPolice").val();
+ codeGcAssureur = $("#codeGcAssureur").val();
+ codePrestataire = $("#codePrestataire").val();
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees += '&idPolice=' + idPolice;
+ donnees += '&codeGcAssureur=' + codeGcAssureur;
+ donnees += '&codePrestataire=' + codePrestataire;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ $("#div_detail_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ $("#codeGcAssureur" ).selectpicker();
+ $("#idPolice" ).selectpicker();
+ }
+ });
+}
+
+function requetes_factures_jour_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ codePrestataire = $("#codePrestataire").val();
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees += 'codePrestataire=' + codePrestataire;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function ajax_liste_prestataires_messagerie()
+{
+ codeTypePrestataire=$("#codeTypePrestataire").val();
+
+ donnees = 'codeTypePrestataire='+codeTypePrestataire;
+
+ $("#div_prestataires").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteprestatairemessagerie/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_prestataires").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+
+function ajouter_un_prestataire_mess(idPrestataire)
+{
+ donnees = 'idPrestataire='+idPrestataire;
+
+ $("#div_prestataires").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteprestatairemessagerie/ajouterprestaire/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ ajax_liste_prestataires_messagerie();
+ }
+ });
+}
+
+function retirer_un_prestataire_mess(idPrestataire)
+{
+ donnees = 'idPrestataire='+idPrestataire;
+
+ $("#div_prestataires").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteprestatairemessagerie/retirerprestaire/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ ajax_liste_prestataires_messagerie();
+ }
+ });
+}
+
+
+function ajouter_tous_prestataire_mess()
+{
+ codeTypePrestataire=$("#codeTypePrestataire").val();
+
+ donnees = 'codeTypePrestataire='+codeTypePrestataire;
+
+ $("#div_prestataires").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteprestatairemessagerie/ajouterprestairetous/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ ajax_liste_prestataires_messagerie();
+ }
+ });
+}
+
+function retirer_tous_prestataire_mess()
+{
+ codeTypePrestataire=$("#codeTypePrestataire").val();
+
+ donnees = 'codeTypePrestataire='+codeTypePrestataire;
+
+ $("#div_prestataires").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteprestatairemessagerie/retirerprestairetous/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ ajax_liste_prestataires_messagerie();
+ }
+ });
+}
+
+
+//
+
+function requetes_ententeprealable_pha()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
+
+ codePrestataire = $("#codePrestataire").val();
+ dateDemande1 = $("#dateDemande1").val();
+ dateDemande2 = $("#dateDemande2").val();
+ codeReponseEntentePrealable = $("#codeReponseEntentePrealable").val();
+
+ donnees += 'codePrestataire=' + codePrestataire;
+ donnees += '&dateDemande1=' + dateDemande1;
+ donnees += '&dateDemande2=' + dateDemande2;
+ donnees += '&codeReponseEntentePrealable=' + codeReponseEntentePrealable;
+
+ $("#div_detail_requete").html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function requetes_ententeprealable_pha_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ codePrestataire = $("#codePrestataire").val();
+ dateDemande1 = $("#dateDemande1").val();
+ dateDemande2 = $("#dateDemande2").val();
+ codeReponseEntentePrealable = $("#codeReponseEntentePrealable").val();
+
+ donnees += 'codePrestataire=' + codePrestataire;
+ donnees += '&dateDemande1=' + dateDemande1;
+ donnees += '&dateDemande2=' + dateDemande2;
+ donnees += '&codeReponseEntentePrealable=' + codeReponseEntentePrealable;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function check_ged(idGed, cheminFichier, controle)
+{
+ donnees = "idGed="+idGed+"&cheminFichier="+cheminFichier;
+
+ var ctrl_btn_ged = $("#btn_ged"+idGed);
+ var ctrl_mess_not_found= $("#mess_not_found"+idGed);
+ var ctrl_check = $("#ctrl_check"+idGed);
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxged/verifierexistancefichier/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+
+ donnees_retour = data;
+
+ if(donnees_retour=="1")
+ {
+ ctrl_btn_ged.show();
+ }
+ else
+ {
+ ctrl_mess_not_found.html("Not found");
+ }
+ },
+ complete: function()
+ {
+ controle.style.display = 'none';
+ ctrl_check.show();
+ }
+ });
+}
+
+function lister_ged_feuille_maladie()
+{
+ d1 = $("#d1").val();
+ d2 = $("#d2").val();
+ nomOrigine = $("#nomOrigine").val();
+
+ donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
+
+ $("#div_ged").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistegedfeuillemaladie/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_ged").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function afficher_lite_messagerie_commun()
+{
+ donnees = "";
+ donnees_retour = "";
+
+ date1 = $("#date1").val();
+ date2 = $("#date2").val();
+
+ textMessage = $("#textMessage").val();
+
+ donnees += 'date1=' + date1;
+ donnees += '&date2=' + date2;
+ donnees += '&textMessage=' + textMessage;
+
+ $("#div_messagerie_gestion").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistemessageriecommun/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_messagerie_gestion").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function afficher_lite_messagerie_form_me()
+{
+ donnees = "";
+ donnees_retour = "";
+
+ date1 = $("#date1").val();
+ date2 = $("#date2").val();
+
+ messageLu = $("#messageLu").val();
+ textMessage = $("#textMessage").val();
+ codePrestataire = $("#codePrestataire").val();
+
+ donnees += 'date1=' + date1;
+ donnees += '&date2=' + date2;
+ donnees += '&messageLu=' + messageLu;
+ donnees += '&textMessage=' + textMessage;
+ donnees += '&codePrestataire=' + codePrestataire;
+
+ $("#div_messagerie_gestion").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistemessagerieforme/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_messagerie_gestion").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+
+function lister_ged_beneficiaire_prest()
+{
+ d1 = $("#d1").val();
+ d2 = $("#d2").val();
+ nomOrigine = $("#nomOrigine").val();
+
+ donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
+
+ $("#div_ged").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistegedbeneficiaireprest/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_ged").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function lister_ged_beneficiaire_prod()
+{
+ d1 = $("#d1").val();
+ d2 = $("#d2").val();
+ nomOrigine = $("#nomOrigine").val();
+
+ donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
+
+ $("#div_ged").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistegedbeneficiaireprod/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_ged").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function lister_ged_adherent()
+{
+ d1 = $("#d1").val();
+ d2 = $("#d2").val();
+ nomOrigine = $("#nomOrigine").val();
+
+ donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
+
+ $("#div_ged").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistegedadherent/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_ged").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function lister_ged_police()
+{
+ d1 = $("#d1").val();
+ d2 = $("#d2").val();
+ nomOrigine = $("#nomOrigine").val();
+
+ donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
+
+ $("#div_ged").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistegedpolice/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_ged").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function lister_ged()
+{
+ d1 = $("#d1").val();
+ d2 = $("#d2").val();
+ nomOrigine = $("#nomOrigine").val();
+
+ donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
+
+ $("#div_ged").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlisteged/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_ged").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ctrlkeypress_lister_ged(ev)
+{
+ var keycode = (ev.keyCode ? ev.keyCode : ev.which);
+ if(keycode == '13')
+ {
+ lister_ged();
+ }
+}
+
+function ajaxenteteetatsynthese()
+{
+ 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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_ente_requete").html(data);
+ $(".datepicker" ).datepicker();
+ }
+ });
+}
+
+function etat_synthese_par_mois()
+{
+ 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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function etat_synthese_par_mois_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+
+function pop_ged_pharmacie()
+{
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistegedpharmacie/",
+ error: function(errorData) {
+ },
+ success: function(data)
+ {
+ $("#div_ged").html(data);
+ },
+ complete: function() {
+ $("#btn_pop_ged_pharmacie").click();
+ }
+ });
+}
+
+function etat_synthese_par_mois_acqu()
+{
+ 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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function etat_synthese_par_mois_acqu_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('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function demandesdecomptes()
+{
+ codePrestataire = $("#codePrestataire").val();
+ codeExercice = $("#codeExercice").val();
+ codeMois = $("#codeMois").val();
+
+ if (codeExercice<=" ")
+ {
+ v_msg="Veuillez sélectionner un exercice!";
+ v_msgEng="Please select an exercise!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeExercice").focus();
+ return;
+ }
+
+ if (codeMois<=" ")
+ {
+ v_msg="Veuillez sélectionner une période!";
+ v_msgEng="Please select a period!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeMois").focus();
+ return;
+ }
+
+ donnees = 'codePrestataire='+codePrestataire+'&codeExercice='+codeExercice+'&codeMois='+codeMois;
+
+ $("#div_detail").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdemandesdecomptes/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_detail").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function detail_demande_decompte(idDemandeDecompte, numeroDemandeDecompte)
+{
+ donnees = 'numeroDemandeDecompte='+numeroDemandeDecompte+'&idDemandeDecompte='+idDemandeDecompte;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcontextdemandedecompte/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ window.location.assign($("#racineWeb" ).val()+"Detaildemandedecompte/");
+ }
+ });
+}
+
+
+function imprimerbordereaudemandedecompte()
+{
+}
+
+
+function initierdecompte_demande_decompte()
+{
+ codePrestataire=$("#codePrestataire").val();
+ codeExercice=$("#codeExercice").val();
+ codeMois=$("#codeMois").val();
+
+ 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 (codeExercice<=" ")
+ {
+ v_msg="Veuillez sélectionner un exercice!";
+ v_msgEng="Please select an exercise!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeExercice").focus();
+ return;
+ }
+
+ if (codeMois<=" ")
+ {
+ v_msg="Veuillez sélectionner une période!";
+ v_msgEng="Please select a period!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeMois").focus();
+ return;
+ }
+
+ donnees = 'codePrestataire='+codePrestataire+'&codeExercice='+codeExercice+'&codeMois='+codeMois;
+
+ var div_wait = $('#div_wait');
+ div_wait.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdecompte/initierdecompte/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#inforegle").html(data);
+ },
+ complete: function() {
+ regle=$("#regle").val();
+
+ if(regle==-1)
+ {
+ v_msg="Problème lors de l\'initialisation!";
+ v_msgEng="Problem during initialization!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ else if(regle==0 || regle==2 || regle==3)
+ {
+ afficherdecompte();
+ }
+ else
+ {
+ // 9 => Décompte validé mais en attente de règlemen
+ // 1 => Décompte réglé
+ consulterdecompte();
+ }
+ }
+ });
+}
+
+function requetes_factures_police()
+{
+}
+
+
+function requetes_factures_police_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ numeroPolice = $("#numeroPolice").val();
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees += 'numeroPolice=' + numeroPolice;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ var div_export = $('#div_export_a');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ div_export.html(donnees_retour);
+ }
+ });
+}
+
+function requetes_factures_adherent_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ numeroAdherent = $("#numeroAdherent").val();
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees += 'numeroAdherent=' + numeroAdherent;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+
+function requetes_factures_beneficiaire_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
+
+ numeroBeneficiaire = $("#numeroBeneficiaire").val();
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees += 'numeroBeneficiaire=' + numeroBeneficiaire;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function requetes_factures_police_gar()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"gar/";
+
+ numeroPolice = $("#numeroPolice").val();
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees += 'numeroPolice=' + numeroPolice;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ var div_export = $('#div_export_a');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ div_export.html(donnees_retour);
+ }
+ });
+}
+
+function requetes_factures_adherent_gar()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"gar/";
+
+ numeroAdherent = $("#numeroAdherent").val();
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees += 'numeroAdherent=' + numeroAdherent;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function requetes_factures_beneficiaire_gar()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeRequete=$("#codeRequete").val();
+
+ if (codeRequete<=" ")
+ {
+ v_msg="Veuillez sélectionner une requête!";
+ v_msgEng="Please select a query!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeRequete").focus();
+ return;
+ }
+
+ v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"gar/";
+
+ numeroBeneficiaire = $("#numeroBeneficiaire").val();
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees += 'numeroBeneficiaire=' + numeroBeneficiaire;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ var div_export = $('#div_detail_requete');
+ div_export.html('' + '
');
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function appliquer_taux_ristourne()
+{
+ tauxRistourne = $("#tauxRistourne").val();
+
+ donnees = 'tauxRistourne=' + tauxRistourne;
+
+ var div_assure_a_retirer = $('#div_assure_a_retirer');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailretrait/appliquertauxristourne/",
+ type : 'post',
+ data : donnees,
+ success: function(data) {
+ div_assure_a_retirer.html(data);
+
+ var oTable = $('.tabliste').DataTable();
+ oTable.destroy();
+
+ setTimeout(function() {
+ appliquerDataTable();
+ }, 500);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function afficher_gc_assureur(idGc)
+{
+ if (idGc <=" ")
+ {
+ v_msg="Veuillez sélectionner un assureur!";
+ v_msgEng="Please select an insurer!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ window.location.assign($("#racineWeb" ).val()+"Fichegcassureur/"+idGc+"/");
+}
+
+function modifier_gc_assureur()
+{
+ idGc = $("#idGc" ).val()
+ if (idGc>"0")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Modifiergcassureur/"+idGc+"/");
+ }
+}
+
+function retour_gc_assureur()
+{
+ idGc = $("#idGc" ).val()
+ if (idGc>"0")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Fichegcassureur/"+idGc+"/");
+ }
+}
+
+function enregistrer_modif_gc_assureur()
+{
+ //
+ idGc = $("#idGc").val();
+ codeGcAssureur = $("#codeGcAssureur").val();
+ libelle = $("#libelle").val();
+ email = $("#emailGcAssureur").val();
+ gcTauxFraisReel = $("#gcTauxFraisReel").val();
+ gcTauxRedressement = $("#gcTauxRedressement").val();
+ gcTauxTva = $("#gcTauxTva").val();
+
+ adressePostale = $("#adressePostale").val();
+ numerodeCompteComptableRD = $("#numerodeCompteComptableRD").val();
+ adresseGeographique = $("#adresseGeographique").val();
+ numerodeCompteComptableTP = $("#numerodeCompteComptableTP").val();
+ numeroCompteContribuable = $("#numeroCompteContribuable").val();
+ codeModePaiementDemande = $("#codeModePaiementDemande").val();
+
+ fraisCarteAfn = $("#fraisCarteAfn").val();
+ fraisCarteAfn = fraisCarteAfn.replace(/ /g,"");
+ fraisCarteAfn = parseInt(fraisCarteAfn.replace(",","."),10);
+
+ fraisCarteRen = $("#fraisCarteRen").val();
+ fraisCarteRen = fraisCarteRen.replace(/ /g,"");
+ fraisCarteRen = parseInt(fraisCarteRen.replace(",","."),10);
+
+ fraisCarteImp = $("#fraisCarteImp").val();
+ fraisCarteImp = fraisCarteImp.replace(/ /g,"");
+ fraisCarteImp = parseInt(fraisCarteImp.replace(",","."),10);
+
+ typeGarant = $("#typeGarant").val();
+ telephoneGarant = $("#telephoneGarant").val();
+ representant = $("#representant").val();
+ siglerepresentant = $("#siglerepresentant").val();
+ servicerepresentant = $("#servicerepresentant").val();
+ telephonerepresentant = $("#telephonerepresentant").val();
+
+ gcTauxProvision = $("#gcTauxProvision").val();
+
+ gcForfaitProvision = $("#gcForfaitProvision").val();
+ gcForfaitProvision = gcForfaitProvision.replace(/ /g,"");
+ gcForfaitProvision = parseInt(gcForfaitProvision.replace(",","."),10);
+
+ gcTauxCommissionGerant = $("#gcTauxCommissionGerant").val();
+ gcTauxRistourne = $("#gcTauxRistourne").val();
+ gcLimiteConsommation = $("#gcLimiteConsommation").val();
+
+
+ codeTarifActe = $("#codeTarifActe").val();
+
+ seuilRdGarant = $("#seuilRdGarant").val();
+
+ codeTypeRemboursement = $("#codeTypeRemboursement").val();
+
+ encaissementExige = $("#encaissementExige").val();
+
+ if(codeGcAssureur<=" ")
+ {
+ v_msg="Veuillez indiquer le code!";
+ v_msgEng="Please enter the code!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGcAssureur").focus();
+ return;
+ }
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(typeGarant <=" ")
+ {
+ v_msg="Veuillez indiquer le type de garant!";
+ v_msgEng="Please indicate the type of guarantor!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#typeGarant").focus();
+ return;
+ }
+
+
+ donnees = 'idGc='+idGc+'&libelle='+libelle+'&codeGcAssureur='+codeGcAssureur;
+ donnees += '&email='+email+'&gcTauxFraisReel='+gcTauxFraisReel+'&gcTauxRedressement='+gcTauxRedressement +'&gcTauxTva='+gcTauxTva;
+ donnees += '&fraisCarteAfn='+fraisCarteAfn+'&fraisCarteRen='+fraisCarteRen+'&fraisCarteImp='+fraisCarteImp;
+ donnees += '&typeGarant='+typeGarant+'&telephoneGarant='+telephoneGarant+'&representant='+representant;
+ donnees += '&siglerepresentant='+siglerepresentant+'&servicerepresentant='+servicerepresentant+'&telephonerepresentant='+telephonerepresentant;
+
+ donnees += '&gcTauxProvision='+gcTauxProvision+'&gcForfaitProvision='+gcForfaitProvision+'&codeTarifActe='+codeTarifActe;
+
+ donnees += '&gcTauxCommissionGerant='+gcTauxCommissionGerant+'&gcTauxRistourne='+gcTauxRistourne+'&gcLimiteConsommation='+gcLimiteConsommation;
+
+ donnees += '&seuilRdGarant='+seuilRdGarant+'&codeTypeRemboursement='+codeTypeRemboursement;
+
+ donnees += '&adressePostale='+adressePostale+'&numerodeCompteComptableRD='+numerodeCompteComptableRD;
+ donnees += '&adresseGeographique='+adresseGeographique+'&numerodeCompteComptableTP='+numerodeCompteComptableTP;
+ donnees += '&numeroCompteContribuable='+numeroCompteContribuable+'&codeModePaiementDemande='+codeModePaiementDemande;
+ donnees += '&encaissementExige='+encaissementExige;
+ //alert(donnees);
+ //return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxgcassureur/enregistrermodif/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+
+ },
+ complete: function() {
+ retour_gc_assureur();
+ }
+ });
+}
+
+
+
+
+function maj_paramfacturegarant()
+{
+
+ idGc = $("#idGc").val();
+ codeConvention = "GAR"; //$("#codeConvention").val();
+ codePeriodiciteFacturationDeficit = $("#codePeriodiciteFacturationDeficit").val();
+ forfaitCautionPermanant = parseInt($("#forfaitCautionPermanant").val().replace(/ /g,""),10);
+
+
+
+ gcTauxRedressement = $("#gcTauxRedressement").val();
+ gcTauxTva = $("#gcTauxTva").val();
+
+
+ nbMoisCaution = $("#nbMoisCaution").val();
+ seuilComplementCaution = $("#seuilComplementCaution").val();
+
+ codeSourceFondGarantAppelFond = $("#codeSourceFondGarantAppelFond").val();
+ codeAssietteFacturationGarantAppelFond = $("#codeAssietteFacturationGarantAppelFond").val();
+ codePeriodiciteAppelFond = $("#codePeriodiciteAppelFond").val();
+
+ codeSourceFondGarantHonoraire = $("#codeSourceFondGarantHonoraire").val();
+ codeAssietteFacturationGarantHonoraire = $("#codeAssietteFacturationGarantHonoraire").val();
+ codePeriodiciteHonoraire = $("#codePeriodiciteAppelFond").val();
+
+ codeSourceFondGarantCaution = $("#codeSourceFondGarantCaution").val();
+ codeAssietteFacturationGarantCaution = $("#codeAssietteFacturationGarantCaution").val();
+ nbAdherent = parseInt($("#nbAdherent").val().replace(/ /g,""),10);
+ nbBeneficiaire = parseInt($("#nbBeneficiaire").val().replace(/ /g,""),10);
+
+
+ if (codeSourceFondGarantAppelFond == "BUD"){
+ montantBudget = parseInt($("#montantBudget").val().replace(/ /g,""),10);
+ }else{
+
+ montantBudget = "0";
+ }
+
+ if (codeSourceFondGarantHonoraire=="BUD" || codeSourceFondGarantHonoraire=="SIN"){
+ gcTauxFraisReel = $("#gcTauxFraisReel").val();
+ }else{
+ gcTauxFraisReel = "0";
+ }
+
+ if (codeSourceFondGarantHonoraire=="PRI"){
+ gcTauxCommissionGerant = $("#gcTauxCommissionGerant").val();
+ }else{
+ gcTauxCommissionGerant = "0";
+ }
+
+ if (codeSourceFondGarantHonoraire=="FOR"){
+ forfaitHonoraire = parseInt($("#forfaitHonoraire").val().replace(/ /g,""),10);
+
+ }else{
+ forfaitHonoraire = "0";
+ }
+
+
+ if(codeConvention<=" ")
+ {
+ v_msg="Veuillez indiquer la Convention!";
+ v_msgEng="Please enter the Convention!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeConvention").focus();
+ return;
+ }
+
+
+ if(codePeriodiciteFacturationDeficit<=" ")
+ {
+ v_msg="Veuillez renseigner la périodicité de la Facturation Déficit!";
+ v_msgEng="Please provide the frequency of Deficit Billing!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codePeriodiciteFacturationDeficit").focus();
+ return;
+ }
+
+
+ if(codePeriodiciteAppelFond<=" ")
+ {
+ v_msg="Veuillez renseigner la périodicité de l'appel de fonds!";
+ v_msgEng="Please indicate the frequency of the fundraising appeal!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codePeriodiciteAppelFond").focus();
+ return;
+ }
+
+
+ if(codePeriodiciteHonoraire<=" ")
+ {
+ v_msg="Veuillez renseigner la périodicité des honoraires!";
+ v_msgEng="Please provide the frequency of fees!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codePeriodiciteHonoraire").focus();
+ return;
+ }
+
+
+ donnees = 'idGc='+idGc+'&codeConvention='+codeConvention;
+ donnees += '&codePeriodiciteAppelFond='+codePeriodiciteAppelFond;
+
+ donnees += '&codePeriodiciteFacturationDeficit='+codePeriodiciteFacturationDeficit;
+ donnees += '&codePeriodiciteHonoraire='+codePeriodiciteHonoraire;
+ donnees += '&montantBudget='+montantBudget;
+
+ donnees += '&forfaitCautionPermanant='+forfaitCautionPermanant;
+ donnees += '&forfaitHonoraire='+forfaitHonoraire;
+
+
+ donnees += '&gcTauxFraisReel='+gcTauxFraisReel+'&gcTauxRedressement='+gcTauxRedressement;
+ donnees += '&gcTauxTva='+gcTauxTva+'&gcTauxCommissionGerant='+gcTauxCommissionGerant;
+ donnees += '&nbMoisCaution='+nbMoisCaution+'&seuilComplementCaution='+seuilComplementCaution;
+
+ donnees += '&codeSourceFondGarantAppelFond='+codeSourceFondGarantAppelFond;
+ donnees += '&codeAssietteFacturationGarantAppelFond='+codeAssietteFacturationGarantAppelFond;
+ donnees += '&codeSourceFondGarantHonoraire='+codeSourceFondGarantHonoraire;
+ donnees += '&codeAssietteFacturationGarantHonoraire='+codeAssietteFacturationGarantHonoraire;
+
+ donnees += '&codeSourceFondGarantCaution='+codeSourceFondGarantCaution;
+ donnees += '&codeAssietteFacturationGarantCaution='+codeAssietteFacturationGarantCaution;
+ donnees += '&nbAdherent='+nbAdherent;
+ donnees += '&nbBeneficiaire='+nbBeneficiaire;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxgcassureur/majparamfacturegarant/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+
+ },
+ complete: function() {
+ // retour_fiche_garant();
+ consulter_param_fact_garant();
+ }
+ });
+}
+
+
+
+function creer_gc_assureur()
+{
+ codeGcAssureur = $("#codeGcAssureur").val();
+ libelle = $("#libelle").val();
+ email = $("#emailGcAssureur").val();
+ gcTauxFraisReel = $("#gcTauxFraisReel").val();
+ gcTauxRedressement = $("#gcTauxRedressement").val();
+ gcTauxTva = $("#gcTauxTva").val();
+
+ adressePostale = $("#adressePostale").val();
+ numerodeCompteComptableRD = $("#numerodeCompteComptableRD").val();
+ adresseGeographique = $("#adresseGeographique").val();
+ numerodeCompteComptableTP = $("#numerodeCompteComptableTP").val();
+ numeroCompteContribuable = $("#numeroCompteContribuable").val();
+ codeModePaiementDemande = $("#codeModePaiementDemande").val();
+
+ fraisCarteAfn = $("#fraisCarteAfn").val();
+ fraisCarteAfn = fraisCarteAfn.replace(/ /g,"");
+ fraisCarteAfn = parseInt(fraisCarteAfn.replace(",","."),10);
+
+ fraisCarteRen = $("#fraisCarteRen").val();
+ fraisCarteRen = fraisCarteRen.replace(/ /g,"");
+ fraisCarteRen = parseInt(fraisCarteRen.replace(",","."),10);
+
+ fraisCarteImp = $("#fraisCarteImp").val();
+ fraisCarteImp = fraisCarteImp.replace(/ /g,"");
+ fraisCarteImp = parseInt(fraisCarteImp.replace(",","."),10);
+
+ typeGarant = $("#typeGarant").val();
+ telephoneGarant = $("#telephoneGarant").val();
+ representant = $("#representant").val();
+ siglerepresentant = $("#siglerepresentant").val();
+ servicerepresentant = $("#servicerepresentant").val();
+ telephonerepresentant = $("#telephonerepresentant").val();
+
+ gcTauxProvision = "0"; //$("#gcTauxProvision").val();
+
+ gcForfaitProvision = "0"; /*$("#gcForfaitProvision").val();
+ gcForfaitProvision = gcForfaitProvision.replace(/ /g,"");
+ gcForfaitProvision = parseInt(gcForfaitProvision.replace(",","."),10);*/
+
+ gcTauxCommissionGerant = $("#gcTauxCommissionGerant").val();
+ gcTauxRistourne = $("#gcTauxRistourne").val();
+ gcLimiteConsommation = $("#gcLimiteConsommation").val();
+
+
+ codeTarifActe = $("#codeTarifActe").val();
+
+ seuilRdGarant = $("#seuilRdGarant").val();
+
+ codeTypeRemboursement = $("#codeTypeRemboursement").val();
+
+ encaissementExige = $("#encaissementExige").val();
+
+ if(codeGcAssureur<=" ")
+ {
+ v_msg="Veuillez indiquer le code!";
+ v_msgEng="Please enter the code!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGcAssureur").focus();
+ return;
+ }
+
+ if(libelle<=" ")
+ {
+ v_msg="Veuillez indiquer le nom!";
+ v_msgEng="Please enter the name!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#libelle").focus();
+ return;
+ }
+
+ if(typeGarant <=" ")
+ {
+ v_msg="Veuillez indiquer le type de garant!";
+ v_msgEng="Please indicate the type of guarantor!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#typeGarant").focus();
+ return;
+ }
+
+ /*
+ if(gcTauxFraisReel<"0")
+ {
+ v_msg="Veuillez indiquer le taux frais réel!";
+ v_msgEng="Please indicate the charge rate";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#gcTauxFraisReel").focus();
+ return;
+ }
+
+ gcTauxFraisReel=gcTauxFraisReel.replace(",",".");
+ if(isNaN(gcTauxFraisReel))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#gcTauxFraisReel").val("0");
+ $("#gcTauxFraisReel").focus();
+ return;
+ }
+
+ if(gcTauxRedressement<"0")
+ {
+ v_msg="Veuillez indiquer le taux redressement!";
+ v_msgEng="Please indicate the recovery rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#gcTauxRedressement").focus();
+ return;
+ }
+
+ gcTauxRedressement=gcTauxRedressement.replace(",",".");
+ // $("#gcTauxRedressement").val(gcTauxRedressement);
+ if(isNaN(gcTauxRedressement))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#gcTauxRedressement").val("0");
+ $("#gcTauxRedressement").focus();
+ return;
+ }
+
+ if(gcTauxTva<"0")
+ {
+ v_msg="Veuillez indiquer le taux de TVA!";
+ v_msgEng="Please indicate the VAT rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#gcTauxTva").focus();
+ return;
+ }
+
+ gcTauxTva=gcTauxTva.replace(",",".");
+ if(isNaN(gcTauxTva))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#gcTauxTva").val("0");
+ $("#gcTauxTva").focus();
+ return;
+ }
+
+ if(fraisCarteAfn<"0")
+ {
+ v_msg="Veuillez indiquer les frais pour une nouvelle carte!";
+ v_msgEng="Please indicate the fees for a new card!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#fraisCarteAfn").focus();
+ return;
+ }
+
+ if(fraisCarteRen<"0")
+ {
+ v_msg="Veuillez indiquer les frais pour un renouvellement de carte!";
+ v_msgEng="Please indicate the fees for a card renewal!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#fraisCarteRen").focus();
+ return;
+ }
+
+ if(fraisCarteImp<"0")
+ {
+ v_msg="Veuillez indiquer les frais pour une ré-impression de carte!";
+ v_msgEng="Please indicate the fees for a re-printing of the card!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#fraisCarteImp").focus();
+ return;
+ }
+
+ */
+
+ donnees = 'libelle='+libelle+'&codeGcAssureur='+codeGcAssureur;
+ donnees += '&email='+email+'&gcTauxFraisReel='+gcTauxFraisReel+'&gcTauxRedressement='+gcTauxRedressement +'&gcTauxTva='+gcTauxTva;
+ donnees += '&fraisCarteAfn='+fraisCarteAfn+'&fraisCarteRen='+fraisCarteRen+'&fraisCarteImp='+fraisCarteImp;
+ donnees += '&typeGarant='+typeGarant+'&telephoneGarant='+telephoneGarant+'&representant='+representant;
+ donnees += '&siglerepresentant='+siglerepresentant+'&servicerepresentant='+servicerepresentant+'&telephonerepresentant='+telephonerepresentant;
+
+ donnees += '&gcTauxProvision='+gcTauxProvision+'&gcForfaitProvision='+gcForfaitProvision+'&codeTarifActe='+codeTarifActe;
+
+ donnees += '&gcTauxCommissionGerant='+gcTauxCommissionGerant+'&gcTauxRistourne='+gcTauxRistourne+'&gcLimiteConsommation='+gcLimiteConsommation;
+
+ donnees += '&seuilRdGarant='+seuilRdGarant+'&codeTypeRemboursement='+codeTypeRemboursement;
+
+ donnees += '&adressePostale='+adressePostale+'&numerodeCompteComptableRD='+numerodeCompteComptableRD;
+ donnees += '&adresseGeographique='+adresseGeographique+'&numerodeCompteComptableTP='+numerodeCompteComptableTP;
+ donnees += '&numeroCompteContribuable='+numeroCompteContribuable+'&codeModePaiementDemande='+codeModePaiementDemande;
+ donnees += '&encaissementExige='+encaissementExige;
+
+
+ /*
+ alert(typeGarant);
+ return;
+ */
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxgcassureur/ajouter/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ if(data.length > 5){
+ var str = data.split('/');
+ alert_ebene(str[0],str[1]);
+ }else{
+ retour_liste_gc_assureur();
+ }
+ },
+ complete: function() {
+ retour_liste_gc_assureur();
+ }
+ });
+}
+
+function retour_liste_gc_assureur()
+{
+ window.location.assign($("#racineWeb" ).val()+"Gcassureur/");
+}
+
+function activer_gestion_confiee()
+{
+ 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;
+ }
+
+
+ gestionConfiee=$("#gestionConfiee").val();
+ if (gestionConfiee=="1")
+ {
+ v_msg="Gestion confiée déjà activée!";
+ v_msgEng="Management entrusted already activated!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous la gestion confiée pour cette police?";
+ v_msgEng="Do you confirm the management entrusted for this policy?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ window.location.assign($("#racineWeb" ).val()+"Fichepolice/activergc/"+$("#idPolice_C").val()+"/");
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+
+}
+
+function afficher_gc_police(idPolice, idGcpolice)
+{
+ if (idPolice <=" ")
+ {
+ v_msg="Veuillez sélectionner une police!";
+ v_msgEng="Please select a policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ if (idGcpolice=="0")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Creergcpolice/"+idPolice+"/");
+ }
+ else
+ {
+ window.location.assign($("#racineWeb" ).val()+"Fichegcpolice/"+idPolice+"/");
+ }
+}
+
+
+
+function retour_liste_gc_police()
+{
+ window.location.assign($("#racineWeb" ).val()+"Gcpolices/");
+}
+
+function creer_gc_police()
+{
+ idPolice = $("#idPolice").val();
+
+ codeGcAssureur = $("#codeGcAssureur").val();
+ tauxFraisReel = $("#tauxFraisReel").val();
+ tauxRedressement = $("#tauxRedressement").val();
+ tauxTva = $("#tauxTva").val();
+
+ fraisCarteAfn = $("#fraisCarteAfn").val();
+ fraisCarteRen = $("#fraisCarteRen").val();
+ fraisCarteImp = $("#fraisCarteImp").val();
+
+ if(codeGcAssureur<=" ")
+ {
+ v_msg="Veuillez sélectionner un garant!";
+ v_msgEng="Please select a guarantor!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGcAssureur").focus();
+ return;
+ }
+
+ if(tauxFraisReel<"0")
+ {
+ v_msg="Veuillez indiquer le taux frais réel!";
+ v_msgEng="Please indicate the charge rate";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tauxFraisReel").focus();
+ return;
+ }
+
+ tauxFraisReel=tauxFraisReel.replace(",",".");
+ if(isNaN(tauxFraisReel))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tauxFraisReel").val("0");
+ $("#tauxFraisReel").focus();
+ return;
+ }
+
+ if(tauxRedressement<"0")
+ {
+ v_msg="Veuillez indiquer le taux redressement!";
+ v_msgEng="Please indicate the recovery rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tauxRedressement").focus();
+ return;
+ }
+
+ tauxRedressement=tauxRedressement.replace(",",".");
+ if(isNaN(tauxRedressement))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tauxRedressement").val("0");
+ $("#tauxRedressement").focus();
+ return;
+ }
+
+
+ if(tauxTva<"0")
+ {
+ v_msg="Veuillez indiquer le taux de TVA!";
+ v_msgEng="Please indicate the VAT rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tauxTva").focus();
+ return;
+ }
+
+ tauxTva=tauxTva.replace(",",".");
+ if(isNaN(tauxTva))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tauxTva").val("0");
+ $("#tauxTva").focus();
+ return;
+ }
+
+ if(fraisCarteAfn<"0")
+ {
+ v_msg="Veuillez indiquer les frais pour une nouvelle carte!";
+ v_msgEng="Please indicate the fees for a new card!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#fraisCarteAfn").focus();
+ return;
+ }
+
+ if(fraisCarteRen<"0")
+ {
+ v_msg="Veuillez indiquer les frais pour un renouvellement de carte!";
+ v_msgEng="Please indicate the fees for a card renewal!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#fraisCarteRen").focus();
+ return;
+ }
+
+ if(fraisCarteImp<"0")
+ {
+ v_msg="Veuillez indiquer les frais pour une ré-impression de carte!";
+ v_msgEng="Please indicate the fees for a re-printing of the card!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#fraisCarteImp").focus();
+ return;
+ }
+
+ donnees = 'idPolice='+idPolice+'&codeGcAssureur='+codeGcAssureur;
+ donnees += '&tauxFraisReel='+tauxFraisReel+'&tauxRedressement='+tauxRedressement +'&tauxTva='+tauxTva;
+ donnees += '&fraisCarteAfn='+fraisCarteAfn+'&fraisCarteRen='+fraisCarteRen+'&fraisCarteImp='+fraisCarteImp;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcreergcpolice/creerpolicegc/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ retour_liste_gc_police();
+ }
+ });
+}
+
+function choisir_gc_assureur()
+{
+
+ idPolice=$("#idPolice").val();
+ codeGcAssureur=$("#codeGcAssureur").val();
+
+ if (codeGcAssureur<=" ")
+ {
+ v_msg="Veuillez sélectionner un garant!";
+ v_msgEng="Please select a guarantor!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ donnees = 'idPolice='+idPolice+'&codeGcAssureur='+codeGcAssureur;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcreergcpolice/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_gc").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+
+function modifier_gc_police(idPolice)
+{
+ idPolice = $("#idPolice").val();
+
+ if (idPolice <=" ")
+ {
+ v_msg="Veuillez sélectionner une police!";
+ v_msgEng="Please select a policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+ window.location.assign($("#racineWeb" ).val()+"Modifiergcpolice/"+idPolice+"/");
+}
+
+function enregistrer_modif_gc_police()
+{
+ idPolice = $("#idPolice").val();
+
+ tauxFraisReel = $("#tauxFraisReel").val();
+ tauxRedressement = $("#tauxRedressement").val();
+ tauxTva = $("#tauxTva").val();
+
+ fraisCarteAfn = $("#fraisCarteAfn").val();
+ fraisCarteRen = $("#fraisCarteRen").val();
+ fraisCarteImp = $("#fraisCarteImp").val();
+
+ if(tauxFraisReel<"0")
+ {
+ v_msg="Veuillez indiquer le taux frais réel!";
+ v_msgEng="Please indicate the charge rate";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tauxFraisReel").focus();
+ return;
+ }
+
+ tauxFraisReel=tauxFraisReel.replace(",",".");
+ $("#tauxFraisReel").val(tauxFraisReel);
+ if(isNaN(tauxFraisReel))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tauxFraisReel").val("0");
+ $("#tauxFraisReel").focus();
+ return;
+ }
+
+ if(tauxRedressement<"0")
+ {
+ v_msg="Veuillez indiquer le taux redressement!";
+ v_msgEng="Please indicate the recovery rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tauxRedressement").focus();
+ return;
+ }
+
+ tauxRedressement=tauxRedressement.replace(",",".");
+ $("#tauxRedressement").val(tauxRedressement);
+ if(isNaN(tauxRedressement))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tauxRedressement").val("0");
+ $("#tauxRedressement").focus();
+ return;
+ }
+
+ if(tauxTva<"0")
+ {
+ v_msg="Veuillez indiquer le taux de TVA!";
+ v_msgEng="Please indicate the VAT rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tauxTva").focus();
+ return;
+ }
+
+ tauxTva=tauxTva.replace(",",".");
+ $("#tauxTva").val(tauxTva);
+ if(isNaN(tauxTva))
+ {
+ v_msg="Valeur numérique exigée!";
+ v_msgEng="Numeric value required!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tauxTva").val("0");
+ $("#tauxTva").focus();
+ return;
+ }
+
+ if(fraisCarteAfn<"0")
+ {
+ v_msg="Veuillez indiquer les frais pour une nouvelle carte!";
+ v_msgEng="Please indicate the fees for a new card!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#fraisCarteAfn").focus();
+ return;
+ }
+
+ if(fraisCarteRen<"0")
+ {
+ v_msg="Veuillez indiquer les frais pour un renouvellement de carte!";
+ v_msgEng="Please indicate the fees for a card renewal!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#fraisCarteRen").focus();
+ return;
+ }
+
+ if(fraisCarteImp<"0")
+ {
+ v_msg="Veuillez indiquer les frais pour une ré-impression de carte!";
+ v_msgEng="Please indicate the fees for a re-printing of the card!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#fraisCarteImp").focus();
+ return;
+ }
+
+ donnees = 'idPolice='+idPolice;
+ donnees += '&tauxFraisReel='+tauxFraisReel+'&tauxRedressement='+tauxRedressement +'&tauxTva='+tauxTva;
+ donnees += '&fraisCarteAfn='+fraisCarteAfn+'&fraisCarteRen='+fraisCarteRen+'&fraisCarteImp='+fraisCarteImp;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcreergcpolice/modifierpolicegc/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ retour_fiche_gc_police();
+ }
+ });
+}
+
+function retour_fiche_gc_police()
+{
+ idPolice = $("#idPolice").val();
+ window.location.assign($("#racineWeb" ).val()+"Fichegcpolice/"+idPolice+"/");
+}
+
+function desactiver_gestion_confiee()
+{
+ idPolice = $("#idPolice").val();
+
+ nbFactureGc = $("#nbFactureGc").val();
+
+ if (nbFactureGc!=0)
+ {
+ v_msg="Cette police possède des factures dejà traitées en gestion confiée!";
+ v_msgEng="This policy has invoices already processed in entrusted management!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous le retrait de cette police de la gestion confiée?";
+ v_msgEng="Do you confirm the withdrawal of this policy from the entrusted management?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ window.location.assign($("#racineWeb" ).val()+"Fichepolice/desactivergc/"+idPolice+"/");
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+
+function requetes_factures_gc()
+{
+ $('#div_export_a').html("");
+
+ donnees = "";
+ donnees_retour = "";
+
+
+ codeGcAssureur = $("#codeGcAssureur").val();
+ if(codeGcAssureur<=" ")
+ {
+ v_msg="Veuillez sélectionner un garant!";
+ v_msgEng="Please select a guarantor!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGcAssureur").focus();
+ return;
+ }
+
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees += 'codeGcAssureur=' + codeGcAssureur;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ $("#div_detail_requete").html('' + '
');
+
+ v_url = $("#racineWeb").val()+"Ajaxrequetefacturegc/";
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $("#div_detail_requete").html(donnees_retour);
+ $("#nbligne").val("Lignes : "+$("#nbligne_info").val());
+ }
+ });
+}
+
+function requetes_factures_gc_export()
+{
+ $('#div_export_a').html("");
+ donnees = "";
+ donnees_retour = "";
+
+ codeGcAssureur = $("#codeGcAssureur").val();
+ if(codeGcAssureur<=" ")
+ {
+ v_msg="Veuillez sélectionner un garant!";
+ v_msgEng="Please select a guarantor!";
+ 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('' + '
');
+
+ v_url = $("#racineWeb").val()+"Ajaxrequetefacturegcexport/";
+
+ $.ajax({
+ url: v_url,
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ donnees_retour = data;
+ },
+ complete: function() {
+ $('#div_detail_requete').html("");
+ $('#div_export_a').html(donnees_retour);
+ }
+ });
+}
+
+function afficher_facture_gc(idFacture)
+{
+}
+
+//
+
+function affciher_factures_gc_payable()
+{
+}
+
+function initier_gc_reglement()
+{
+ codeGcAssureur = $("#codeGcAssureur").val();
+ if(codeGcAssureur<=" ")
+ {
+ v_msg="Veuillez sélectionner un garant!";
+ v_msgEng="Please select a guarantor!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGcAssureur").focus();
+ return;
+ }
+
+ donnees = 'codeGcAssureur='+codeGcAssureur;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxgcregelement/gcinitreglement/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ afficher_new_gc_reglement();
+ }
+ });
+}
+
+function afficher_new_gc_reglement()
+{
+ window.location.assign($("#racineWeb" ).val()+"Gcnewfacturation/");
+}
+
+
+function confirmer_new_facturation_gc()
+{
+ observations = $("#observations").val();
+
+ if (observations<=" ")
+ {
+ v_msg="Veuillez saisir quelque chose!";
+ v_msgEng="Please enter something!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#observations").focus();
+ return;
+ }
+
+ donnees = 'observations='+observations;
+
+ v_msg="Confirmez-vous la nouvelle facturation?";
+ v_msgEng="Do you confirm the new billing?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxgcregelement/confirminitreglement/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ afficher_gc_reglement();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+
+function lister_reglements_gc()
+{
+ codeGcAssureur = $("#codeGcAssureur").val();
+ if(codeGcAssureur<=" ")
+ {
+ v_msg="Veuillez sélectionner un garant!";
+ v_msgEng="Please select a guarantor!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeGcAssureur").focus();
+ return;
+ }
+
+ dateFacture1 = $("#dateFacture1").val();
+ dateFacture2 = $("#dateFacture2").val();
+
+ donnees = 'codeGcAssureur=' + codeGcAssureur;
+ donnees += '&dateFacture1=' + dateFacture1;
+ donnees += '&dateFacture2=' + dateFacture2;
+
+ $("#div_detail").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlistereglementsgc/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ $("#div_detail").html(data);
+ },
+ complete: function() {
+ }
+ });
+}
+
+function aller_a_gcfacturation()
+{
+ window.location.assign($("#racineWeb" ).val()+"Gcfacturation/");
+}
+
+//
+
+function recalculer_solde_famille()
+{
+ var div_test = $('#div_test');
+ div_test.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxadherent/recalculersoldefamille/",
+ type: 'POST',
+ success: function(data)
+ {
+ div_test.html("");
+ },
+ error : function(resultat, statut, erreur)
+ {
+ },
+ complete: function(data)
+ {
+ window.location.assign($("#racineWeb" ).val()+"Plafondadherent/");
+ }
+ });
+}
+
+function ajax_context_gc_reglement_id(idGcReglement)
+{
+ donnees = 'idGcReglement='+idGcReglement;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/getcontextbayid/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ complete: function() {
+ }
+ });
+}
+
+function afficher_gc_reglement_id(idGcReglement, valide)
+{
+ donnees = 'idGcReglement='+idGcReglement;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcontextgcreglement/getcontextbyid/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ complete: function() {
+
+ if (valide!="1")
+ {
+ window.location.assign($("#racineWeb" ).val()+"Gcreglement/");
+ }
+ else
+ {
+ window.location.assign($("#racineWeb" ).val()+"Gcreglementcons/");
+ }
+ }
+ });
+}
+
+function afficher_gc_reglement()
+{
+ window.location.assign($("#racineWeb" ).val()+"Gcreglement/");
+}
+
+
+function ajaxchangercompsantegcreglement()
+{
+ $("#detail_facture").html('');
+ $("#div_entete_sel").html('');
+
+ codeComposante=$(
\ No newline at end of file