From 4b7a442fddac4b0e1f52800cca873b49d55644fa Mon Sep 17 00:00:00 2001 From: KANE LAZENI Date: Mon, 12 Jan 2026 19:41:28 +0000 Subject: [PATCH] a --- .../ControleurHistoriqueremboursement.php | 31 + Js/fonctions_2025_07_08.js | 43644 ---------------- Vue/Historiqueremboursement/index.php | 93 + 3 files changed, 124 insertions(+), 43644 deletions(-) create mode 100755 Controleur/ControleurHistoriqueremboursement.php delete mode 100644 Js/fonctions_2025_07_08.js create mode 100755 Vue/Historiqueremboursement/index.php diff --git a/Controleur/ControleurHistoriqueremboursement.php b/Controleur/ControleurHistoriqueremboursement.php new file mode 100755 index 0000000..bea3c3a --- /dev/null +++ b/Controleur/ControleurHistoriqueremboursement.php @@ -0,0 +1,31 @@ +menuvue = new Menuvueutilisateur(); + $this->menuvue->getMenuVue('Historiqueremboursement'); + + $this->remboursement = new Remboursement(); + + $_SESSION['idDemandeRemboursement'] = '0'; + } + + public function index() { + $d1 = $_SESSION['debutMois_C']; + $d2 = date('Y-m-d'); + $codeEtatDemandeRemboursement = $_SESSION['codeEtatDemandeRemboursement'] ?? "0"; + + $demandes = $this->remboursement->getDemandesRemboursement($d1, $d2, $codeEtatDemandeRemboursement); + + $reponsedemande = $this->remboursement->getEtatRemboursement(); + + $this->genererVue(array('demandes' => $demandes, 'reponsedemande' => $reponsedemande)); + } + // +} \ No newline at end of file diff --git a/Js/fonctions_2025_07_08.js b/Js/fonctions_2025_07_08.js deleted file mode 100644 index 67fa3a2..0000000 --- a/Js/fonctions_2025_07_08.js +++ /dev/null @@ -1,43644 +0,0 @@ -function alert_ebene(p_msg, p_msg_eng) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - alert(p_msg_eng); - } - else - { - alert(p_msg); - } -} - -function alert_ebene_ajax(p_msg, p_msg_eng) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - alert(p_msg_eng); - } - else - { - alert(p_msg); - } -} - -function confirm_ebene(p_msg, p_msg_eng) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - return confirm(p_msg_eng); - } - else - { - return confirm(p_msg); - } -} - -function prompt_ebene(p_msg, p_msg_eng, p_retour) -{ - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - return prompt(p_msg_eng, p_retour); - } - else - { - return prompt(p_msg, p_retour); - } -} - -function addslashes(ch) -{ - ch = ch.replace(/\\/g,"\\\\"); - ch = ch.replace(/\'/g,"\\'"); - ch = ch.replace(/\"/g,"\\\""); - return ch; -} - -function adherents_police() -{ - if ($("#idPolice_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Listeadherent/"); - } -} - -function college_police() -{ - if ($("#idPolice_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Collegepolice/"); - } -} - -function facturer_police() -{ - /* - // 06/11/2020 - if(est_ce_police_famille()) - { - facturer_police_familiale(); - return; - } - */ - - // 08/12/2020 - if(est_ce_police_famille()) - { - v_msg="Oprétaion non autorisée!"; - v_msgEng="Unauthorized operation!"; - alert_ebene(v_msg, v_msgEng); - - // afficher_police_id(); - return; - } - - - etat=$("#codeEtatPolice_C").val(); - - if (etat=="RE") - { - v_msg="Attention! Police résiliée!"; - v_msgEng="Warning! Terminated policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="AN") - { - v_msg="Attention! Police annulée!"; - v_msgEng="Warning! Canceled policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#idPolice_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Facturerpolice/"); - } -} - -$.prototype.enable = function () { - $.each(this, function (index, el) { - $(el).removeAttr('disabled'); - }); -} - -$.prototype.disable = function () { - $.each(this, function (index, el) { - $(el).attr('disabled', 'disabled'); - }); -} - -$.prototype.unreadable = function () { - $.each(this, function (index, el) { - $(el).attr('READONLY', 'READONLY'); - }); -} - -$.prototype.readable = function () { - $.each(this, function (index, el) { - $(el).removeAttr('READONLY'); - }); -} - -Date.estAnneeBissextile = function (annee) { - return (((annee % 4 === 0) && (annee % 100 !== 0)) || (annee % 400 === 0)); -}; - -Date.getDaysInMonth = function (annee, month) { - return [31, (Date.estAnneeBissextile(annee) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; -}; - -Date.prototype.estAnneeBissextile = function () { - return Date.estAnneeBissextile(this.getFullYear()); -}; - -Date.prototype.getDaysInMonth = function () { - return Date.getDaysInMonth(this.getFullYear(), this.getMonth()); -}; - -Date.prototype.addMonths = function (value) { - var n = this.getDate(); - this.setDate(1); - this.setMonth(this.getMonth() + value); - this.setDate(Math.min(n, this.getDaysInMonth())); - this.setDate(this.getDate()-1); - return this; -}; - -$( ".datepicker" ).datepicker({ - inline: true, - changeMonth: true, - changeYear: true, - yearRange: "c-60:c+20" - -}); - -/*les fonctions courantes et globales */ - -function get_age(dater) -{ - var td2 = $("#datejourfr_C").datepicker("getDate"); - return age = td2.getFullYear()-dater.getFullYear(); -} - -function controle_age(dater, codeLienParente) -{ - age = get_age(dater); - $("#agepersonne").val("Âge : "+age); - - if (age>65) - { - v_msg="Âge "+age+" supérieur à 65 ans!"; - v_msgEng="Age "+age+" over 65!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if ( (codeLienParente=="E")&& (age>21) ) - { - v_msg="Âge "+age+" => Enfant âgé de plus de 21 ans!"; - v_msgEng="Âge "+age+" => Child over 21 years old!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if ( (codeLienParente=="O")&& (age>21) ) - { - v_msg="Âge "+age+" => Enfant âgé de plus de 21 ans!"; - v_msgEng="Âge "+age+" => Child over 21 years old!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - return true; -} - -/* Début JS client */ -function selectionner_client(id,no) -{ - $("#idClient_C").val(id); - $("#numeroClient_C").val(no); - $("#nomClient_C").val(""); -} - -function selectionner_client_d(id,no) -{ - $("#idClient_d_C").val(id); - $("#numeroClient_d_C").val(no); - $("#nomClient_d_C").val(""); -} - -function afficher_client_id() -{ - idClient=$("#idClient_C" ).val(); - - if (idClient>"") - { - ajax_context_client_afficher(idClient); - } -} - -function afficher_client_d_id() -{ - idClient=$("#idClient_d_C" ).val(); - - if (idClient>"") - { - ajax_context_client_d_afficher(idClient); - } -} - - -/* Fin JS client */ - -/* Début JS police */ -function selectionner_police(id,no) -{ - $("#idPolice_C" ).val(id); - $("#numeroPolice_C" ).val(no); -} - -function selectionner_police_d(id,no) -{ - $("#idPolice_d_C" ).val(id); - $("#numeroPolice_d_C" ).val(no); -} - -function afficher_police_id() -{ - idPolice=$("#idPolice_C" ).val(); - - if (idPolice>"") - { - ajax_context_police_afficher(idPolice); - } -} - -function afficher_police_d_id() -{ - idPolice=$("#idPolice_d_C" ).val(); - - if (idPolice>"") - { - window.location.assign($("#racineWeb" ).val()+"Fichedevis/"); - } -} - -function afficher_police_d_id_init() -{ - idPolice=$("#idPolice_d_C" ).val(); - - if (idPolice>"") - { - ajax_context_police_d_afficher(idPolice); - } -} - -function detail_quittance(idQuittance) -{ - if (idQuittance>"0") - { - window.location.assign($("#racineWeb" ).val()+"Beneficiairequittance/"+idQuittance+"/"); - } -} - - -/* Fin JS client */ - -/* Début JS adherent */ -function selectionner_adherent(id,no) -{ - $("#idAdherent_C" ).val(id); - $("#numeroAdherent_C" ).val(no); -} - -function afficher_adherent() -{ - if ($("#numeroAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#numeroAdherent_C" ).val()+"/"); - } -} - -function afficher_adherent_id() -{ - codeTypeContrat = $("#codeTypeContrat_C").val(); - if (codeTypeContrat=="F") - { - afficher_adherent_familiale_id(); - return; - } - - idAdherent = $("#idAdherent_C" ).val(); - if (idAdherent>"0") - { - window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#idAdherent_C" ).val()+"/"); - } -} -/* Fin JS adherent */ - -/* Début JS bénéficiare */ -function selectionner_beneficiaire(id,no) -{ - $("#idBeneficiaire_C" ).val(id); - $("#numeroBeneficiaire_C" ).val(no); -} - -function afficher_beneficiaire() -{ - if ($("#numeroBeneficiaire_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"+$("#numeroBeneficiaire_C" ).val()+"/"); - } -} - -function afficher_beneficiaire_id() -{ - codeTypeContrat = $("#codeTypeContrat_C").val(); - if (codeTypeContrat=="F") - { - afficher_beneficiaire_familiale_(); - return; - } - - idBeneficiaire = $("#idBeneficiaire_C" ).val(); - if ($("#idBeneficiaire_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"+idBeneficiaire+"/"); - } -} - -function modifier_prime_beneficiaire(idBeneficiaire) -{ - // alert("Attention!"); - // return; - - if (idBeneficiaire>"0") - { - window.location.assign($("#racineWeb" ).val()+"Modifierprimebeneficiaire/"+$("#idBeneficiaire_C" ).val()+"/"); - } -} - -function afficher_adherent_assure() -{ - if ($("#idAdherent_C" ).val()<=" ") - { - return; - } - window.location.assign($("#racineWeb" ).val()+"ficheadherentassure/"); -} - - -function afficher_echeance_assure() -{ - if ($("#idAdherent_C" ).val()<=" ") - { - return; - } - window.location.assign($("#racineWeb" ).val()+"Echeanceassure/"); -} - -function afficher_echeance_adherent() -{ - if ($("#idAdherent_C" ).val()<=" ") - { - return; - } - window.location.assign($("#racineWeb" ).val()+"Echeanceadherent/"); -} - -function afficher_assure() -{ - if ($("#idAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"ficheadherentassure/"+$("#idAdherent_C" ).val()+"/"); - } -} - -function afficher_beneficiaire_assure() -{ - if ($("#idBeneficiaire_C" ).val()<=" ") - { - return; - } - window.location.assign($("#racineWeb" ).val()+"fichebeneficiaireassure/"+$("#idBeneficiaire_C" ).val()+"/"); -} - -function changer_photo_beneficiaire_id() -{ -} - -function fermerFenetre() -{ - v_msg="Etes-vous sur de vouloir quitter?"; - v_msgEng="Are you sure you want to exit?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - ajax_deconnexion(); - } -} - -function supprimer_ligne_Tb(id,libelle) -{ - v_msg="Confirmez-vous la suppression de la ligne : "+libelle+"?"; - v_msgEng="Do you confirm the deletion of the line : "+libelle+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Tbliste"+$("#nomtable").val()+"/supprimer/"+id+"/"); - } -} - -function modifier_ligne_Tb() -{ - if ($("#idLigne" ).val()<="") - { - v_msg="Veuillez sélectionner une ligne!"; - v_msgEng="Please select a line!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Tbmodifier"+$("#nomtable").val()+"/"+$("#idLigne" ).val()+"/"); -} - -function selectionner_ligne_Tb(id) -{ - $("#idLigne" ).val(id); -} - -/* */ - -function selectionner_Tb(lientable) -{ - $("#lientable" ).val(lientable); -} - -function modifier_Tb() -{ - if ($("#lientable" ).val()<="") - { - v_msg="Veuillez sélectionner une table!"; - v_msgEng="Please select a table!"; - alert_ebene(v_msg, v_msgEng); - - return; - } else - window.location.assign($("#racineWeb" ).val()+$("#lientable" ).val()); -} - -function afficher_Tb() -{ - if ($("#lientable" ).val()<="") - { - v_msg="Veuillez sélectionner une table!"; - v_msgEng="Please select a table!"; - alert_ebene(v_msg, v_msgEng); - - return; - } else - window.location.assign($("#racineWeb" ).val()+$("#lientable" ).val()); -} - -function ajaxListerVille() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxville/", - type : 'post', - data: "codePays="+$("#codePays").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listeville").html(data); - }, - complete: function() { - } - }); -} - -function ajaxListerLocalite() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlocalite/", - type : 'post', - data: "codePays="+$("#codePays").val()+"&codeVille="+$("#codeVille").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listelocalite").html(data); - } - }); -} - -function controletytpeclient() -{ - if ($("#typeClient").val()=="E") - { - $("#zonemandat").show(); - $("#zoneparticulier").hide(); - } else - { - $("#zoneparticulier").show(); - $("#zonemandat").hide(); - } -} - -function enregistrer_client() -{ - $("#formficheclient").submit(); -} - -function modifier_client() -{ - if ($("#idClient_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Modifierclient/"); - } -} - -function modifier_client_d() -{ - if ($("#idClient_d_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Modifierprospect/"); - } -} - -function modifier_police() -{ - idPolice = $("#idPolice_C").val(); - if (idPolice>"0") - { - window.location.assign($("#racineWeb" ).val()+"Modifierpolice/"); - } -} - -function modifier_devis() -{ - idPolice = $("#idPolice_d_C").val(); - - transforme = $("#transforme").val(); - if (transforme=="1") - { - v_msg="Devis déjà transformé!"; - v_msgEng="Quote already transformed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (idPolice>"0") - { - window.location.assign($("#racineWeb" ).val()+"Modifierdevis/"); - } -} - - -function transformer_devis() -{ - idDevis = $("#idPolice_d_C").val(); - - transforme = $("#transforme").val(); - if (transforme=="1") - { - v_msg="Devis déjà transformé!"; - v_msgEng="Quote already transformed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - primeTtc_total = $("#primeTtc_total").val(); - - if (primeTtc_total=="0") - { - v_msg="Rien à transformer!"; - v_msgEng="Nothing to transform!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous la transformation en contrat?"; - v_msgEng="Do you confirm the transformation into a contract?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - numeroOptionTarif = $("#numeroOptionTarif").val(); - donnees = 'idDevis='+idDevis+"&numeroOptionTarif="+numeroOptionTarif; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtransformerdevis/", - type: 'POST', - data: donnees, - success: function() { - }, - error: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Fichepolice/"); - } - }); - } -} - - -function supprimer_client() -{ - v_msg="Confirmez-vous la suppression de ce client?"; - v_msgEng="Do you confirm the deletion of this customer?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Ficheclient/supprimer/"+$("#idClient_C").val()+"/"); - } -} - -function supprimer_prospect() -{ - v_msg="Confirmez-vous la suppression de ce prospect?"; - v_msgEng="Do you confirm the deletion of this prospect?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Ficheprospect/supprimer/"+$("#idClient_d_C").val()+"/"); - } -} - -/* avant 02/01/2020 -function CalculerEcheance() -{ - $("#dateEcheance").disable(); - - codePeriodicite=$("#codePeriodicite").val(); - - var typdate = $("#dateEffet").datepicker("getDate"); - - switch (codePeriodicite) { - case "A": - typdate.addMonths(12); - break; - case "L": - $("#dateEcheance").enable(); - typdate = $("#dateEcheance").datepicker("getDate"); - break; - default: - typdate.addMonths(12); - } - - $( "#dateEcheance" ).datepicker( "setDate", typdate ); -} -*/ - -function CalculerEcheance() -{ - $("#dateEcheance").disable(); - - codePeriodicite=$("#codePeriodicite").val(); - - var typdate = $("#dateEffet").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": - $("#dateEcheance").enable(); - typdate = $("#dateEcheance").datepicker("getDate"); - break; - default: - typdate.addMonths(12); - } - $( "#dateEcheance" ).datepicker( "setDate", typdate ); -} - -function CalculerFin() -{ - $("#dateFin").disable(); - - codeFractionnement=$("#codeFractionnement").val(); - - var typdate = $("#dateEffet").datepicker("getDate"); - var dtech = $("#dateEcheance").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; - } - $( "#dateFin" ).datepicker( "setDate", typdate ); -} - -function ControlerEcheance() -{ - codePeriodicite=$("#codePeriodicite").val(); - if (codePeriodicite!="L") return true; - else { - var eff = $("#dateEffet").datepicker("getDate"); - var ech = $("#dateEcheance").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 ChangerPass() -{ - if ($("#ancmdp" ).val()<=' ') - { - alert_ebene("Veuillez saisir l\'ancien mot de passe!", "Please enter the old password!"); - $("#ancmdp").focus(); - return false; - } - - if ($("#nvmdp" ).val()<=' ') - { - v_msg="Veuillez saisir un mot de passe!"; - v_msgEng="Please enter a password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - if ($("#nvmdp").val()=='0000' || $("#nvmdp").val()=='radiant') - { - alert_ebene("Veuillez changer de mot de passe!", "Please change password!"); - $("#nvmdp").focus(); - return false; - } - - longueur = $("#nvmdp").val().length; - - if(longueur>0 && longueur<6) - { - v_msg="6 caractères minimum exigé!"; - v_msgEng="6 characters minmum required!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - if ($("#cfnvmdp" ).val()!=$("#nvmdp" ).val()) - { - v_msg="Veuillez confirmer votre mot de passe!"; - v_msgEng="Please confirm your password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } -} - -function modifier_profil() -{ - if ($("#idLigne" ).val()<="") - { - v_msg="Veuillez sélectionner une ligne!"; - v_msgEng="Please select a line!"; - alert_ebene(v_msg, v_msgEng); - - return; - } else - window.location.assign($("#racineWeb").val()+"Modifierprofil/"+$("#idLigne" ).val()+"/"); -} - - -function parametrer_profil() -{ - if ($("#idLigne" ).val()<="") - { - v_msg="Veuillez sélectionner une ligne!"; - v_msgEng="Please select a line!"; - alert_ebene(v_msg, v_msgEng); - - return; - } else - window.location.assign($("#racineWeb").val()+"Parametrerprofil/"+$("#idLigne" ).val()+"/"); -} - -function supprimer_profil(id, libelle) -{ - v_msg="Confirmez-vous la suppression de la ligne : "+libelle+"?"; - v_msgEng="Do you confirm the deletion of the line : "+libelle+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Listeprofil/supprimer/"+id+"/"); - } -} - -function modifier_utilisateur() -{ - if ($("#idLigne" ).val()<="") - { - v_msg="Veuillez sélectionner une ligne!"; - v_msgEng="Please select a line!"; - alert_ebene(v_msg, v_msgEng); - - return; - } else - window.location.assign($("#racineWeb").val()+"Modifierutilisateur/"+$("#idLigne" ).val()+"/"); -} - -function supprimer_utilisateur(id,libelle) -{ - v_msg="Confirmez-vous la suppression de la ligne : "+libelle+"?"; - v_msgEng="Do you confirm the deletion of the line : "+libelle+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Listeutilisateur/supprimer/"+id+"/"); - } -} - -function supprimer_police() -{ - 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; - } - - v_msg="Confirmez-vous la suppression de cette police?"; - v_msgEng="Do you confirm the deletion of this policy?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Fichepolice/supprimer/"+$("#idPolice_C").val()+"/"); - } -} - -function supprimer_devis() -{ - transforme = $("#transforme").val(); - if (transforme=="1") - { - v_msg="Devis déjà transformé!"; - v_msgEng="Quote already transformed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous la suppression de ce devis?"; - v_msgEng="Do you confirm the deletion of this quote?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Fichedevis/supprimer/"+$("#idPolice_d_C").val()+"/"); - } -} - -function archiver_garantie_police() -{ - v_msg="Confirmez-vous l\'archivage des garanties de cette police?"; - v_msgEng="Do you confirm the archiving of the guarantees of this policy?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Fichepolice/archivergarantie/"+$("#idPolice_C").val()+"/"); - } -} - -function archiver_colleege_police() -{ -} - -function ajaxListerUtilisateursProfil() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxutilisateursprofil/", - type : 'post', - data: "codeProfil="+$("#codeProfil").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listeutilisateur").html(data); - } - }); -} - -function ajaxListerUtilisateursPrestataire() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxutilisateursprestataire/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listeutilisateur").html(data); - } - }); -} - -function attribuer_profil_utilisateur(p_choix,p_id_utilisateur) -{ - donnees = 'id_utilisateur='+p_id_utilisateur; - donnees += '&codeProfil='+$("#codeProfil").val(); - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxutilisateursprofil/attribuerProfil/"+p_id_utilisateur+"/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function attribuer_prestataire_utilisateur(p_choix,p_id_utilisateur) -{ - donnees = 'id_utilisateur='+p_id_utilisateur; - donnees += '&codePrestataire='+$("#codePrestataire").val(); - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxutilisateursprestataire/attribuerPrestataire/"+p_id_utilisateur+"/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function beneficiaire_a_facturer(p_choix,p_id_beneficiaire) -{ - donnees = 'idBeneficiairePrime='+p_id_beneficiaire; - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbeneficiaireafacturer/selectionner/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - $("#actualsiser" ).val("0"); - } - }); -} - -function ajaxListerMenusProfil() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmenusprofil/", - type : 'post', - data: "codeProfil="+$("#codeProfil").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listemenu").html(data); - } - }); -} - -function ajouter_menu_profil(p_choix,p_code_menu,p_id_menuprofil) -{ - donnees = 'id_menuprofil='+p_id_menuprofil; - donnees += '&codeMenu='+p_code_menu; - donnees += '&codeProfil='+$("#codeProfil").val(); - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmenusprofil/ajouterMenu/"+p_id_menuprofil+"/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ajaxListerVuesProfil() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxvuesprofil/", - type : 'post', - data: "codeProfil="+$("#codeProfil").val()+"&vue="+$("#vue").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listemenu").html(data); - } - }); -} - -function ajouter_vue_profil(p_choix,p_code_menu,p_id_menuvueprofil) -{ - donnees = 'id_menuvueprofil='+p_id_menuvueprofil; - donnees += '&codeMenu='+p_code_menu; - donnees += '&codeProfil='+$("#codeProfil").val(); - donnees += '&vue='+$("#vue").val(); - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxvuesprofil/ajouterMenu/"+p_id_menuvueprofil+"/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - - -function lancer_facturation() -{ - if ($("#actualsiser").val()=="0" && $("#primeTtc").val()>"0") - { - v_msg="Veuillez réactualiser!"; - v_msgEng="Please refresh!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#primeTtc").val()<="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to charge!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Lancer la facturation?"; - v_msgEng="Start billing?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Facturerpolice/facturer/"); - } -} - -function afficher_image(fichier) -{ - window.open(fichier); -} - -function modifier_adherent() -{ - if ($("#idAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Modifieradherent/"+$("#idAdherent_C").val()+"/"); - } -} - -function modifier_beneficiaire() -{ - if ($("#idBeneficiaire_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Modifierbeneficiaire/"+$("#idBeneficiaire_C").val()+"/"); - } -} - -function supprimer_bon() -{ - if ($("#codePrestataire").val()<" ") - { - v_msg="Veuillez sélectionner un prestataire!"; - v_msgEng="Please select a provider!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#noDepart").val()<="0") - { - v_msg="Veuillez revoir vos bornes!"; - v_msgEng="Please check your limits!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#noFin").val()<$("#noDepart").val()) - { - v_msg="Veuillez revoir vos bornes!"; - v_msgEng="Please check your limits!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous la suppression de la plage de "+$("#noDepart").val()+" à "+$("#noFin").val()+" pour "+$("#codePrestataire").val()+"?"; - v_msgEng="Do you confirm the deletion of the range from "+$("#noDepart").val()+" to "+$("#noFin").val()+" for "+$("#codePrestataire").val()+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $('#frmsupprimerbons').submit(); - } -} - -function selectionner_bon(id,no, codeEtatBon, motifAnnulation) -{ - $("#idBon_C").val(id); - $("#numeroBon_C").val(no); - $("#motifAnnulation_C").val(motifAnnulation); - $("#codeEtatBon_C").val(codeEtatBon); -} - -function annuler_bon() -{ - var codeEtatBon = $("#codeEtatBon_C").val(); - var motifAnnulation = $("#motifAnnulation_C").val(); - var numeroBon = $("#numeroBon_C").val(); - var idBon = $("#idBon_C").val(); - - if (numeroBon<=" ") - { - v_msg="Veuillez sélectionner une ligne!"; - v_msgEng="Please select a line!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (codeEtatBon=="3") - { - v_msg="Anullé pour motif : "+motifAnnulation; - v_msgEng="Canceled for reason : "+motifAnnulation; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (codeEtatBon=="4") - { - v_msg="Remplacé pour motif : "+motifAnnulation; - v_msgEng="Replaced for reason : "+motifAnnulation; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous l\'annulation du bon No "+numeroBon+"?"; - v_msgEng="Do you confirm the cancellation of the form No "+numeroBon+"?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - v_msg="Raison de l\'annulation?"; - v_msgEng="Reason for cancellation?"; - - motifAnnulation = prompt_ebene(v_msg, v_msgEng, motifAnnulation); - if (motifAnnulation<=" ") - { - v_msg="Vous devez saisir un motif!"; - v_msgEng="You have to enter a reason!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#motifAnnulation_C").val(motifAnnulation); - - donnees = 'idBon='+idBon+'&motifAnnulation='+motifAnnulation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/annulerBon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficherbon(); - } - }); - } -} - -function ajaxbondisponible() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - if ($("#codeMedecin").val()<=" ") - { - v_msg="Veuillez sélectionner un prescripteur!"; - v_msgEng="Please select a prescriber!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMedecin").focus(); - return; - } - - if ($("#numeroBon").val()<=" ") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbondisponible/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(), - error: function(errorData) { - }, - success: function(data) { - $("#msgErreur").html(data); - }, - complete: function() { - imprimerbon(); - } - }); -} - -function imprimerbon() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - if ($("#numeroBon").val()<=" ") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - var codeEtatBon = $("input[name='codeEtatBon']").val(); - - if (codeEtatBon!="1") - { - return; - } - - $("#frmconsultation").submit(); -} - -function imprimerbonVierge() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - $("#codeTypeBon").val('2'); - $("#frmconsultation").submit(); - $("#codeTypeBon").val('1'); -} - - -function ajaxcommission() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcommission/", - type : 'post', - data: "codeApporteur="+$("#codeApporteur").val()+"&codeEtape="+$("#codeEtape").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infocomm").html(data); - }, - complete: function() { - $("#tauxCommission").val( $("#tauxCommission_info").val()); - } - }); -} - -function ajaxinfosacte() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosacte/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&codeActe="+$("#codeActe").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - $("#montantacte").val( $("#montantacte_info").val()); - $("#tauxCouverture").val( $("#tauxCouverture_info").val()); - calculer_Tm(); - } - }); -} - -function recapitulerprimeimposee() -{ - primeNette = $("#primeNette").val(); - fraisCarte = $("#fraisCarte").val(); - - donnees = "primeNette="+primeNette+"&fraisCarte="+fraisCarte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrecapitulerprimeimposee/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#primeimposee").html(data); - }, - complete: function() { - $("#primeHt").val( $("#primeHt_info").val()); - $("#accessoire").val( $("#accessoire_info").val()); - $("#commission").val( $("#commission_info").val()); - $("#commissionAutre").val( $("#commissionAutre_info").val()); - $("#taxe").val( $("#taxe_info").val()); - $("#primeTtc").val( $("#primeTtc_info").val()); - $("#primeNetteStat").val( $("#primeNetteStat_info").val()); - } - }); -} - -function imposerprime() -{ - v_msg="Confirmez-vous cette nouvelle prime?"; - v_msgEng="Do you confirm this new premium?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#frmModifierprimebeneficiaire").submit(); - } -} - -function calculer_Tm() -{ - $("#montantTm").val( ($("#montantacte").val() * (100-$("#tauxCouverture").val() )) / 100 ); - if ($("#codeMedecin").val()>" ") - $("#numeroBon").focus(); - else - $("#codeMedecin").focus(); - return true; -} - -function controlefocusconsultationMd() -{ - if ($("#codeActe").val()>" ") - $("#numeroBon").focus(); - else - $("#codeActe").focus(); - return true; -} - -function ajaxinfosacteexamen() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosacte/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&codeActe="+$("#codeActe").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infosacte").html(data); - }, - complete: function() { - $("#tauxCouverture").val( $("#tauxCouverture_info").val()); - } - }); -} - -function ajaxbonexamendisponible() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - if ($("#numeroBon").val()<=" ") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - $("#codeTypeBon").val('1'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbondisponible/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(), - error: function(errorData) { - }, - success: function(data) { - $("#msgErreur").html(data); - }, - complete: function() { - imprimerbon(); - } - }); -} - -function ajaxbonhospitdisponible() -{ - if ($("#codeActe").val()<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeActe").focus(); - return; - } - - if ($("#numeroBon").val()<=" ") - { - v_msg="Veuillez saisir un No de bon!"; - v_msgEng="Please enter a prescription number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBon").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbondisponible/", - type : 'post', - data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(), - error: function(errorData) { - }, - success: function(data) { - $("#msgErreur").html(data); - }, - complete: function() { - imprimerbon(); - } - }); -} - -function repondreDemandePec(numeroDemande, codeFamille) -{ - if(codeFamille=="EE") - { - window.location.assign($("#racineWeb").val()+"Repondrepecexamen/"+numeroDemande+"/"); - } - else - { - window.location.assign($("#racineWeb").val()+"Repondrepechospit/"+numeroDemande+"/"); - } -} - -function accueil() -{ - if($("#codeProfil_C" ).val()=="MEC") - { - window.location.assign($("#racineWeb").val()+"Accueilmedecin/"); - } - else - { - window.location.assign($("#racineWeb").val()+"Accueil/"); - } -} - -function tache() -{ - if($("#codeProfil_C" ).val()=="ASS") - { - window.location.assign($("#racineWeb").val()+"Tacheassure/"); - } - else - { - window.location.assign($("#racineWeb").val()+"Tache/"); - } -} - -function actualiserdemandeexam() -{ - window.location.assign($("#racineWeb").val()+"Examenententeprealable/"); -} - -function actualiserdemandehospit() -{ - window.location.assign($("#racineWeb").val()+"Avishospitalisation/"); -} - -function actualiserprolongationhospit() -{ - window.location.assign($("#racineWeb").val()+"Prologerhospitalisation/"); -} - -function Imprimerbonpecexam(numeroDemande) -{ - window.location.assign($("#racineWeb").val()+"Imprimerbonpecexam/"+ numeroDemande +"/"); -} - -function Imprimerbonpechosp(numeroDemande) -{ - window.location.assign($("#racineWeb").val()+"Imprimerbonpechosp/"+ numeroDemande +"/"); -} - -function Imprimerprolongationhosp(numeroDemande) -{ - window.location.assign($("#racineWeb").val()+"Imprimprolonghosp/"+ numeroDemande +"/"); -} - -function forceDownload(fileURL, fileName) -{ -} - - -function ged() -{ - if ($("#numeroBeneficiaire_C" ).val()<=" ") - { - v_msg="Veuillez sélectionner un assuré!"; - v_msgEng="Please select an insured person!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Ged/"); -} - -function gedassure() -{ - if ($("#numeroAdherent_C" ).val()<=" ") - { - v_msg="Veuillez sélectionner un assuré!"; - v_msgEng="Please select an insured person!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Gedassure/"); -} - - -function tachesadherent() -{ - if ($("#numeroAdherent_C" ).val()<=" ") - { - v_msg="Veuillez sélectionner un assuré!"; - v_msgEng="Please select an insured person!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Tacheadherent/"); -} - -function afficherged(cheminFichier) -{ - if (cheminFichier<=" ") - { - v_msg="Veuillez sélectionner un fichier!"; - v_msgEng="Please select a file"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.open(cheminFichier, '_blank'); -} - -function archiverged() -{ - if ($("#nomFichier").val()<=" ") - { - v_msg="Veuillez sélectionner un document!"; - v_msgEng="Please select a document"; - alert_ebene(v_msg, v_msgEng); - - return; - } - if( $("#accesAssure").val()=="0" && $("#accesPrestataire").val()=="0" - && $("#accesMedecin").val()=="0" && $("#accesGestionnaire").val()=="0") - { - v_msg="Le document doit être visible par au moins un des acteurs!"; - v_msgEng="The document must be seen by at least one of the persons in charge!"; - alert_ebene(v_msg, v_msgEng); - return; - } - $("#frmarchiherged").submit(); -} - -function archiverfacture() -{ - if ($("#nomFichier").val()<=" ") - { - v_msg="Veuillez sélectionner un fichier!"; - v_msgEng="Please select a file"; - alert_ebene(v_msg, v_msgEng); - - return; - } - $("#frmarchiherged").submit(); -} - -function ajaxinfosdestinatairetache() -{ - if ($("#codeDestinataire").val()<=" ") - { - v_msg="Veuillez sélectionner un destinataire!"; - v_msgEng="Please select a recipient!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeDestinataire").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinfosdestinatairetache/", - type : 'post', - data: "codeDestinataire="+$("#codeDestinataire").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infosdestinatairetache").html(data); - }, - complete: function() { - $("#emailtache").val( $("#emailActeurtache_info").val()); - } - }); -} - -function afficherPrestataireAssure(id) -{ - if (id <=" ") - { - v_msg="Veuillez sélectionner un prestataire!"; - v_msgEng="Please select a provider!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Prestataireassure/"+id+"/"); -} - - -function selectionner_Rq(lienrequete) -{ - $("#lienrequete" ).val(lienrequete); -} - - -function parametre_Rq() -{ - if ($("#lienrequete" ).val()<="") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query (request)!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - { - window.location.assign($("#racineWeb" ).val()+$("#lienrequete" ).val()); - } -} - -function imprimer_pdf() -{ - $("#sortie").val('1'); - $("#frmrequete").submit(); -} - -function export_xls() -{ - $("#sortie").val('2'); - $("#frmrequete").submit(); - $("#sortie").val('1'); -} - -function affichermanuel() -{ - codeProfil = $("#codeProfil_C").val(); - - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_CENTRES_DE_SOINS.pdf"; - - switch(codeProfil) - { - case "AAA": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_AGENT_AFRIK_ASSUR.pdf"; - break; - case "ADM": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_ADMINISTRATEUR_SYSTEME.pdf"; - break; - case "ASS": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_ASSURE.pdf"; - break; - case "CSO": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_CENTRES_DE_SOINS.pdf"; - break; - case "DIR": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_DIRECTION_AFRIK_ASSUR.pdf"; - break; - case "LAB": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_LABORATOIRES.pdf"; - break; - case "MEC": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_MEDECINS_CONSEIL.pdf"; - break; - case "PHA": - cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_PHARMACIES.pdf"; - break; - } - window.open('Docs/'+cheminFichier, '_blank'); -} - -function ajaxListerequetesProfil() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrequetesprofil/", - type : 'post', - data: "codeProfil="+$("#codeProfil").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listerequete").html(data); - } - }); -} - -function ajouter_requete_profil(p_choix,p_nomRequete,p_id_requeteprofil) -{ - donnees = 'id_requeteprofil='+p_id_requeteprofil; - donnees += '&nomRequete='+p_nomRequete; - donnees += '&codeProfil='+$("#codeProfil").val(); - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrequetesprofil/ajouterRequete/"+p_id_requeteprofil+"/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function supprimer_beneficiaire() -{ - idBeneficiaire = $("#idBeneficiaire_C").val(); - - primeArchive=$("#primeArchive").val(); - if (primeArchive=="1") - { - v_msg="Prime archivée!"; - v_msgEng="Primium archived!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (primeArchive=="0") - { - supprimer_beneficiaire_id(idBeneficiaire); - return; - } - - codeTypeAvenant=$("#codeTypeAvenant_C").val(); - - if (codeTypeAvenant!="REN" && codeTypeAvenant!="AFN") - { - v_msg="Veuillez procéder à un retrait!"; - v_msgEng="Please make a withdrawal!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - supprimer_beneficiaire_id(idBeneficiaire); -} - -function supprimer_beneficiaire_id(idBeneficiaire) -{ - v_msg="Confirmez-vous la suppression de ce bénéficiaire?"; - v_msgEng="Do you confirm the removal of this beneficiary?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbeneficiaire/supprimer/", - type : 'post', - data: "idBeneficiaire="+idBeneficiaire, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_adherent_id(); - } - }); - } -} - -function actualiserbeneficiaireafacturer() -{ - window.location.assign($("#racineWeb").val()+"Facturerpolice/"); -} - -function selectionner_tout_beneficiaireafacturer(choix) -{ - window.location.assign($("#racineWeb").val()+"Facturerpolice/selectionnertout/"+choix+"/"); -} - -function compta() -{ - numeroClient = $("#numeroClient_C" ).val(); - idClient = $("#idClient_C").val(); - window.location.assign($("#racineWeb").val()+"Compta/"+idClient+"/"); -} - -function selection_quittanes_enc() -{ - numeroClient = $("#numeroClient_C" ).val(); - idClient = $("#idClient_C").val(); - window.location.assign($("#racineWeb").val()+"Encselectionquittances/"+idClient+"/"); -} - -function selection_quittances_cli_enc() -{ - numeroClient = $("#numeroClient_C" ).val(); - idClient = $("#idClient_C").val(); - window.location.assign($("#racineWeb").val()+"Encselectquitclient/"+idClient+"/"); -} - -function compta_changer_client(numeroClient) -{ - if (numeroClient>"0") - { - $("#forminfoclient").submit(); - } -} - - -function encaissement_changer_client(numeroClient) -{ - if (numeroClient>"0") - { - $("#forminfoclient").submit(); - } -} - -function afficher_quittances_police() -{ - numeroPolice = $("#numeroPolice_C" ).val(); - idPolice = $("#idPolice_C" ).val(); - - $("#div_quittancepolice").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - if (numeroPolice>" ") - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxquittancepolice/", - type : 'post', - data: "idPolice="+idPolice+"&numeroPolice="+numeroPolice, - error: function(errorData) { - }, - success: function(data) { - $("#div_quittancepolice").html(data); - } - }); - } -} - -function afficher_quittances_impayees_client() -{ - idClient = $("#idClient_C").val(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsituationclient/", - type : 'post', - data: "idClient="+idClient, - error: function(errorData) { - }, - success: function(data) { - $("#div_quittancesclient").html(data); - } - }); -} - -function afficher_encaissements_quittance(idQuittance, numeroQuittance) -{ - if (idQuittance>"0") - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxencaissementquittance/", - type : 'post', - data: "idQuittance="+idQuittance+"&numeroQuittance="+numeroQuittance, - error: function(errorData) { - }, - success: function(data) { - $("#div_encaissementsquittance").html(data); - } - }); - } -} - - -function afficher_encaissement(idEncaissement) -{ - if (idEncaissement>"0") - { - window.location.assign($("#racineWeb" ).val()+"Ficheencaissement/"+idEncaissement+"/"); - } -} - - -function encaisser_client() -{ - numeroClient = $("#numeroClient_C" ).val(); - idClient = $("#idClient_C").val(); - - if (idClient>"0") - { - window.location.assign($("#racineWeb").val()+"Encaisserclient/"+idClient+"/"); - } -} - -function encaisser_depot_bord() -{ - $("#btn_depot").click(); -} - -function enregistrer_college() -{ - $("#btn_enreg").click(); -} - -function enregistrer_college_d() -{ - $("#btn_enreg").click(); -} - -function encaisser_quittance(idQuittance) -{ - if (idQuittance>"0") - { - window.location.assign($("#racineWeb" ).val()+"Encaisserquittance/"+idQuittance+"/"); - } -} - -function selectionner_quittance_impayee(numeroQuittance, idQuittance, primeTtc, encaisse, solde) -{ - $("#numeroQuittanceAcpte").val(numeroQuittance); - $("#idQuittanceAcpte").val(idQuittance); - $("#primeTtcAcpte").val(primeTtc); - $("#encaisseAcpte").val(encaisse); - $("#montantAcpte").val(solde); - $("#anc_soldeAcpte").val(solde); -} - -function ajouter_quittance_acompte() -{ - idQuittance = $("#idQuittanceAcpte" ).val(); - montantAcpte = $("#montantAcpte" ).val(); - primeTtcAcpte = $("#primeTtcAcpte" ).val(); - - if(idQuittance<="0") - { - v_msg="Veuillez sélectionner une quittance!"; - v_msgEng="PLease select a premium issue!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - if(montantAcpte<="0") - { - v_msg="Veuillez saisir l\'acompte!"; - v_msgEng="Please enter the deposit!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - anc_soldeAcpte = $("#anc_soldeAcpte" ).val(); - - if(Number(montantAcpte)>Number(anc_soldeAcpte)) - { - v_msg="Veuillez vérifier le montant de l\'acompte!"; - v_msgEng="Please check the amount of the deposit!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - donnees = 'idQuittance='+idQuittance+'&montantAcpte='+montantAcpte+'&primeTtcAcpte='+primeTtcAcpte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsituationclient/ajouteracomptequittance/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_situation_client").html(data); - }, - error: function(data) { - }, - complete: function() { - recap_bordereau_encaissement(); - } - }); -} - -function ajouter_quittance_acompte_client() -{ - idQuittance = $("#idQuittanceAcpte" ).val(); - montantAcpte = $("#montantAcpte" ).val(); - primeTtcAcpte = $("#primeTtcAcpte" ).val(); - - if(idQuittance<="0") - { - v_msg="Veuillez sélectionner une quittance!"; - v_msgEng="PLease select a premium issue!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - if(montantAcpte<="0") - { - v_msg="Veuillez saisir l\'acompte!"; - v_msgEng="Please enter the deposit!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - anc_soldeAcpte = $("#anc_soldeAcpte" ).val(); - - if(Number(montantAcpte)>Number(anc_soldeAcpte)) - { - v_msg="Veuillez vérifier le montant de l\'acompte!"; - v_msgEng="Please check the amount of the deposit!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - donnees = 'idQuittance='+idQuittance+'&montantAcpte='+montantAcpte+'&primeTtcAcpte='+primeTtcAcpte; - $.ajax({ - url: $("#racineWeb").val()+"Ajaximpayeclient/ajouteracomptequittance/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_situation_client").html(data); - }, - error: function(data) { - }, - complete: function() { - recap_bordereau_encaissement(); - } - }); -} - -function solder_quittance_temp(idQuittance) -{ - donnees = 'idQuittance='+idQuittance; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsituationclient/solderquittance/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_situation_client").html(data); - }, - error: function(data) { - }, - complete: function() { - recap_bordereau_encaissement(); - } - }); -} - -function solder_quittance_client_temp(idQuittance) -{ - donnees = 'idQuittance='+idQuittance; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximpayeclient/solderquittance/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_situation_client").html(data); - }, - error: function(data) { - }, - complete: function() { - recap_bordereau_encaissement(); - } - }); -} - -function supprimer_detail_encaissement(idDetailencaissement) -{ - donnees = 'idDetailencaissement='+idDetailencaissement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsituationclient/supprimerquittance/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_situation_client").html(data); - }, - error: function(data) { - }, - complete: function() { - recap_bordereau_encaissement(); - } - }); -} - - -function retirer_garantie_police(idGarantie) -{ - donnees = 'idGarantie='+idGarantie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiespolice/supprimergarantie/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_garanties").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - - -function ajouter_une_garantie_college(codeGarantie) -{ - donnees = 'codeGarantie='+codeGarantie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollege/ajoutergarantie/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_garanties").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - - -function supprimer_detail_encaissement_client(idDetailencaissement) -{ - donnees = 'idDetailencaissement='+idDetailencaissement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximpayeclient/supprimerquittance/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_situation_client").html(data); - }, - error: function(data) { - }, - complete: function() { - recap_bordereau_encaissement(); - } - }); -} - -function encaissement_changer_client(numeroClient) -{ - if (numeroClient>"0") - { - $("#forminfoclient").submit(); - } -} - -function encaisser_bordereau() -{ - window.location.assign($("#racineWeb").val()+"Encaisserbordereau/"); -} - -function encaisser_bordereau_detail() -{ -} - - -function imprimer_recu(idEncaissement) -{ - donnees = 'idEncaissement='+idEncaissement; - - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerrecucaisse/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function afficher_pop_recherche_client() -{ - numeroclientsearch = $("#numeroclientsearch").val(); - nomsearch = $("#nomsearch").val(); - prenomsearch = $("#prenomsearch").val(); - telsearch = $("#telsearch").val(); - - if (numeroclientsearch+nomsearch+prenomsearch+telsearch > " ") - { - donnees = "valid=1&numeroclientsearch="+numeroclientsearch+"&nomsearch="+nomsearch+"&prenomsearch="+prenomsearch+"&telsearch="+telsearch; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteclients/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listeclient").html(data); - } - }); - } -} - -function afficher_pop_recherche_client_enc() -{ - numeroclientsearch = $("#numeroclientsearch").val(); - nomsearch = $("#nomsearch").val(); - prenomsearch = $("#prenomsearch").val(); - telsearch = $("#telsearch").val(); - - if (numeroclientsearch+nomsearch+prenomsearch+telsearch > " ") - { - donnees = "valid=1&numeroclientsearch="+numeroclientsearch+"&nomsearch="+nomsearch+"&prenomsearch="+prenomsearch+"&telsearch="+telsearch; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteclientsenc/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listeclient").html(data); - } - }); - } -} - -function selectionner_client_pop(id,no,nom) -{ - $("#nocli").val(no); - $("#nomcli").val(nom); - selectionner_client(id,no); -} - -function ctrlkeypress(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_client(); - } -} - -function ctrlkeypress_enc(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_client_enc(); - } -} - -function ajaxListerMoyenPaiement() -{ - codeModePaiement = $("#codeModePaiement").val(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmoyenpaiement/", - type : 'post', - data: "codeModePaiement="+codeModePaiement, - error: function(errorData) { - }, - success: function(data) { - $("#listemoyenpaiement").html(data); - }, - complete: function() { - } - }); -} - -function ajax_no_cpt_paiement() -{ - codeModePaiement = $("#codeModePaiement").val(); - codeMoyenPaiement = $("#codeMoyenPaiement").val(); - - donnees = "codeModePaiement="+codeModePaiement+"&codeMoyenPaiement="+codeMoyenPaiement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnocptmoyenpaiement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infonocpt").html(data); - }, - complete: function() { - $("#numeroCompte").val( $("#numeroCompte_info").val()); - } - }); -} - -function modifier_detail_encaissement(idDetailencaissement) -{ -} - -function recap_bordereau_encaissement() -{ - montant_ecart = $("#montant_ecart_info").val(); - $("#montant_selection").val( $("#montant_selection_info").val()); - $("#montant_ecart").val(montant_ecart); -} - -function enregistrer_encaissement_bordereau() -{ - montant_ecart = $("#montant_ecart").val(); - montant_ecart = montant_ecart.replace(" ", ""); - montant_ecart = parseInt(montant_ecart); - montant_ecart = Math.abs(montant_ecart); - - if(montant_ecart>"100") - { - v_msg="Veuillez vérifier votre écart!"; - v_msgEng="Please check your gap!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#formente_encaissement").submit(); -} - -function enregistrer_encaissement_client() -{ - montant_ecart = $("#montant_ecart").val(); - montant_ecart = montant_ecart.replace(" ", ""); - montant_ecart = parseInt(montant_ecart); - montant_ecart = Math.abs(montant_ecart); - - if(montant_ecart>"100") - { - v_msg="Veuillez vérifier votre écart!"; - v_msgEng="Please check your gap!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - montant = $("#montant").val(); - montant = montant.replace(" ", ""); - montant = parseInt(montant); - montant = Math.abs(montant); - - codeModePaiement = $("#codeModePaiement").val(); - codeMoyenPaiement = $("#codeMoyenPaiement").val(); - referencePaiement = $("#referencePaiement").val(); - libelleOperation = $("#libelleOperation").val(); - - - if(montant=="100") - { - v_msg="Veuillez saisir un montant!"; - v_msgEng="Please enter an amount"; - alert_ebene(v_msg, v_msgEng); - - $("#montant").focus(); - return; - } - - if(codeModePaiement<=" ") - { - v_msg="Veuillez indiquer le mode de paiement!"; - v_msgEng="Please enter the method of payment"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModePaiement").focus(); - return; - } - - if(codeMoyenPaiement<=" ") - { - v_msg="Veuillez indiquer le moyen de paiement!"; - v_msgEng="Please enter the method of payment!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMoyenPaiement").focus(); - return; - } - - if(referencePaiement<=" ") - { - v_msg="Veuillez indiquer la référence du paiement!"; - v_msgEng="Please enter the payment reference!"; - alert_ebene(v_msg, v_msgEng); - - $("#referencePaiement").focus(); - return; - } - - if(libelleOperation<=" ") - { - v_msg="Veuillez saisir le libellé de l\'opération!"; - v_msgEng="Please enter the text of the transaction!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleOperation").focus(); - return; - } - - $("#formente_encaissement").submit(); -} - -function enregistrer_encaissement_quittance() -{ - anc_solde = $("#anc_solde").val(); - montant = $("#montant").val(); - montant_ecart = (montant-anc_solde); - montant_ecart = Math.abs(montant_ecart); - - - if(montant_ecart>"100") - { - v_msg="Veuillez vérifier votre écart!"; - v_msgEng="Please check your gap!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - montant = $("#montant").val(); - montant = montant.replace(" ", ""); - montant = parseInt(montant); - montant = Math.abs(montant); - - codeModePaiement = $("#codeModePaiement").val(); - codeMoyenPaiement = $("#codeMoyenPaiement").val(); - referencePaiement = $("#referencePaiement").val(); - libelleOperation = $("#libelleOperation").val(); - - - if(montant=="100") - { - v_msg="Veuillez saisir un montant!"; - v_msgEng="Please enter an amount"; - alert_ebene(v_msg, v_msgEng); - - $("#montant").focus(); - return; - } - - if(codeModePaiement<=" ") - { - v_msg="Veuillez indiquer le mode de paiement!"; - v_msgEng="Please enter the method of payment"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModePaiement").focus(); - return; - } - - if(codeMoyenPaiement<=" ") - { - v_msg="Veuillez indiquer le moyen de paiement!"; - v_msgEng="Please enter the method of payment!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMoyenPaiement").focus(); - return; - } - - if(referencePaiement<=" ") - { - v_msg="Veuillez indiquer la référence du paiement!"; - v_msgEng="Please enter the payment reference!"; - alert_ebene(v_msg, v_msgEng); - - $("#referencePaiement").focus(); - return; - } - - if(libelleOperation<=" ") - { - v_msg="Veuillez saisir le libellé de l\'opération!"; - v_msgEng="Please enter the text of the transaction!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleOperation").focus(); - return; - } - - $("#formente_encaissement").submit(); -} - -function controle_numerique(controle) -{ - if(isNaN(controle.value)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - controle.value=""; - controle.focus(); - return false; - } - return true; -} - -function ajax_context_client(idClient) -{ - donnees = 'idClient='+idClient; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextclient/", - type : 'post', - data: donnees, - error: function(errorData) { - } - }); -} - -function ajax_context_client_afficher(idClient) -{ - donnees = 'idClient='+idClient; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextclient/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Ficheclient/"); - } - }); -} - - -function ajax_context_client_d_afficher(idClient) -{ - donnees = 'idClient='+idClient; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextclientd/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Ficheprospect/"); - } - }); -} - -function ajax_context_police(idPolice) -{ - donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextpolice/", - type : 'post', - data: donnees, - error: function(errorData) { - } - }); -} - -function ajax_context_police_d(idPolice) -{ - donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextpoliced/", - type : 'post', - data: donnees, - error: function(errorData) { - } - }); -} - -function ajax_context_police_afficher(idPolice) -{ - donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextpolice/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Fichepolice/"); - } - }); -} - -function ajax_context_police_d_afficher(idPolice) -{ - donnees = 'idPolice='+idPolice; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextpoliced/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Fichedevis/"); - } - }); -} - -function ajax_deconnexion() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdeconnexion/", - complete: function() - { - window.open('about:blank','_parent',''); - close(); - window.close(); - } - }); - -/* 24/03/2019 - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdeconnexion/" - }); -*/ -} - -function selectionner_college(idCollege) -{ - $("#idCollege" ).val(idCollege); -} - -function supprimer_college(idCollege) -{ - v_msg="Confirmez-vous la suppression de ce collège?"; - v_msgEng="Do you confirm the removal of this college?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Collegepolice/supprimerCollege/"+idCollege+"/"); - } -} - -function supprimer_college_d(idCollege) -{ - transforme = $("#transforme").val(); - if (transforme=="1") - { - v_msg="Devis déjà transformé!"; - v_msgEng="Quote already transformed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous la suppression de ce collège?"; - v_msgEng="Do you confirm the removal of this college?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Fichedevis/supprimerCollege/"+idCollege+"/"); - } -} - -function modifier_college(idCollege) -{ - if (idCollege>"0") - { - window.location.assign($("#racineWeb" ).val()+"Modifiercollege/"+idCollege+"/"); - } -} - -function modifier_college_d(idCollege) -{ - transforme = $("#transforme").val(); - if (transforme=="1") - { - v_msg="Devis déjà transformé!"; - v_msgEng="Quote already transformed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (idCollege>"0") - { - window.location.assign($("#racineWeb" ).val()+"Modifiercolleged/"+idCollege+"/"); - } -} - -function consulter_college(idCollege) -{ - if (idCollege>"0") - { - window.location.assign($("#racineWeb" ).val()+"Consultercollege/"+idCollege+"/"); - } -} - -function retour_college() -{ - idCollege=$("#idCollege").val(); - - if (idCollege>"0") - { - window.location.assign($("#racineWeb" ).val()+"Consultercollege/"+idCollege+"/"); - } -} - -function ajax_flexcode() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxflexcode/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#content").html(data); - }, - complete: function() { - } - }); -} - -function ajaxttcfammille() -{ - idCollege=$("#idCollege").val(); - dateEntree=$("#dateEntree").val(); - - donnees = 'idCollege='+idCollege; - donnees += '&dateEntree='+dateEntree; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxttcfammille/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infottc").html(data); - }, - complete: function() { - } - }); -} - -function supprimer_adherent() -{ - idAherent=$("#idAdherent_C").val(); - - primeArchive=$("#primeArchive").val(); - if (primeArchive=="1") - { - v_msg="Prime archivée!"; - v_msgEng="Primium archived!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeTypeAvenant=$("#codeTypeAvenant_C").val(); - - // alert('codeTypeAvenant => '+codeTypeAvenant); - // return; - - if (codeTypeAvenant!="REN" && codeTypeAvenant!="AFN" && codeTypeAvenant!="CHE") - { - v_msg="Veuillez procéder à un retrait!"; - v_msgEng="Please make a withdrawal!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (primeArchive=="0") - { - supprimer_adherent_id(idAherent); - return; - } -} - - -function supprimer_adherent_id(idAherent) -{ - v_msg="Confirmez-vous la suppression de cet adhérent?"; - v_msgEng="Do you confirm the deletion of this member?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxadherent/supprimer/", - type : 'post', - data: "idAherent="+idAherent, - error: function(errorData) { - }, - success: function(data) - { - v_msg="Suppression terminée avec succès terminé!"; - v_msgEng="Deletion completed successfully completed!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() - { - adherents_police(); - } - }); - } -} - -function supprimer_adherent_id_list(idAherent) -{ - codeTypeAvenant=$("#codeTypeAvenant_C").val(); - - if (codeTypeAvenant!="REN" && codeTypeAvenant!="AFN" && codeTypeAvenant!="CHE") - { - v_msg="Veuillez procéder à un retrait!"; - v_msgEng="Please make a withdrawal!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous la suppression de cet adhérent?"; - v_msgEng="Do you confirm the deletion of this member?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"ajaxadherent/supprimer/", - type : 'post', - data: "idAherent="+idAherent, - error: function(errorData) { - }, - success: function(data) { - v_msg="Suppression terminée avec succès terminé!"; - v_msgEng="Deletion completed successfully completed!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() { - adherents_police(); - } - }); - } -} - - -function ajax_init_echancier() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinitnbecheance/", - type : 'post', - data: "codeTypeEcheancier="+$("#codeTypeEcheancier").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infonbEcheance").html(data); - }, - complete: function() { - $("#nbEcheance").val( $("#nbEcheance_info").val()); - ajax_maj_echancier(); - } - }); -} - -function ajax_maj_echancier() -{ - codeTypeEcheancier = $("#codeTypeEcheancier").val(); - nbEcheance = $("#nbEcheance").val(); - tauxInteret = $("#tauxInteret").val(); - - donnees = "codeTypeEcheancier="+codeTypeEcheancier+"&nbEcheance="+nbEcheance+"&tauxInteret="+tauxInteret; - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmajcheancier/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Echeancier/"); - } - }); -} - -function enregistrer_echeancier() -{ - if ($("#nbEcheance").val()=="1") - { - v_msg="Confirmez-vous l\'émission sans échéancier?"; - v_msgEng="Do you confirm the issue of primium without payment schedule?"; - - if(!confirm_ebene(v_msg, v_msgEng)) - { - return; - } - afficher_police_id(); - return; - } - - v_msg="Confirmez-vous cet échéancier?"; - v_msgEng="Do you confirm this payment schedule?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmajcheancier/enregistrer/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_police_id(); - } - }); - } -} - -function ajax_maj_lib_echancier(idEcheancier, libelleEcheance) -{ - donnees = "idEcheancier="+idEcheancier+"&libelleEcheance="+libelleEcheance; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmajcheancier/majlibelle/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Echeancier/"); - } - }); -} - -function ajax_maj_date_echancier(idEcheancier, datePaiement) -{ - donnees = "idEcheancier="+idEcheancier+"&datePaiement="+datePaiement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmajcheancier/majdatepaiement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Echeancier/"); - } - }); -} - - - -function ajax_maj_taux_echancier(idEcheancier, tauxEcheance) -{ - nbEcheance = $("#nbEcheance").val(); - - donnees = "idEcheancier="+idEcheancier+"&tauxEcheance="+tauxEcheance+"&nbEcheance="+nbEcheance; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmajcheancier/majtauxecheance/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Echeancier/"); - } - }); -} - -function retirer_garantie_college(idGarantie) -{ - donnees = 'idGarantie='+idGarantie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollege/supprimergarantie/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_garanties").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ajax_maj_taux_plafond(idGarantie, tauxPlafond, controle) -{ - tauxPlafond=tauxPlafond.replace(",","."); - controle.value=tauxPlafond; - - if(controle_numerique(controle)) - { - donnees = 'idGarantie='+idGarantie+"&tauxPlafond="+tauxPlafond; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollege/majtauxplafond/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_garanties").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function ajax_imposer_plafond(idGarantie, plafond, controle) -{ - plafond=plafond.replace(",","."); - controle.value=plafond; - - if(controle_numerique(controle)) - { - donnees = 'idGarantie='+idGarantie+"&plafond="+plafond; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollege/imposerplafond/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_garanties").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function ajax_maj_lib_gar_opt(idGarantie, libellegarantie, controle) -{ - if (libellegarantie<=" ") - { - return; - } - - donnees = 'idGarantie='+idGarantie+"&libellegarantie="+libellegarantie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollege/majlibgar/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_garanties").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); -} - -function maj_prime_gar_opt(idGarantie, primeOption, controle) -{ - if(controle_numerique(controle)) - { - donnees = 'idGarantie='+idGarantie+"&primeOption="+primeOption; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollege/majprimeopt/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_garanties").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function archiver_garantie_college(idCollege) -{ - v_msg="Confirmez-vous l\'archivage des garanties ce collège?"; - v_msgEng="Do you confirm the archiving of guarantees this college?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcollege/archivergarntie/", - type : 'post', - data: "idCollege="+idCollege, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - college_police(); - } - }); - } -} - -function controle_champ_obligatoire(controle) -{ - if (controle.value<=" ") - { - v_msg="Valeur exigée!"; - v_msgEng="Value required!"; - alert_ebene(v_msg, v_msgEng); - - controle.focus(); - return false; - } - return true; -} - -function controle_champ_obligatoire_new(controle) -{ - if (controle.value<=" ") - { - v_msg="Valeur exigée!"; - v_msgEng="Value required!"; - alert_ebene(v_msg, v_msgEng); - - controle.focus(); - return false; - } - return true; -} - -function controle_champ_obligatoire_old(controle) -{ - if (controle.value<=" ") - { - v_msg="Valeur exigée!"; - v_msgEng="Value required!"; - alert_ebene(v_msg, v_msgEng); - - controle.focus(); - return false; - } - return true; -} - - -function plafond_adherent() -{ - if ($("#idAdherent_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Plafondadherent/"); - } -} - -function creer_adherents() -{ - // 06/11/2020 - if(est_ce_police_famille()) - { - window.location.assign($("#racineWeb" ).val()+"Assuranceindividuelle/"); - return; - } - - nbAdh = $("#nbAdh_C").val(); - codeTypeContrat = $("#codeTypeContrat_C").val(); - - if ( (codeTypeContrat!="G") && (nbAdh>0) ) - { - v_msg="Ce n\'est pas une police GROUPE!"; - v_msgEng="This is not a GROUP policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - etat=$("#codeEtatPolice_C").val(); - - if (etat=="RE") - { - v_msg="Attention! Police résiliée!"; - v_msgEng="Warning! Terminated policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="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()+"Creeradherent/"); -} - -function creer_colleges() -{ - 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; - } - - window.location.assign($("#racineWeb" ).val()+"Creercollege/initcollege/"); -} - - -function creer_colleges_d() -{ - transforme = $("#transforme").val(); - if (transforme=="1") - { - v_msg="Devis déjà transformé!"; - v_msgEng="Quote already transformed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Creercolleged/initcollege/"); -} - -function creer_beneficiaires() -{ - if(est_ce_police_famille()) - { - creer_beneficiaires_familiale(); - return; - } - - etat=$("#codeEtatPolice_C").val(); - - if (etat=="RE") - { - v_msg="Attention! Police résiliée!"; - v_msgEng="Warning! Terminated policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="SU") - { - v_msg="Attention! Police suspendue!"; - v_msgEng="Warning! Suspended policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="AN") - { - v_msg="Attention! Police annulée!"; - v_msgEng="Warning! Canceled policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - etatadh=$("#codeEtatAdherent_C").val(); - - if (etatadh != "V") - { - v_msg="Attention! cette famille n\'est pas en vigueur!"; - v_msgEng="Warning! this family is not in force!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Creerbeneficiaire/"); -} - -function changer_etat_adherent() -{ - 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()+"Changeretatadherent/"); -} - -function creer_avenant() -{ - 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; - } - - window.location.assign($("#racineWeb" ).val()+"Creeravenant/"); -} - -function liste_avenant() -{ - window.location.assign($("#racineWeb" ).val()+"Listeavenant/"); -} - -function prorater_prime_adherent() -{ - idCollege=$("#idCollege").val(); - dateEntree=$("#dateEntree").val(); - prorata=$("#prorata").val(); - - if (idCollege<=" ") - { - v_msg="Veuillez sélectionner un collège!"; - v_msgEng="Please select a college!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idCollege='+idCollege; - donnees += '&dateEntree='+dateEntree; - donnees += '&prorata='+prorata; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxproraterprime/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_prime").html(data); - }, - complete: function() { - } - }); -} - -function prorater_prime_beneficiaire() -{ - idAvenant = $("#idAvenant").val(); - - if(idAvenant<=" ") - { - v_msg="Veuillez sélectionner un avenant!"; - v_msgEng="Please select an Amendment!"; - alert_ebene(v_msg, v_msgEng); - - $("#idAvenant").focus(); - return; - } - - codeLienParente=$("#codeLienParente").val(); - - if (codeLienParente=="A") - { - v_msg="Veuillez revoir le lien de parenté!"; - v_msgEng="Please review the relationship"; - alert_ebene(v_msg, v_msgEng); - $("#codeLienParente").focus(); - return; - } - - dateEntree=$("#dateEntree").val(); - fraisCarte=$("#fraisCarte").val(); - prorata=$("#prorata").val(); - - donnees = '&dateEntree='+dateEntree; - donnees += '&fraisCarte='+fraisCarte; - donnees += '&prorata='+prorata; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxproraterprimebeneficiaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_prime").html(data); - }, - complete: function() { - } - }); -} - -function histo_etats() -{ - window.location.assign($("#racineWeb" ).val()+"Histoetat/"); -} - -function afficher_emission(idEmission) -{ - if (idEmission>"0") - { - window.location.assign($("#racineWeb" ).val()+"Emission/"+idEmission+"/"); - } -} - -function exporter_liste_assures() -{ - $('#div_exporter_liste_assures').html(''); - - $("#btn_exporter_liste_assures").click(); -} - - -function imprimer_liste_assures() -{ - $('#div_export_assures').html(''); - - $("#btn_liste_assures").click(); -} - -function imprimer_limites() -{ - idEntetecontrat=$("#idEntetecontrat").val(); - - if (idEntetecontrat<="0") - { - v_msg="Veuillez sélectionner une période!"; - v_msgEng="Please select a period!"; - alert_ebene(v_msg, v_msgEng); - - $("#idEntetecontrat").focus(); - - div_attente.html(''); - - return; - } - - donnees = 'idEntetecontrat='+idEntetecontrat; - - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerlimite/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function imprimer_cp(lienEtat) -{ - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'lienEtat='+lienEtat; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimercp/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function imprimer_cp_d(lienEtat) -{ - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'lienEtat='+lienEtat; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimercpd/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function imprimer_cp_eng() -{ - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimercpeng/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function imprimer_cp_eng_d() -{ - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimercpengd/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - - -function rachat_tm_police() -{ - if($('#rachatTm').val()=="1") - { - $("#tauxRachatTm").readable(); - } - else - { - $("#tauxRachatTm").val("0"); - $("#tauxRachatTm").unreadable(); - } -} - -function pop_tableau_prestation() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtableauprestation/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_tableau_prestation").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - - -function pop_consulter_tableau_prestation() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconsultertableauprestation/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_tableau_prestation").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function pop_afficher_detail_resiliation() -{ - var div_tableau_assure = $('#div_tableau_assure'); - - div_tableau_assure.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailresiliation/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - div_tableau_assure.html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function maj_college() -{ - if($('#codeProduit').val()<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - $('#codeProduit').focus(); - return; - } - $("#btn_recap").click(); -} - -function ajax_maj_tm(idPrestation, tm, controle) -{ - tm=tm.replace(",","."); - controle.value=tm; - - if(controle_numerique(controle)) - { - donnees = 'idPrestation='+idPrestation+"&tm="+tm; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtableauprestation/majtm/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function texte_cp() -{ - window.location.assign($("#racineWeb" ).val()+"Textecp/"); -} - -function imprimer_contrat() -{ - window.location.assign($("#racineWeb" ).val()+"Contrat/"); -} - -function imprimer_devis() -{ - window.location.assign($("#racineWeb" ).val()+"Imprimerdevis/"); -} - -function rapport_sp_police() -{ - window.location.assign($("#racineWeb" ).val()+"Sppolice/"); -} - -function rapport_sp_adherent() -{ - window.location.assign($("#racineWeb" ).val()+"Spadherent/"); -} - - -function rapport_sp_college() -{ - window.location.assign($("#racineWeb" ).val()+"Spcollege/"); -} - -function rapport_sp_beneficiaire() -{ - window.location.assign($("#racineWeb" ).val()+"Spbeneficiaire/"); -} - -function enregistrer_avenant() -{ - codeTypeAvenant=$("#codeTypeAvenant").val(); - oldCodeTypeAvenant=$("#oldCodeTypeAvenant").val(); - - if ($("#codeTypeAvenant").val()<" ") - { - v_msg="Veuillez sélectionner le type d\'avenant!"; - v_msgEng="Please select the type of amendment!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(codeTypeAvenant!="CHE" && codeTypeAvenant!="REN") - { - var d_effet = new Date($("#dateEffetSql").val()); - var d_fin = new Date($("#dateFinSql").val()); - var d_avenant = $("#dateAvenant").datepicker("getDate"); - - dt_effet = Math.round(Date.parse(d_effet)/(1000*3600*24)); - dt_fin = Math.round(Date.parse(d_fin)/(1000*3600*24)); - dt_avenant = Math.round(Date.parse(d_avenant)/(1000*3600*24)); - - /* - alert("dt_effet => "+dt_effet); - alert("dt_fin => "+dt_fin); - alert("dt_avenant => "+dt_avenant); - return; - */ - - if (dt_avenant>dt_fin || dt_avenantdt2) - { - v_msg="Veuillez revoir la date de renouvellement!"; - v_msgEng="Please review the renewal date!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - var eff = $("#dateAvenant").datepicker("getDate"); - var ech = $("#dateEcheanceRen").datepicker("getDate"); - - if (ech>eff.addMonths(12)) { - v_msg="Période supérieur à un an!"; - v_msgEng="Period greater than one year!"; - alert_ebene(v_msg, v_msgEng); - } - } - - if(codeTypeAvenant=="CHE" && oldCodeTypeAvenant=="REN") - { - var td1 = new Date($("#dateEffet").val()); - var td2 = $("#dateAvenant").datepicker("getDate"); - - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - - if (dt1>dt2) - { - v_msg="Veuillez revoir la date!"; - v_msgEng="Please review the date!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - } - - if ( - codeTypeAvenant=="RET" || - codeTypeAvenant=="RES" || - codeTypeAvenant=="SUS" || - codeTypeAvenant=="ANL"|| - codeTypeAvenant=="RVP"|| - codeTypeAvenant=="ADL"|| - codeTypeAvenant=="CHE") - { - motifavenant=$("#motifavenant").val(); - - if ($("#motifavenant").val()<" ") - { - v_msg="Veuillez fournir le motif!"; - v_msgEng="Please provide the reason"; - alert_ebene(v_msg, v_msgEng); - - return; - } - } - - v_msg="Confirmez-vous cet avenant?"; - v_msgEng="Do you confirm this amendment to the contract?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - var div_attente = $('#div_attente'); - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - codeTypeAvenant=$("#codeTypeAvenant").val(); - - donnees = ""; - - if (codeTypeAvenant=="ANL") - { - donnees = "controle=existequittance"; - } - - if(donnees>" ") - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontroleavenantpolice/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - alert(data); - $("#div_controler_avenant").html(data); - }, - complete: function() { - $("#controler_avenant").val($("#controler_avenant_info").val()); - - resultat_controler_avenant = $("#controler_avenant").val(); - - if (resultat_controler_avenant=="Q") - { - v_msg="Attention, cette police possède des quittances!"; - v_msgEng="Warning, this policy has premium issues!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (resultat_controler_avenant=="C") - { - v_msg="Attention, cette police possède des sinistres!"; - v_msgEng="Warning, this policy has claims!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - return; - } - }); - } - else - if (codeTypeAvenant=="ADL") - { - donnees = "dateAvenant="+$("#dateAvenant").val()+"&motifavenant="+motifavenant; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlimiteadditionnelle/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - $("#btn_enreg").click(); - } - }); - } - else - { - $("#btn_enreg").click(); - } - } -} - - -function enregistrer_resiliation() -{ - v_msg="Confirmez-vous la résiliation de cette police?"; - v_msgEng="Do you confirm the cancellation of this policy?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Ficheresiliation/enregistrerresiliation/"); - } -} - - -function enregistrer_retrait() -{ - var div_assure_a_retirer = $('#div_assure_a_retirer'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailretrait/recapituler/", - type: 'POST', - success: function(data) { - div_assure_a_retirer.html(data); - }, - error: function(data) { - }, - complete: function() { - nbAliment=$("#nbAliment").val(); - - if (nbAliment<"1") - { - v_msg="Veuillez sélectionner les personnes à retirer!"; - v_msgEng="Please select the people to remove!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous le retrait des personnes sélectionnées de cette police?"; - v_msgEng="Do you confirm the withdrawal of the selected people from this policy?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Ficheretrait/enregistrerretrait/"); - } - } - }); - - -} - -function controle_date_avenant() -{ - codeTypeAvenant=$("#codeTypeAvenant").val(); - - if(est_ce_police_famille() && codeTypeAvenant=="RET") - { - v_msg="Oprétaion non autorisée!"; - v_msgEng="Unauthorized operation!"; - alert_ebene(v_msg, v_msgEng); - - afficher_police_id(); - return; - } - - $("#div_periodidite").html(""); - - if(codeTypeAvenant=="REN") - { - $("#dateAvenant").val($("#DateRenouvellement_fr").val()); - $("#motifavenant").val(""); - - $("#motifavenant").unreadable(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrenouvellement/", - type: 'POST', - // data: donnees, - success: function(data) - { - $("#div_periodidite").html(data); - $(".datepicker" ).datepicker(); - CalculerEcheanceRen(); - CalculerFinRen(); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - $("#dateAvenant").readable(); - } - else - if(codeTypeAvenant=="ADL") - { - $("#dateAvenant").val($("#datejourfr_C").val()); - $("#dateAvenant").unreadable(); - $("#motifavenant").readable(); - } - else - { - $("#dateAvenant").val($("#datejourfr_C").val()); - - $("#dateAvenant").readable(); - $("#motifavenant").readable(); - } -} - -function pop_afficher_detail_renouvellement() -{ - var div_tableau_assure = $('#div_tableau_assure'); - - div_tableau_assure.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailrenouvellement/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - div_tableau_assure.html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function enregistrer_renouvellemnt() -{ - v_msg="Confirmez-vous le renouvellement de cette police?"; - v_msgEng="Do you confirm the renewal of this policy?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Ficherenouvellement/enregistrerrenouvellement/"); - } -} - -function fiche_limite_additionnelle() -{ - window.location.assign($("#racineWeb" ).val()+"Fichelimiteadditionnelle/"); -} - -function enregistrer_changement_etat_famille() -{ - codeEtatAdherent=$("#codeEtatAdherent").val(); - - if (codeEtatAdherent<" ") - { - v_msg="Veuillez sélectionner le nouvel état!"; - v_msgEng="Please select the new state!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - motifEtat=$("#motifEtat").val(); - - if (motifEtat<" ") - { - 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 d\'état?"; - v_msgEng="Do you confirm this change of state?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#btn_enreg").click(); - } -} - -function changer_etat_beneficiaire() -{ - 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()+"Changeretatbeneficiaire/"); -} - -function enregistrer_changement_etat_beneficiaire() -{ - codeEtatBeneficiaire=$("#codeEtatBeneficiaire").val(); - - if (codeEtatBeneficiaire<" ") - { - v_msg="Veuillez sélectionner le nouvel état!"; - v_msgEng="Please select the new state!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - motifEtat=$("#motifEtat").val(); - - if (motifEtat<" ") - { - 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 d\'état?"; - v_msgEng="Do you confirm this change of state?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#btn_enreg").click(); - } -} - -function pop_afficher_selection_retrait() -{ - var div_selection_assure = $('#div_selection_assure'); - - div_selection_assure.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectionretrait/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - div_selection_assure.html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function beneficiaire_a_retirer(p_choix, p_id_beneficiaire) -{ - donnees = 'idBeneficiaire='+p_id_beneficiaire; - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectionretrait/selectionner/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function recapituler_retrait() -{ - var div_assure_a_retirer = $('#div_assure_a_retirer'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailretrait/recapituler/", - type: 'POST', - success: function(data) { - div_assure_a_retirer.html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function changer_college() -{ - codeTypeAvenant=$("#codeTypeAvenant_C").val(); - - // /* autorisé le 11/07/2018 en attendant - if (codeTypeAvenant!="REN") - { - v_msg="Opération possible uniquement lors du renouvellement!"; - v_msgEng="Operation possible only during renewal!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeEtatFacturation=$("#codeEtatFacturation").val(); - if (codeEtatFacturation=="1") - { - v_msg="Attention! Famille déjà facturée!"; - v_msgEng="Warning! Family already billed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - consommation_adherent=$("#consommation_adherent").val(); - if(consommation_adherent>"0") - { - v_msg="Attention! cette famille a déjà consommé!"; - v_msgEng="Warning! this family has already consumed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Changercollege/"); -} - -function changer_college_adherent() -{ - idCollege=$("#idCollege").val(); - - if (idCollege<=" ") - { - v_msg="Veuillez sélectionner un collège!"; - v_msgEng="Please select a college!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idCollege='+idCollege; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangercollege/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_prime").html(data); - }, - complete: function() { - } - }); -} - -function enregistrer_changement_college() -{ - idCollege=$("#idCollege").val(); - idCollegeOld=$("#idCollegeOld").val(); - - if (idCollege==idCollegeOld) - { - v_msg="Veuillez sélectionner un autre collège!"; - v_msgEng="Please select a another college!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (idCollege<=" ") - { - v_msg="Veuillez sélectionner un collège!"; - v_msgEng="Please select a college!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#btn_enreg").click(); - } -} - -function enregistrer_limite_additionnelle() -{ - nbAliment=$("#nbAliment").val(); - - if (nbAliment<"1") - { - v_msg="Veuillez sélectionner les familles concernées!"; - v_msgEng="Please select the families concerned!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - cumulPlafond=$("#cumulPlafond").val(); - - // alert("cumulPlafond => "+cumulPlafond); - // return; - - if (cumulPlafond<="1") - { - v_msg="Veuillez saisir les limites additionnelles!"; - v_msgEng="Please enter the additional limits!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces limites additionnelles?"; - v_msgEng="Do you confirm these additional limits?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Fichelimiteadditionnelle/enregistrerlimiteadditionnelle/"); - } -} - -function selection_college(p_choix,p_id_college_temp) -{ - donnees = 'idCollegeTemp='+p_id_college_temp; - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlimiteadditionnelle/selectionner/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - recapituler_limite_additionnelle(); - } - }); -} - -function modifier_college_temp(p_id_college_temp) -{ - if (p_id_college_temp>"0") - { - window.location.assign($("#racineWeb" ).val()+"Modifiercollegetemp/"+p_id_college_temp+"/"); - } -} - -function maj_limite_additionnelle(idGarantie, plafond, controle) -{ - if(controle_numerique(controle)) - { - donnees = 'idGarantie='+idGarantie+"&plafond="+plafond; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollegeadd/majplafondadd/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_garanties").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function maj_prime_additionnelle(idGarantie, primeOption, controle) -{ - if(controle_numerique(controle)) - { - donnees = 'idGarantie='+idGarantie+"&primeOption="+primeOption; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollegeadd/majprimeadd/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_garanties").html(data); - }, - error: function(data) { - }, - complete: function() { - recapituler_limite_college(); - controle.focus(); - } - }); - } -} - -function enregistrer_college_temp() -{ - $("#btn_enreg").click(); -} - -function recapituler_limite_additionnelle() -{ - var div_primes = $('#div_primes'); - - $.ajax({ - url: $("#racineWeb").val()+"Recaplimiteadd/", - type: 'POST', - success: function(data) { - div_primes.html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function recapituler_limite_college() -{ - var div_recap = $('#div_recap'); - - $.ajax({ - url: $("#racineWeb").val()+"Recaplimitecollege/", - type: 'POST', - success: function(data) { - div_recap.html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - - -function changer_limite() -{ - etat=$("#codeEtatPolice_C").val(); - - if (etat=="RE") - { - v_msg="Attention! Police résiliée!"; - v_msgEng="Warning! Terminated policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="SU") - { - v_msg="Attention! Police suspendue!"; - v_msgEng="Warning! Suspended policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="AN") - { - v_msg="Attention! Police annulée!"; - v_msgEng="Warning! Canceled policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - etatadh=$("#codeEtatAdherent_C").val(); - - if (etatadh != "V") - { - v_msg="Attention! cette famille n\'est pas en vigueur!"; - v_msgEng="Warning! this family is not in force!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - rapport_sp_police=$("#rapport_sp_police").val(); - if(rapport_sp_police>"0.70") - { - v_msg="Attention! S/P > 70%"; - v_msgEng="Warbing! Loss Ratio > 70%"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlimiteaddadherent/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Changerlimite/"); - } - }); -} - -function maj_limite_add_adherent(idGarantie, plafond, controle) -{ - if(controle_numerique(controle)) - { - donnees = 'idGarantie='+idGarantie+"&plafond="+plafond; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollegeadherent/majplafondadherent/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_garanties").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function enregistrer_changement_limite() -{ - $("#btn_enreg").click(); -} - -function pop_afficher_selection_limite(p_id_college_temp) -{ - var div_selection_assure = $('#div_selection_assure'); - donnees = 'id_college_temp='+p_id_college_temp; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectionlimite/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_selection_assure.html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function selection_famille_limite(p_choix,p_idBeneficiaire) -{ - donnees = 'idBeneficiaire='+p_idBeneficiaire; - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectionlimite/selectionner/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - recapituler_limite_college_simple(); - } - }); -} - - -function recapituler_limite_college_simple() -{ - $.ajax({ - url: $("#racineWeb").val()+"Recaplimitecollege/recapituler/", - type: 'POST', - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - recapituler_limite_additionnelle(); - } - }); -} - -function selectionner_tout_limite(p_idCollegeTemp, p_choix) -{ - donnees = 'idCollegeTemp='+p_idCollegeTemp; - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxselectionlimite/selectionnertout/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - recapituler_limite_college_simple(); - pop_afficher_selection_limite(p_idCollegeTemp); - } - }); -} - -function gestionbon() -{ - adminBon = $("#adminBon").val(); - - if (adminBon!="1") - { - v_msg="Accès refusé!"; - v_msgEng="Access denied!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb").val()+"Gestionbons/"); -} - -function getDenierNumeroBon() -{ - $("#msgErreur").html(""); - $("#div_wait").html(""); - - codeTypeBon=$("#codeTypeBon").val(); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#msgErreur").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderniernumerobon/", - type : 'post', - data: "codeTypeBon="+codeTypeBon, - error: function(errorData) { - }, - success: function(data) { - $("#infodernierbon").html(data); - $("#msgErreur").html(""); - }, - complete: function() { - denierNumeroBon = $("#denierNumeroBon_info").val(); - denierNumeroBon = parseInt(denierNumeroBon); - $("#denierNumeroBon").val(denierNumeroBon); - $("#noDepart").val(denierNumeroBon+1); - $("#noFin").val(denierNumeroBon+50); - } - }); -} - -function genererbon() -{ - codePrestataire=$("#codePrestataire").val(); - codeTypeBon=$("#codeTypeBon").val(); - receptionnaire=$("#receptionnaire").val(); - - noDepart=$("#noDepart").val(); - noFin=$("#noFin").val(); - - if (noDepart=="") - { - noDepart="0"; - } - - if (noFin=="") - { - noFin="0"; - } - - noDepart = parseInt(noDepart); - noFin = parseInt(noFin); - - if (codePrestataire<=" ") - { - v_msg="Veuillez sélectionner un prestataire!"; - v_msgEng="Please select a provider!"; - alert_ebene(v_msg, v_msgEng); - - $("#codePrestataire").focus(); - $("#btn_pop_prestataire").click(); - return; - } - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeBon").focus(); - return; - } - - if (noFin  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgenererbons/genererBon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_page_entiere").html(data); - }, - complete: function() { - imprimer_livraison_bon(); - } - }); - } - }); - } -} - -function afficherbon() -{ - codePrestataire=$("#codePrestataire").val(); - - codeTypeBon=$("#codeTypeBon").val(); - codeEtatBon=$("#codeEtatBon").val(); - - noDepart=$("#noDepart").val(); - noFin=$("#noFin").val(); - - if (noDepart=="") - { - noDepart="0"; - } - - if (noFin=="") - { - noFin="0"; - } - - noDepart = parseInt(noDepart); - noFin = parseInt(noFin); - - if (codePrestataire<=" ") - { - v_msg="Veuillez sélectionner un prestataire!"; - v_msgEng="Please select a provider!"; - alert_ebene(v_msg, v_msgEng); - - $("#codePrestataire").focus(); - return; - } - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeBon").focus(); - return; - } - - if (noFin  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_bonpecs").html(data); - }, - complete: function() { - $("#nbligne").val("Nombre de bons affichés : "+$("#nbligne_info").val()); - } - }); -} - -function listergenerationbon() -{ - codePrestataire=$("#codePrestataire").val(); - codeTypeBon=$("#codeTypeBon").val(); - d1=$("#d1").val(); - d2=$("#d2").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 (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeBon").focus(); - return; - } - - donnees = 'codePrestataire='+codePrestataire+'&codeTypeBon='+codeTypeBon+'&d1='+d1+'&d2='+d2; - - $("#div_bonpecs").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxalistegenererbons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_bonpecs").html(data); - }, - complete: function() { - $("#nbligne").val("Nombre de lignes affichées : "+$("#nbligne_info").val()); - } - }); -} - -function listerdemandebon() -{ - codePrestataire=$("#codePrestataire").val(); - codeTypeBon=$("#codeTypeBon").val(); - d1=$("#d1").val(); - d2=$("#d2").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 (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeBon").focus(); - return; - } - - donnees = 'codePrestataire='+codePrestataire+'&codeTypeBon='+codeTypeBon+'&d1='+d1+'&d2='+d2; - - $("#div_bonpecs").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxalistedemandebon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_bonpecs").html(data); - }, - complete: function() { - } - }); -} - -function ajaxListerExclusions() -{ - $("#div_acte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexclureacte/", - type : 'post', - data: "idCollege="+$("#idCollege").val(), - error: function(errorData) { - }, - success: function(data) { - $("#div_acte").html(data); - } - }); -} - -function exclure_acte(p_choix, p_codeActe, id_exclusioncollege) -{ - donnees = 'idCollege='+$("#idCollege").val(); - donnees += '&id_exclusioncollege='+id_exclusioncollege; - donnees += '&codeActe='+p_codeActe; - donnees += '&choix='+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexclureacte/exclure/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function separateur_millier(montant) -{ - montant = parseInt(montant); - montant.toLocaleString(); - return montant.toLocaleString(); -} - -function afficher_detail_generartionbon(idgenerationbon) -{ - if (idgenerationbon>"") - { - window.location.assign($("#racineWeb" ).val()+"Detailgenerationbon/"+idgenerationbon+"/"); - } -} - -function afficher_tarifoptique() -{ - var div_detail = $('#div_detail'); - - codeTarifOptique=$("#codeTarifOptique").val(); - libelleOptique=$("#libelleOptique").val(); - - if(codeTarifOptique<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifOptique").focus(); - return; - } - - /* - if(libelleOptique<=' ') - { - v_msg="Veuillez saisir un nom!"; - v_msgEng="Please enter a name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleOptique").focus(); - return; - } - */ - - donnees = 'codeTarifOptique='+codeTarifOptique+'&libelleOptique='+libelleOptique; - - div_detail.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtarifoptique/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_detail").html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - } - }); -} - -function maj_tarifoptique(idDetail, prix) -{ - donnees = 'idDetail='+idDetail+"&prix="+prix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtarifoptique/maj/", - type: 'POST', - data: donnees, - success: function(data) { - }, - complete: function(data) - { - } - }); -} - -function supprimer_espace_nombre(nombre) -{ - // nombre = nombre.replace(" ", ""); - nombre = nombre.replace(/ /g, ""); - - if(isNaN(nombre)) - { - v_msg = nombre+" n\'est pas un nombre!"; - v_msgEng = nombre+" is not a number!"; - alert_ebene(v_msg, v_msgEng); - - return '0'; - } - nombre = parseInt(nombre); - return nombre; -} - -function afficher_tarifpharmacie() -{ - var div_detail = $('#div_detail'); - - codeTarifMedicament=$("#codeTarifMedicament").val(); - libelleMedicament=$("#libelleMedicament").val(); - - if(codeTarifMedicament<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifMedicament").focus(); - return; - } - - if(libelleMedicament<=' ') - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleMedicament").focus(); - return; - } - - donnees = 'codeTarifMedicament='+codeTarifMedicament+'&libelleMedicament='+libelleMedicament; - - div_detail.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtarifmedicament/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_detail").html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - } - }); -} - -function maj_tarifpharmacie(idDetail, prix) -{ - donnees = 'idDetail='+idDetail+"&prix="+prix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtarifmedicament/maj/", - type: 'POST', - data: donnees, - success: function(data) { - }, - complete: function(data) - { - } - }); -} - -function afficher_tarifacte() -{ - var div_detail = $('#div_detail'); - - codeTarifActe=$("#codeTarifActe").val(); - libelleActe=$("#libelleActe").val(); - - if(codeTarifActe<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - if(libelleActe<=' ') - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleActe").focus(); - return; - } - - donnees = 'codeTarifActe='+codeTarifActe+'&libelleActe='+libelleActe; - - div_detail.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtarifacte/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_detail").html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - } - }); -} - -function maj_tarifacte(idDetail, prix) -{ - donnees = 'idDetail='+idDetail+"&prix="+prix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtarifacte/maj/", - type: 'POST', - data: donnees, - success: function(data) { - }, - complete: function(data) - { - } - }); -} - -function gestiondiverses() -{ - adminDiv = $("#adminDiv").val(); - - if (adminDiv!="1") - { - v_msg="Accès refusé!"; - v_msgEng="Access denied!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Gestiondiverses/"); -} - - -function liste_derogation_beneficiaire() -{ - window.location.assign($("#racineWeb" ).val()+"Listederogationsbenficiaire/"); -} - -function listerderogationbeneficiaire() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_derogations").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_derogations").html(data); - }, - complete: function() { - } - }); -} - -function accepter_derogation(idDemandederogation) -{ - window.location.assign($("#racineWeb" ).val()+"Accepterderogation/"+idDemandederogation+"/"); -} - -function refuser_derogation(idDemandederogation) -{ - window.location.assign($("#racineWeb" ).val()+"Refuserderogation/"+idDemandederogation+"/"); -} - -function enregistrerrefusderogation() -{ - idDemandederogation = $("#idDemandederogation").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!"; - - $("#motifRefusAssure").focus(); - return; - } - - v_msg="Confirmez-vous ce refus?"; - v_msgEng="Do you confirm this refusal?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - codePrestataire = $("#codePrestataire").val(); - - donnees = 'idDemandederogation='+idDemandederogation+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure+'&codePrestataire='+codePrestataire; - - donnees_sav = donnees; - typeMail='refusderogation'; - typeSms="refusderogation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/enregistrerrefusderogation/", - 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_derogation_beneficiaire(); - } - }); - } -} - -function enregistreraccordderogation() -{ - idDemandederogation = $("#idDemandederogation").val(); - motifReel = $("#motifReel").val(); - debut =$("#debut").val(); - fin =$("#fin").val(); - - codeDerogation = $("#codeDerogation").val(); - tmDerogation = $("#tmDerogation").val(); - tmDerogation = parseInt(tmDerogation); - - codePrestataire = $("#codePrestataire").val(); - - if (motifReel<=" ") - { - v_msg="Veuillez saisir le motif!"; - v_msgEng="Please enter the reason!"; - alert_ebene(v_msg, v_msgEng); - - $("#motifReel").focus(); - return; - } - - var td0 = $("#datejourfr_C").datepicker("getDate"); - var td1 = $("#debut").datepicker("getDate"); - var td2 = $("#fin").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)); - - if ((dt0>dt1) || dt1>dt2) - { - v_msg="Veuillez revoir les dates!"; - v_msgEng="Please review the dates!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (codeDerogation=="01" && tmDerogation<=0) - { - v_msg="Veuillez saisir le ticket modérateur!"; - v_msgEng="Please enter the user fees!"; - alert_ebene(v_msg, v_msgEng); - - $("#tmDerogation").focus(); - return; - } - - v_msg="Confirmez-vous cet accord?"; - v_msgEng="Do you confirm this agreement?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idDemandederogation='+idDemandederogation+'&motifReel='+motifReel+'&debut='+debut+'&fin='+fin; - donnees += '&codeDerogation='+codeDerogation+'&tmDerogation='+tmDerogation+'&codePrestataire='+codePrestataire; - - donnees_sav = donnees; - typeMail='accordderogation'; - typeSms = "accordderogation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/enregistreraccordderogation/", - 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_derogation_beneficiaire(); - } - }); - } -} - -function listerderogations() -{ - codePrestataire=$("#codePrestataire").val(); - codeDerogation=$("#codeDerogation").val(); - codeReponseDerogation=$("#codeReponseDerogation").val(); - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'codePrestataire='+codePrestataire+'&codeDerogation='+codeDerogation+'&codeReponseDerogation='+codeReponseDerogation; - donnees += '&debut='+debut+'&fin='+fin; - - $("#div_derogations").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogations/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_derogations").html(data); - }, - complete: function() { - } - }); -} - -function accepter_derogation_2(idDemandederogation) -{ - window.location.assign($("#racineWeb" ).val()+"Accepterderogations/"+idDemandederogation+"/"); -} - -function refuser_derogation_2(idDemandederogation) -{ - window.location.assign($("#racineWeb" ).val()+"Refuserderogations/"+idDemandederogation+"/"); -} - -function enregistrerrefusderogation_2() -{ - idDemandederogation = $("#idDemandederogation").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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - codePrestataire = $("#codePrestataire").val(); - - donnees = 'idDemandederogation='+idDemandederogation+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure+'&codePrestataire='+codePrestataire; - - donnees_sav = donnees; - typeMail='refusderogation'; - typeSms="refusderogation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/enregistrerrefusderogation/", - 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_derogations(); - } - }); - } -} - -function enregistreraccordderogation_2() -{ - idDemandederogation = $("#idDemandederogation").val(); - motifReel = $("#motifReel").val(); - debut = $("#debut").val(); - fin = $("#fin").val(); - - codeDerogation = $("#codeDerogation").val(); - tmDerogation = $("#tmDerogation").val(); - tmDerogation = parseInt(tmDerogation); - - codePrestataire = $("#codePrestataire").val(); - - if (motifReel<=" ") - { - v_msg="Veuillez saisir le motif!"; - v_msgEng="Please enter the reason!"; - alert_ebene(v_msg, v_msgEng); - - $("#motifReel").focus(); - return; - } - - var td0 = $("#datejourfr_C").datepicker("getDate"); - var td1 = $("#debut").datepicker("getDate"); - var td2 = $("#fin").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)); - - if (dt0>dt1 || dt1>dt2) - { - v_msg="Veuillez revoir les dates!"; - v_msgEng="Please review the dates!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (codeDerogation=="01" && tmDerogation<=0) - { - v_msg="Veuillez saisir le ticket modérateur!"; - v_msgEng="Please enter the user fees!"; - alert_ebene(v_msg, v_msgEng); - - $("#tmDerogation").focus(); - return; - } - - v_msg="Confirmez-vous cet accord?"; - v_msgEng="Do you confirm this agreement?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idDemandederogation='+idDemandederogation+'&motifReel='+motifReel+'&debut='+debut+'&fin='+fin; - donnees += '&codeDerogation='+codeDerogation+'&tmDerogation='+tmDerogation+'&codePrestataire='+codePrestataire; - - donnees_sav = donnees; - typeMail='accordderogation'; - typeSms = "accordderogation"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/enregistreraccordderogation/", - 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_derogations(); - } - }); - } -} - -function liste_derogations() -{ - window.location.assign($("#racineWeb" ).val()+"Listederogations/"); -} - -function prestations() -{ - if ($("#idBeneficiaire_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Prestations/"+$("#idBeneficiaire_C" ).val()+"/"); - } -} - -function dossiers() -{ - window.location.assign($("#racineWeb" ).val()+"Dossiers/"); -} - -function factures() -{ - window.location.assign($("#racineWeb" ).val()+"Factures/"); -} - -function listerdossier() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdossiers/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function selectionner_feuille_maladie(no) -{ - $("#numeroFeuilleMaladie_C" ).val(no); -} - -function selectionner_facture(idFacture) -{ - $("#idFacture_C" ).val(idFacture); -} - -function afficher_feuille_maladie() -{ - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val(); - - if (numeroFeuilleMaladie>"") - { - ajax_context_feuille_maladie_afficher(numeroFeuilleMaladie); - } -} - -function ajax_context_feuille_maladie_afficher(numeroFeuilleMaladie) -{ - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Feuillemaladiecons/"); - } - }); -} - -function afficher_facture() -{ - idFacture=$("#idFacture_C" ).val(); - - if (idFacture>"") - { - ajax_context_facture_afficher(idFacture); - } -} - -function ajax_context_facture_afficher(idFacture) -{ - donnees = 'idFacture='+idFacture; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfacture/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Facture/"); - } - }); -} - -function listerfacture() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactures/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function sinistres() -{ - adminDiv = $("#adminDiv").val(); - - if (adminDiv!="1") - { - v_msg="Accès refusé!"; - v_msgEng="Access denied!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb").val()+"Rechercheprestations/"); -} - - -function afficher_pharmacie(numeroBonOrdonnance, codePrestataireLivraison) -{ - donnees = 'numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextpharmaciencien/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Pharmaciencons/"); - } - }); -} - -function afficher_optique(numeroBonOptique, codePrestataireLivraison) -{ - donnees = 'numeroBonOptique='+numeroBonOptique+'&codePrestataireLivraison='+codePrestataireLivraison; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextopticien/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Opticiencons/"); - } - }); -} - -function fraisfuneraire() -{ - window.location.assign($("#racineWeb" ).val()+"Fraisfuneraire/"); -} - - -function demanderfraisfuneraire() -{ - fraisFuneraireDemande=$("#fraisFuneraireDemande_C").val(); - - if (fraisFuneraireDemande==1) - { - v_msg="Déjà effectuée!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Demandefraisfuneraire/"); -} - - -function modifierdemanderfraisfuneraire() -{ - fraisFuneraireDemande=$("#fraisFuneraireDemande_C").val(); - fraisFunerairePaye=$("#fraisFunerairePaye_C").val(); - - if (fraisFuneraireDemande!=1) - { - v_msg="Aucune demande en cours!"; - v_msgEng="No request in progress!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (fraisFunerairePaye==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="Déjà effectuée!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Modifierfraisfuneraire/"); -} - - -function payerfraisfuneraire() -{ - fraisFuneraireDemande=$("#fraisFuneraireDemande_C").val(); - fraisFunerairePaye=$("#fraisFunerairePaye_C").val(); - - if (fraisFuneraireDemande!=1) - { - v_msg="Aucune demande en cours!"; - v_msgEng="No request in progress!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - demandeReglement=$("#demandeReglement").val(); - demandeReglement = parseInt(demandeReglement); - - if (demandeReglement==0) - { - v_msg="Aucune Demande de Règlement!"; - v_msgEng="No request in progress!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (fraisFunerairePaye==1) - { - v_msg="Déjà payé!"; - v_msgEng="Already paid!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Payerfraisfuneraire/"); -} - -function enregistrerdemandefraisfuneraire() -{ - enVigueur=$("#enVigueur_C").val(); - codeEtatBeneficiaire=$("#codeEtatBeneficiaire_C").val(); - etatbeneficiaire=$("#etatbeneficiaire_C").val(); - - if (enVigueur!="1") - { - v_msg="Attention! cette personne n'est pas en vigueur,"; - v_msgEng="Warning! This person is not in force,"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - /* - if (codeEtatBeneficiaire!="V") - { - v_msg="Attention! "+etatbeneficiaire; - v_msgEng="Warning! "+etatbeneficiaire; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - demandeur = $("#demandeur").val(); - codeLienDemandeur = $("#codeLienDemandeur").val(); - - causeDeces = $("#causeDeces").val(); - dateDeces=$("#dateDeces").val(); - - beneficiaireReglement = $("#beneficiaireReglement").val(); - codeLienBeneficiaire = $("#codeLienBeneficiaire").val(); - - observations = $("#observations").val(); - fraisReel = $("#fraisReel").val(); - montantApayer = $("#montantApayer").val(); - - codeModePaiementDemande = $("#codeModePaiementDemande").val(); - codeBanqueBeneficiaire = $("#codeBanqueBeneficiaire").val(); - numeroCompteBeneficiaire = $("#numeroCompteBeneficiaire").val(); - - - if (demandeur<=" ") - { - v_msg="Veuillez saisir le nom du demandeur!"; - v_msgEng="Please enter the name of the payment requestor"; - alert_ebene(v_msg, v_msgEng); - - $("#demandeur").focus(); - return; - } - - if (codeLienDemandeur<=" ") - { - v_msg="Veuillez sélectionner le lien de parenté avec le demandeur!"; - v_msgEng="Please select the relationship with the requestor!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLienDemandeur").focus(); - return; - } - - if (causeDeces<=" ") - { - v_msg="Veuillez saisir la cause du décès!"; - v_msgEng="Please enter the cause of death"; - alert_ebene(v_msg, v_msgEng); - - $("#causeDeces").focus(); - return; - } - - if (dateDeces<=" ") - { - v_msg="Veuillez saisir la date du décès!"; - v_msgEng="Please enter the date of death!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateDeces").focus(); - return; - } - - if (beneficiaireReglement<=" ") - { - v_msg="Veuillez saisir le nom du bénéficiaire du règlement!"; - v_msgEng="Please enter the name of the payee!"; - alert_ebene(v_msg, v_msgEng); - - $("#beneficiaireReglement").focus(); - return; - } - - if (codeLienBeneficiaire<=" ") - { - v_msg="Veuillez sélectionner le lien avec le bénéficiaire du règlement!"; - v_msgEng="Please select the relationship with the payee!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLienBeneficiaire").focus(); - return; - } - - if(montantApayer<=" ") - { - montantApayer = "0"; - } - - if(montantApayer==0) - { - v_msg="Veuillez revoir le montant!"; - v_msgEng="Please review the amount!"; - alert_ebene(v_msg, v_msgEng); - - $("#montantApayer").focus(); - - return; - } - - - if (codeModePaiementDemande<=" ") - { - v_msg="Veuillez sélectionner le mode de paiement!"; - v_msgEng="Please select the payment method!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModePaiementDemande").focus(); - return; - } - - if (codeModePaiementDemande=="VR") - { - if (codeBanqueBeneficiaire<=" ") - { - v_msg="Veuillez sélectionner la banque du bénéficiaire!"; - v_msgEng="Please select the beneficiary\'s bank!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeBanqueBeneficiaire").focus(); - return; - } - - if (numeroCompteBeneficiaire<=" ") - { - v_msg="Veuillez saisir le No de compte du bénéficiaire!"; - v_msgEng="Please enter the beneficiary\'s account number"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroCompteBeneficiaire").focus(); - return; - } - } - - dateEffetPolice = $("#dateEffetPolice_C").val(); - dateEcheancePolice = $("#dateEcheancePolice_C").val(); - - // var td0 = new Date(dateEffetPolice); - dateEntreeBeneficiaire= $("#dateEntreeBeneficiaire_C").val(); - var td0 = new Date(dateEntreeBeneficiaire); - var td1 = $("#dateDeces").datepicker("getDate"); - var td2 = $("#datejourfr_C").datepicker("getDate"); - var td3 = new Date(dateEcheancePolice); - - 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)); - - if (dt1>dt2) - { - v_msg="Veuillez revoir la date!"; - v_msgEng="Please review the date!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateDeces").focus(); - return; - } - - if (dt1>dt3 || dt1dt3) - { - v_msg="Attention! cette police n'est pas couverte à cette date!"; - v_msgEng="Warning! This insurance policy is not valid on this date!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - dateSortieBeneficiaire = $("#dateSortieBeneficiaire_C").val(); - var tdd = new Date(dateSortieBeneficiaire); - dtd = Math.round(Date.parse(tdd)/(1000*3600*24)); - - if(dateSortieBeneficiaire>"2000-01-01") - { - if (dt1>dtd) - { - v_msg="Attention! cette personne n'est pas couverte à cette date!"; - v_msgEng="Warning! This person is not valid on this date!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - } - - v_msg="Confirmez-vous cette demande de frais funéraires?"; - v_msgEng="Do you confirm this request for funeral fees?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'demandeur='+demandeur+'&codeLienDemandeur='+codeLienDemandeur; - donnees += '&beneficiaireReglement='+beneficiaireReglement+'&codeLienBeneficiaire='+codeLienBeneficiaire; - donnees += '&fraisReel='+fraisReel+'&montantApayer='+montantApayer; - donnees += '&causeDeces='+causeDeces+'&dateDeces='+dateDeces; - donnees += '&observations='+observations; - - donnees += '&codeModePaiementDemande='+codeModePaiementDemande; - donnees += '&codeBanqueBeneficiaire='+codeBanqueBeneficiaire+'&numeroCompteBeneficiaire='+numeroCompteBeneficiaire; - - donnees_sav = donnees; - - typeMail='fraisfuneraire'; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerdemandefraisfuneraire/enregistrerdemandefraisfuneraire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - v_msg="Opération effectuée avec succès!"; - v_msgEng="Operation successfully completed"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() { - fraisfuneraire(); - } - }); - } -} - -function listerfraisfuneraires() -{ -} - -function enregistrermodificationsfraisfuneraire() -{ - - idFraisfuneraire = $("#idFraisfuneraire").val(); - - demandeur = $("#demandeur").val(); - codeLienDemandeur = $("#codeLienDemandeur").val(); - - causeDeces = $("#causeDeces").val(); - dateDeces=$("#dateDeces").val(); - - beneficiaireReglement = $("#beneficiaireReglement").val(); - codeLienBeneficiaire = $("#codeLienBeneficiaire").val(); - - observations = $("#observations").val(); - fraisReel = $("#fraisReel").val(); - montantApayer = $("#montantApayer").val(); - - codeModePaiementDemande = $("#codeModePaiementDemande").val(); - codeBanqueBeneficiaire = $("#codeBanqueBeneficiaire").val(); - numeroCompteBeneficiaire = $("#numeroCompteBeneficiaire").val(); - - if (demandeur<=" ") - { - v_msg="Veuillez saisir le nom du demandeur!"; - v_msgEng="Please enter the name of the payment requestor"; - alert_ebene(v_msg, v_msgEng); - - $("#demandeur").focus(); - return; - } - - if (codeLienDemandeur<=" ") - { - v_msg="Veuillez sélectionner le lien de parenté avec le demandeur!"; - v_msgEng="Please select the relationship with the requestor!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLienDemandeur").focus(); - return; - } - - if (causeDeces<=" ") - { - v_msg="Veuillez saisir la cause du décès!"; - v_msgEng="Please enter the cause of death"; - alert_ebene(v_msg, v_msgEng); - - $("#causeDeces").focus(); - return; - } - - if (dateDeces<=" ") - { - v_msg="Veuillez saisir la date du décès!"; - v_msgEng="Please enter the date of death!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateDeces").focus(); - return; - } - - if (beneficiaireReglement<=" ") - { - v_msg="Veuillez saisir le nom du bénéficiaire du règlement!"; - v_msgEng="Please enter the name of the payee!"; - alert_ebene(v_msg, v_msgEng); - - $("#beneficiaireReglement").focus(); - return; - } - - if (codeLienBeneficiaire<=" ") - { - v_msg="Veuillez sélectionner le lien avec le bénéficiaire du règlement!"; - v_msgEng="Please select the relationship with the payee!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLienBeneficiaire").focus(); - return; - } - - if (codeModePaiementDemande<=" ") - { - v_msg="Veuillez sélectionner le mode de paiement!"; - v_msgEng="Please select the payment method!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModePaiementDemande").focus(); - return; - } - - if (codeModePaiementDemande=="VR") - { - if (codeBanqueBeneficiaire<=" ") - { - v_msg="Veuillez sélectionner la banque du bénéficiaire!"; - v_msgEng="Please select the beneficiary\'s bank!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeBanqueBeneficiaire").focus(); - return; - } - - if (numeroCompteBeneficiaire<=" ") - { - v_msg="Veuillez saisir le No de compte du bénéficiaire!"; - v_msgEng="Please enter the beneficiary\'s account number"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroCompteBeneficiaire").focus(); - return; - } - } - - - if(montantApayer<=" ") - { - montantApayer = "0"; - } - - if(montantApayer==0) - { - v_msg="Veuillez revoir le montant!"; - v_msgEng="Please review the amount!"; - alert_ebene(v_msg, v_msgEng); - - $("#montantApayer").focus(); - - return; - } - - dateEffetPolice = $("#dateEffetPolice_C").val(); - dateEcheancePolice=$("#dateEcheancePolice_C").val(); - - // var td0 = new Date(dateEffetPolice); - dateEntreeBeneficiaire= $("#dateEntreeBeneficiaire_C").val(); - var td0 = new Date(dateEntreeBeneficiaire); - var td1 = $("#dateDeces").datepicker("getDate"); - var td2 = $("#datejourfr_C").datepicker("getDate"); - var td3 = new Date(dateEcheancePolice); - - 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)); - - if (dt1>dt2) - { - v_msg="Veuillez revoir la date de consultation!"; - v_msgEng="Please review the date!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (dt1>dt3 || dt1dt3) - { - v_msg="Attention! cette police n'est pas couverte à cette date!"; - v_msgEng="Warning! This insurance policy is not valid on this date!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'demandeur='+demandeur+'&codeLienDemandeur='+codeLienDemandeur; - donnees += '&beneficiaireReglement='+beneficiaireReglement+'&codeLienBeneficiaire='+codeLienBeneficiaire; - donnees += '&fraisReel='+fraisReel+'&montantApayer='+montantApayer; - donnees += '&causeDeces='+causeDeces+'&dateDeces='+dateDeces; - donnees += '&observations='+observations+'&idFraisfuneraire='+idFraisfuneraire; - - donnees += '&codeModePaiementDemande='+codeModePaiementDemande; - donnees += '&codeBanqueBeneficiaire='+codeBanqueBeneficiaire+'&numeroCompteBeneficiaire='+numeroCompteBeneficiaire; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerdemandefraisfuneraire/enregistrermodificationsfraisfuneraire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - v_msg="Modifications effectuées avec succès!"; - v_msgEng="Changes made successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() { - fraisfuneraire() - } - }); - } -} - - -function initierdecompte() -{ - codePeriodeMax = $("#codePeriodeMax").val(); - - 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; - } - - codePeriodeCourant = codeExercice+codeMois; - - if (codePeriodeCourant>codePeriodeMax) - { - v_msg="Veuillez revoir la période!"; - v_msgEng="Please review the 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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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 || regle==8) - { - afficherdecompte(); - } - else - { - // 9 => Décompte validé mais en attente de règlemen - // 1 => Décompte réglé - consulterdecompte(); - } - } - }); -} - -function liste_decompte() -{ - window.location.assign($("#racineWeb" ).val()+"Listedecomptes/"); -} - -function decompte() -{ - window.location.assign($("#racineWeb" ).val()+"Initdecompte/"); -} - -function afficherdecompte() -{ - window.location.assign($("#racineWeb" ).val()+"Decompte/"); -} - -function re_afficherdecompte() -{ - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - window.location.assign($("#racineWeb" ).val()+"Decompte/"); -} - -function rechargerfacture() -{ - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/rechargerfacture/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - afficherdecompte(); - }, - complete: function() { - } - }); -} - -function reinitialiserdecompte() -{ - v_msg="Remettre le décompte à zéro. Confirmez-vous cette opération?"; - v_msgEng="Reset the counts. Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/reinitialiserdecompte/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - afficherdecompte(); - }, - complete: function() { - } - }); - } -} - -function afficher_feuille_maladie_dec() -{ - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - if (numeroFeuilleMaladie>"") - { - ajax_context_feuille_maladie_afficher_dec(numeroFeuilleMaladie); - } -} - -function ajax_context_feuille_maladie_afficher_dec(numeroFeuilleMaladie) -{ - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Feuillemaladiedec/"); - } - }); -} - -function afficher_optique_dec(numeroBonOptique, codePrestataireLivraison) -{ - donnees = 'numeroBonOptique='+numeroBonOptique+'&codePrestataireLivraison='+codePrestataireLivraison; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextopticien/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Opticiendec/"); - } - }); -} - -function afficher_pharmacie_dec(numeroBonOrdonnance, codePrestataireLivraison) -{ - donnees = 'numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextpharmaciencien/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Pharmaciendec/"); - } - }); -} - -function maj_montantForce(idFacture, montantForce) -{ - donnees = 'idFacture='+idFacture+"&montantForce="+montantForce; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxentetedecompte/majmontantforce/", - type: 'POST', - data: donnees, - success: function(data) { - $("#reglement").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - - -function afficherfacturenoncharge() -{ -} - -function afficherfactureattente() -{ -} - -function valider_facture(idFacture, numeroFeuilleMaladie, p_choix, codeTypeFacture) -{ - donnees = 'idFacture='+idFacture+'&choix='+p_choix+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codeTypeFacture='+codeTypeFacture; - - var ctrl_montantForce = $("#montantForce"+idFacture); - var ctrl_montantApayer = $("#montantApayer"+idFacture); - var ctrl_montantRedresse = $("#montantRedresse"+idFacture); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxvaliderfacture/validerfacture/", - type: 'POST', - data: donnees, - success: function(data) { - $("#reglement").html(data); - - montantForce_val = $("#montantForce_val").val(); - montantApayer_val = $("#montantApayer_val").val(); - montantRedresse_val = $("#montantRedresse_val").val(); - montantRedresse_sans_format = $("#montantRedresse_sans_format").val(); - observations_val = $("#observations_val").val(); - - ctrl_montantForce.html(montantForce_val); - - c_html = " "; - - ctrl_montantApayer.html(c_html); - - ctrl_montantRedresse.html(montantRedresse_val); - }, - error: function(data) { - }, - complete: function() - { - // alert("p_choix2 => "+p_choix); - - if ( (montantRedresse_sans_format!=0) && (observations_val<=" ") || (p_choix=="2")) - { - maj_observations_facture(idFacture, observations_val); - } - } - }); -} - -function maj_observations_facture(idFacture, observations) -{ - v_msg="Veuillez saisir ou modifier les observations!"; - v_msgEng="Please enter or edit comments!"; - - observations = prompt_ebene(v_msg, v_msgEng, observations); - - if(observations==null) - { - return; - } - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = 'idFacture='+idFacture+"&observations="+observations; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/majobservations/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function afficher_div_wait() -{ - $("#div_wait").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); -} - -function effacer_div_wait() -{ - $("#div_wait").html(""); -} - -function rechercheprestations_form() -{ - $("#frmrechercheprestation").submit(); -} - -function consulterdecompte() -{ - // detail_reglement - var div_wait = $('#detail_reglement'); - div_wait.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - window.location.assign($("#racineWeb" ).val()+"Decomptecons/"); -} - - -function maj_bordereau_decompte(idReglement, numeroBordereau) -{ - v_msg="Veuillez saisir ou modifier le No de bordereau!"; - v_msgEng="Please enter or modify the slip number!"; - - numeroBordereau = prompt_ebene(v_msg, v_msgEng, numeroBordereau); - - if(numeroBordereau==null) - { - return; - } - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = 'idReglement='+idReglement+"&numeroBordereau="+numeroBordereau; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/majbordereaudecompte/", - type: 'POST', - data: donnees, - success: function(data) { - $("#numeroBordereauDecompte").val(numeroBordereau); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function validerdecompte_premier() -{ -/* -0 Décompte en cours - -2 Attente Valid. prestat. / Waiting for provider s valid. - -3 Validé par le prestataire - -8 Pas besoin de valid prestat / Provid valid not needed - -9 En attente de règelment - -1 Réglé / Payé -*/ - - regle=$("#regle").val(); - regle = parseInt(regle); - - if (regle>0) - { - v_msg="1ère validation déjà effectuée!"; - v_msgEng="1st validation already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#montantApayer").val()<="0") - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to validate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nbNonTraite = $("#nbNonTraite").val(); - if (nbNonTraite!="0") - { - v_msg="Vous avez "+nbNonTraite+" facture(s) non traitée(s)!"; - v_msgEng="You have "+nbNonTraite+" bill(s) not processed!"; - - alert_ebene(v_msg, v_msgEng); - - return; - } - - montantPrestataire = $("#montantPrestataire").val(); - if (montantPrestataire<="0") - { - v_msg="Veuillez indiquer le montant réclamé par le prestataire! => Réception facture"; - v_msgEng="Please indicate the amount claimed by the provider! => Invoice receipt"; - alert_ebene(v_msg, v_msgEng); - - $('#btn_pop_reception').click(); - - return; - } - - nbExclues = $("#nbExclues").val(); - if (nbExclues<="0") - { - v_msg="Confirmez-vous qu'il n'y a pas de factures à exclure?"; - v_msgEng="Do you confirm that there are no invoices to exclude?"; - - if(!confirm_ebene(v_msg, v_msgEng)) - { - return; - } - } - - v_msg="Confirmez-vous la 1ère validation?"; - v_msgEng="Do you confirm the 1st validation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/validerdecomptepremier/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - - prestataire = $("#prestataire").val(); - numeroDecompte = $("#numeroDecompte").val(); - numeroLotDecompte = $("#numeroLotDecompte").val(); - periode = $("#periode").val(); - - - p_message = prestataire+" "; - - p_message += "\n"; - p_message += "Decompte : Attente Valid. prestat. / Waiting for provider valid."; - - p_message += "\n"; - p_message += "Periode : "+periode; - - p_message += "\n"; - p_message += "No Decompte : "+numeroDecompte; - - p_message += "\n"; - p_message += "No Lot : "+numeroLotDecompte; - - envoyer_messagerie(p_message, "0"); - }, - complete: function() - { - v_msg="Validation terminée avec succès!"; - v_msgEng="Validation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - afficherdecompte(); - } - }); - } -} - -function validerdecompte() -{ -/* -0 Décompte en cours - -2 Attente Valid. prestat. / Waiting for provider s valid. - -3 Validé par le prestataire - -8 Pas besoin de valid prestat / Provid valid not needed - -9 En attente de règelment - -1 Réglé / Payé -*/ - - regle=$("#regle").val(); - regle = parseInt(regle); - - if (regle==0) - { - v_msg="Veuillez procéder à la 1ère validation!"; - v_msgEng="Please proceed to the 1st validation!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==2) - { - v_msg="En attente de la validation du prestataire!"; - v_msgEng="Waiting for the validation of the provider!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#montantApayer").val()<="0") - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to validate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ( (regle==3) || (regle==8) ) - { - v_msg="Confirmez-vous la 2ème validation?"; - v_msgEng="Do you confirm the 2nd validation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/validerdecompte/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - v_msg="Validation terminée avec succès!"; - v_msgEng="Validation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - consulterdecompte(); - } - }); - } - } -} - -function afficher_div_wait() -{ - $("#div_page_complet").disable(); -} - -function effacer_div_wait() -{ - $("#div_wait").html(""); -} - - -function imprimerbordereaudecompte() -{ - idReglement = $("#idReglement").val(); - - if (idReglement>"0") - { - var div_wait = $('#div_wait'); - div_wait.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/imprimerbordereaudecompte", - type: 'POST', - success: function(data) - { - div_wait.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } -} - -function reglerdecompte() -{ -/* -0 Décompte en cours - -2 Attente Valid. prestat. / Waiting for provider s valid. - -3 Validé par le prestataire - -8 Pas besoin de valid prestat / Provid valid not needed - -9 En attente de règelment - -1 Réglé / Payé -*/ - - demandeReglement=$("#demandeReglement").val(); - demandeReglement = parseInt(demandeReglement); - - if (demandeReglement==0) - { - v_msg="Aucune Demande de Règlement!"; - v_msgEng="No request in progress!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - regle=$("#regle").val(); - - if (regle==1) - { - v_msg="Déjà réglé!"; - v_msgEng="Already paid!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Reglerdecompte/"); -} - - -function enregistrerreglementdecompte() -{ - idReglement = $("#idReglement").val(); - dateComptable = $("#dateComptable").val(); - montantPaye = $("#montantPaye").val(); - codeModePaiement = $("#codeModePaiement").val(); - referencePaiement = $("#referencePaiement").val(); - - codeBanquePayeur = $("#codeBanquePayeur").val(); - - if (codeModePaiement<=" ") - { - v_msg="Veuillez sélectionner le mode de paiement!"; - v_msgEng="Please select the payment method!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModePaiement").focus(); - return; - } - - if (codeBanquePayeur<=" ") - { - v_msg="Veuillez sélectionner la banque de paiement!"; - v_msgEng="Please select the payment bank!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeBanquePayeur").focus(); - return; - } - - if (referencePaiement<=" ") - { - v_msg="Veuillez indiquer la référence du paiement!"; - v_msgEng="Please enter the payment reference!"; - alert_ebene(v_msg, v_msgEng); - - $("#referencePaiement").focus(); - return; - } - - if (dateComptable<=" ") - { - v_msg="Veuillez saisir la date comptable!"; - v_msgEng="Please enter the posting date!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateComptable").focus(); - return; - } - - if(montantPaye<=" ") - { - montantPaye = "0"; - } - - if(montantPaye==0) - { - v_msg="Veuillez revoir le montant!"; - v_msgEng="Please review the amount!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ce règelement?"; - v_msgEng="Do you confirm this payment?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idReglement='+idReglement+'&codeModePaiement='+codeModePaiement; - donnees += '&referencePaiement='+referencePaiement+'&montantPaye='+montantPaye; - donnees += '&dateComptable='+dateComptable; - donnees += '&codeBanquePayeur='+codeBanquePayeur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/enregistrerreglementdecompte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - consulterdecompte(); - }, - complete: function() { - } - }); - } -} - -function preparesms(typeSms) -{ - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return; - } - - codeLangueSociete = $("#codeLangueSociete").val(); - - p_destinataires = ""; - p_message = ""; - creation_message = "1"; - - if (typeSms=="accordderogation") - { - p_destinataires = $("#smsGestionPrestataire").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire").val(); - numeroBeneficiaire = $("#numeroBeneficiaire" ).val(); - prestataire = $("#prestataire").val(); - numeroDerogation = $("#numeroDerogation").val(); - libelleDerogation = $("#libelleDerogation").val(); - tmDerogation = $("#tmDerogation").val(); - - p_message = prestataire+" "; - - p_message += "\n"; - - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Exemption granted for : " : "Derogation accordee pour : "; - p_message += libelleDerogation; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : "; - p_message += numeroDerogation; - } - - if (typeSms=="refusderogation") - { - p_destinataires = $("#smsGestionPrestataire").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire").val(); - numeroBeneficiaire = $("#numeroBeneficiaire" ).val(); - prestataire = $("#prestataire").val(); - numeroDerogation = $("#numeroDerogation").val(); - libelleDerogation = $("#libelleDerogation").val(); - - p_message = prestataire+" "; - - p_message += "\n"; - - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Exemption refused for : " : "Derogation refusee pour : "; - p_message += libelleDerogation; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : "; - p_message += numeroDerogation; - } - - if (typeSms=="accordententeprealable") - { - p_destinataires = $("#smsGestionPrestataire").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire").val(); - numeroBeneficiaire = $("#numeroBeneficiaire" ).val(); - prestataire = $("#prestataire").val(); - numeroEntentePrealable = $("#numeroEntentePrealable").val(); - libelleActe = $("#libelleActe").val(); - - p_message = prestataire+" "; - - p_message += "\n"; - - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Act granted : " : "Acte accorde : "; - p_message += libelleActe; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : "; - p_message += numeroEntentePrealable; - } - - if (typeSms=="refusententeprealable") - { - p_destinataires = $("#smsGestionPrestataire").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire").val(); - numeroBeneficiaire = $("#numeroBeneficiaire" ).val(); - prestataire = $("#prestataire").val(); - numeroEntentePrealable = $("#numeroEntentePrealable").val(); - libelleActe = $("#libelleActe").val(); - - p_message = prestataire+" "; - - p_message += "\n"; - - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Act refused : " : "Acte refuse : "; - p_message += libelleActe; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : "; - p_message += numeroEntentePrealable; - } - - if (typeSms=="refusacteexclu") - { - p_destinataires = $("#smsGestionPrestataire").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire").val(); - numeroBeneficiaire = $("#numeroBeneficiaire" ).val(); - prestataire = $("#prestataire").val(); - numeroAutorisation = $("#numeroAutorisation").val(); - libelleActe = $("#libelleActe").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += "Acte refuse : "+libelleActe+" "; - p_message += "\n"; - p_message += "No demande : "+numeroAutorisation; - } - - if (typeSms=="accordacteexclu") - { - p_destinataires = $("#smsGestionPrestataire").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire").val(); - numeroBeneficiaire = $("#numeroBeneficiaire" ).val(); - prestataire = $("#prestataire").val(); - numeroAutorisation = $("#numeroAutorisation").val(); - libelleActe = $("#libelleActe").val(); - - prixTarif = $("#prixTarif").val(); - valeurActe = $("#valeurActe").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - p_message += "Acte accorde : "+libelleActe+" "; - p_message += "\n"; - - p_message +="Tarif convention : "+prixTarif+" FRW "; - p_message +="Tarif accorde : "+valeurActe+" FRW "; - - p_message += "No demande : "+numeroAutorisation; - } - - if (typeSms=="accordententeprealablepha") - { - p_destinataires = $("#smsGestionPrestataire").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire").val(); - numeroBeneficiaire = $("#numeroBeneficiaire" ).val(); - prestataire = $("#prestataire").val(); - numeroEntentePrealable = $("#numeroEntentePrealable").val(); - libelleMedicament = $("#libelleMedicament").val(); - - p_message = prestataire+" "; - - p_message += "\n"; - - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Drug granted : " : "Medicament accorde : "; - p_message += libelleMedicament; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : "; - p_message += numeroEntentePrealable; - } - - if (typeSms=="refusententeprealablepha") - { - p_destinataires = $("#smsGestionPrestataire").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire").val(); - numeroBeneficiaire = $("#numeroBeneficiaire" ).val(); - prestataire = $("#prestataire").val(); - numeroEntentePrealable = $("#numeroEntentePrealable").val(); - libelleMedicament = $("#libelleMedicament").val(); - - p_message = prestataire+" "; - - p_message += "\n"; - - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Drug refused : " : "Medicament refuse : "; - p_message += libelleMedicament; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : "; - p_message += numeroEntentePrealable; - } - - if (typeSms=="accordententeprealableopt") - { - p_destinataires = $("#smsGestionPrestataire").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire").val(); - numeroBeneficiaire = $("#numeroBeneficiaire" ).val(); - prestataire = $("#prestataire").val(); - numeroEntentePrealable = $("#numeroEntentePrealable").val(); - libelleOptique = $("#libelleOptique").val(); - - p_message = prestataire+" "; - - p_message += "\n"; - - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Glasses granted : " : "Verres accordes : "; - p_message += libelleOptique; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : "; - p_message += numeroEntentePrealable; - } - - if (typeSms=="refusententeprealableopt") - { - p_destinataires = $("#smsGestionPrestataire").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire").val(); - numeroBeneficiaire = $("#numeroBeneficiaire" ).val(); - prestataire = $("#prestataire").val(); - numeroEntentePrealable = $("#numeroEntentePrealable").val(); - libelleOptique = $("#libelleOptique").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Glasses refused : " : "Verres refuses : "; - p_message += libelleOptique; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : "; - p_message += numeroEntentePrealable; - } - - if (typeSms=="accordententeprealablemont") - { - p_destinataires = $("#smsGestionPrestataire").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire").val(); - numeroBeneficiaire = $("#numeroBeneficiaire" ).val(); - prestataire = $("#prestataire").val(); - numeroEntentePrealable = $("#numeroEntentePrealable").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Optical frame : granted" : "Monture accordee"; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : "; - p_message += numeroEntentePrealable; - } - - if (typeSms=="refusententeprealablemont") - { - p_destinataires = $("#smsGestionPrestataire").val(); - - copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val(); - if (copieSmsPrestataireAssure=="1") - { - p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires); - } - - patient = $("#beneficiaire").val(); - numeroBeneficiaire = $("#numeroBeneficiaire" ).val(); - prestataire = $("#prestataire").val(); - numeroEntentePrealable = $("#numeroEntentePrealable").val(); - - p_message = prestataire+" "; - p_message += "\n"; - p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") "; - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Optical frame : refused" : "Monture refuse"; - - p_message += "\n"; - - p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : "; - p_message += numeroEntentePrealable; - } - - envoyersms(p_destinataires, p_message, creation_message); -} - - -function liste_ententeprealables() -{ - actVisible=$("#actVisible").val(); - - // if (actVisible!="1" && modeSaisieFacture!="1") - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Listeententeprealables/"); -} - -function liste_actes_exclus() -{ - window.location.assign($("#racineWeb" ).val()+"Listeexclusions/"); -} - -function listeententeprealables() -{ - codePrestataire=$("#codePrestataire").val(); - codeReponseEntentePrealable=$("#codeReponseEntentePrealable").val(); - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'codePrestataire='+codePrestataire+'&codeReponseEntentePrealable='+codeReponseEntentePrealable; - donnees += '&debut='+debut+'&fin='+fin; - - $("#div_ententeprealable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealables/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ententeprealable").html(data); - }, - complete: function() { - } - }); -} - -function accepter_ententeprealable_2(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()+"Accepterententeprealables/"+idDemandeententeprealable+"/"); -} - -function refuser_ententeprealable_2(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()+"Refuserententeprealables/"+idDemandeententeprealable+"/"); -} - -// - -function accepter_ententeprealable(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()+"Accepterententeprealable/"+idDemandeententeprealable+"/"); -} - -function refuser_ententeprealable(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()+"Refuserententeprealable/"+idDemandeententeprealable+"/"); -} - -function liste_ententeprealable_beneficiaire() -{ - window.location.assign($("#racineWeb" ).val()+"Listeententeprealablesbenficiaire/"); -} - -function liste_actes_exclus_beneficiaire() -{ - window.location.assign($("#racineWeb" ).val()+"Listeexclusionsbenficiaire/"); -} - -function enregistreraccordententepreslable_2() -{ - idDemandeententeprealable = $("#idDemandeententeprealable").val(); - motifReel = $("#motifReel").val(); - - if (motifReel<=" ") - { - v_msg="Veuillez saisir le motif!"; - v_msgEng="Please enter the reason!"; - alert_ebene(v_msg, v_msgEng); - - $("#motifReel").focus(); - return; - } - - v_msg="Confirmez-vous cet accord?"; - v_msgEng="Do you confirm this agreement?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - codePrestataire = $("#codePrestataire").val(); - - donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&codePrestataire='+codePrestataire; - - donnees_sav = donnees; - typeMail="accordententeprealable"; - typeSms = "accordententeprealable"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistreraccordententeprealable/", - 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(); - } - }); - } -} - -function enregistrerrefusententepreslable_2() -{ - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - codePrestataire = $("#codePrestataire").val(); - - donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure+'&codePrestataire='+codePrestataire; - - donnees_sav = donnees; - typeMail='refusententeprealable'; - typeSms="refusententeprealable"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistrerrefusententeprealable/", - 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(); - } - }); - } -} - -function listerententeprealablebeneficiaire() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_ententeprealable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ententeprealable").html(data); - }, - complete: function() { - } - }); -} - -function enregistreraccordententepreslable() -{ - idDemandeententeprealable = $("#idDemandeententeprealable").val(); - motifReel = $("#motifReel").val(); - - if (motifReel<=" ") - { - v_msg="Veuillez saisir le motif!"; - v_msgEng="Please enter the reason!"; - alert_ebene(v_msg, v_msgEng); - - $("#motifReel").focus(); - return; - } - - v_msg="Confirmez-vous cet accord?"; - v_msgEng="Do you confirm this agreement?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - codePrestataire = $("#codePrestataire").val(); - - donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&codePrestataire='+codePrestataire; - - donnees_sav = donnees; - typeMail='accordententeprealable'; - typeSms = "accordententeprealable"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistreraccordententeprealable/", - 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_ententeprealable_beneficiaire(); - } - }); - } -} - -function enregistrerrefusententepreslable() -{ - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - codePrestataire = $("#codePrestataire").val(); - - donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure+'&codePrestataire='+codePrestataire; - - donnees_sav = donnees; - typeMail='refusententeprealable'; - typeSms="refusententeprealable"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistrerrefusententeprealable/", - 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_ententeprealable_beneficiaire(); - } - }); - } -} - -function afficher_decompte(idFacture, montantForce) -{ - donnees = 'idFacture='+idFacture+"&montantForce="+montantForce; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxentetedecompte/majmontantforce/", - type: 'POST', - data: donnees, - success: function(data) { - $("#reglement").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - - -function ctrlkeypress_tarifmedicament(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_tarifpharmacie(); - } -} - -function ctrlkeypress_tarifacte(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_tarifacte(); - } -} - -function ctrlkeypress_tarifoptique(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_tarifoptique(); - } -} - -function consulter_sinistres() -{ - window.location.assign($("#racineWeb" ).val()+"Consultations/"); -} - -function liste_dossiers() -{ - window.location.assign($("#racineWeb" ).val()+"Listedossiers/"); -} - -function liste_factures() -{ - window.location.assign($("#racineWeb" ).val()+"Listefactures/"); -} - -function lister_dossiers() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - codePrestataire = $("#codePrestataire").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - donnees = 'd1='+d1+'&d2='+d2+'&codePrestataire='+codePrestataire; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistedossiers/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function lister_factures() -{ - d1 = $("#d1").val(); - d2 = $("#d2").val(); - codePrestataire = $("#codePrestataire").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - donnees = 'd1='+d1+'&d2='+d2+'&codePrestataire='+codePrestataire; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistefactures/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - - -function listeactesexclus() -{ - codePrestataire = $("#codePrestataire").val(); - codeReponseAutorisation = $("#codeReponseAutorisation").val(); - debut = $("#debut").val(); - fin = $("#fin").val(); - - donnees = 'codePrestataire='+codePrestataire+'&codeReponseAutorisation='+codeReponseAutorisation; - donnees += '&debut='+debut+'&fin='+fin; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactesexclus/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ententeprealable").html(data); - }, - complete: function() { - } - }); -} - -function refuser_acte_exclu_2(idDemandeautorisation) -{ - window.location.assign($("#racineWeb" ).val()+"Refuseracteexclus/"+idDemandeautorisation+"/"); -} - -function refuser_acte_exclu(idDemandeautorisation) -{ - - window.location.assign($("#racineWeb" ).val()+"Refuseracteexclu/"+idDemandeautorisation+"/"); -} - -function enregistrerrefus_acte_exclu_2() -{ - idDemandeautorisation = $("#idDemandeautorisation").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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idDemandeautorisation='+idDemandeautorisation+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure; - - donnees_sav = donnees; - typeMail='refusacteexclu'; - typeSms="refusacteexclu"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistrerrefusacteexclu/", - 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_actes_exclus(); - } - }); - } -} - -function accepter_acte_exclu_2(idDemandeautorisation) -{ - window.location.assign($("#racineWeb" ).val()+"Accepteracteexclus/"+idDemandeautorisation+"/"); -} - -function accepter_acte_exclu(idDemandeautorisation) -{ - window.location.assign($("#racineWeb" ).val()+"Accepteracteexclu/"+idDemandeautorisation+"/"); -} - -function enregistreraccord_acte_exclu_2() -{ - idDemandeautorisation = $("#idDemandeautorisation").val(); - motifReel = $("#motifReel").val(); - - prixTarif = $("#prixTarif").val(); - valeurActe = $("#valeurActe").val(); - - if (motifReel<=" ") - { - v_msg="Veuillez saisir le motif!"; - v_msgEng="Please enter the reason!"; - alert_ebene(v_msg, v_msgEng); - - $("#motifReel").focus(); - return; - } - - if(valeurActe==0 || parseFloat(valeurActe)>parseFloat(prixTarif)) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#valeurActe").focus(); - return; - } - - v_msg="Confirmez-vous cet accord?"; - v_msgEng="Do you confirm this agreement?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idDemandeautorisation='+idDemandeautorisation+'&motifReel='+motifReel+'&valeurActe='+valeurActe; - - donnees_sav = donnees; - typeMail='accordacteexclu'; - typeSms="accordacteexclu"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistreraccordacteexclu/", - 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_actes_exclus(); - } - }); - } -} - -function listeracteexclubeneficiaire() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactesexclusbenficiaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ententeprealable").html(data); - }, - complete: function() { - } - }); -} - -function enregistrerrefus_acte_exclu() -{ - idDemandeautorisation = $("#idDemandeautorisation").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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idDemandeautorisation='+idDemandeautorisation+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure; - - donnees_sav = donnees; - typeMail='refusacteexclu'; - typeSms="refusacteexclu"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistrerrefusacteexclu/", - 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_actes_exclus_beneficiaire(); - } - }); - } -} - -function enregistreraccord_acte_exclu() -{ - idDemandeautorisation = $("#idDemandeautorisation").val(); - motifReel = $("#motifReel").val(); - - prixTarif = $("#prixTarif").val(); - valeurActe = $("#valeurActe").val(); - - if (motifReel<=" ") - { - v_msg="Veuillez saisir le motif!"; - v_msgEng="Please enter the reason!"; - alert_ebene(v_msg, v_msgEng); - - $("#motifReel").focus(); - return; - } - - if(valeurActe==0 || parseFloat(valeurActe)>parseFloat(prixTarif)) - { - v_msg="Veuillez revoir le tarif!"; - v_msgEng="Please review rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#valeurActe").focus(); - return; - } - - v_msg="Confirmez-vous cet accord?"; - v_msgEng="Do you confirm this agreement?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idDemandeautorisation='+idDemandeautorisation+'&motifReel='+motifReel+'&valeurActe='+valeurActe; - - donnees_sav = donnees; - typeMail='accordacteexclu'; - typeSms="accordacteexclu"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistreraccordacteexclu/", - 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_actes_exclus_beneficiaire(); - } - }); - } -} - -function verifier_feuille_maladie_dec(numeroFeuilleMaladie, idFacture, codeTypeFacture) -{ - $("#numeroFeuilleMaladie_C").val(numeroFeuilleMaladie); - numeroDecompte = $("#numeroDecompte").val(); - - if (idFacture>"0") - { - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroDecompte='+numeroDecompte+'&idFacture='+idFacture; - - codeTypePrestataire = $("#codeTypePrestataire").val(); - - if(codeTypeFacture=="CSO" || codeTypeFacture=="LAB" || codeTypeFacture=="SEA") - { - verifier_feuille_maladie_dec_cso(donnees); - } - else - if(codeTypeFacture=="PHAR" || codeTypeFacture=="PHA") - { - verifier_feuille_maladie_dec_pha(donnees); - } - else - if(codeTypeFacture=="OPT") - { - verifier_feuille_maladie_dec_opt(donnees); - } - } -} - -function verifier_feuille_maladie_dec_cso(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfacture/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function verifier_feuille_maladie_dec_pha(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfacturepha/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - - -function verifier_feuille_maladie_dec_pha_cons(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfacturephacons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - - -function valider_facture_dec() -{ - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherverifierfacture/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(); - } - }); - } -} - -function afficher_recap_decompte() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxentetedecompte/", - success: function(data) { - $("#reglement").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function valider_prestation(idPrestationactes, p_choix) -{ - numeroFeuilleMaladie = $("#numeroFeuilleMaladie").val(); - idFacture = $("#idFacture").val(); - - donnees = 'idPrestationactes='+idPrestationactes+"&choix="+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherverifierfacture/validerprestation/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_verification_facture").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function valider_prestation_pha(idPrestationactes, p_choix) -{ - numeroFeuilleMaladie = $("#numeroFeuilleMaladie").val(); - idFacture = $("#idFacture").val(); - - donnees = 'idPrestationactes='+idPrestationactes+"&choix="+p_choix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherverifierfacturepha/validerprestation/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_verification_facture").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function maj_montantForce_prestation(idPrestationactes, montantForce) -{ - donnees = 'idPrestationactes='+idPrestationactes+"&montantForce="+montantForce; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherverifierfacture/majmontantforce/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_verification_facture").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function reinit_facture_dec() -{ - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherverifierfacture/reinitfacturedec/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_verification_facture").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function reinit_facture_dec_pha() -{ - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherverifierfacturepha/reinitfacturedec/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_verification_facture").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - - -function maj_montantForce_prestation_pha(idPrestationactes, montantForce) -{ - donnees = 'idPrestationactes='+idPrestationactes+"&montantForce="+montantForce; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherverifierfacturepha/majmontantforce/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_verification_facture").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function valider_facture_dec_pha() -{ - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherverifierfacturepha/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(); - } - }); - } -} - - -function verifier_feuille_maladie_dec_cons(numeroFeuilleMaladie, idFacture, codeTypeFacture) -{ - $("#numeroFeuilleMaladie_C").val(numeroFeuilleMaladie); - numeroDecompte = $("#numeroDecompte").val(); - - if (idFacture>"0") - { - donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroDecompte='+numeroDecompte+'&idFacture='+idFacture; - - codeTypePrestataire = $("#codeTypePrestataire").val(); - - if(codeTypeFacture=="CSO" || codeTypeFacture=="LAB" || codeTypeFacture=="SEA") - { - verifier_feuille_maladie_dec_cso_cons(donnees); - } - else - if(codeTypeFacture=="PHAR" || codeTypeFacture=="PHA") - { - verifier_feuille_maladie_dec_pha_cons(donnees); - } - else - if(codeTypeFacture=="OPT") - { - verifier_feuille_maladie_dec_opt_cons(donnees); - } - } -} - -function verifier_feuille_maladie_dec_cso_cons(donnees) -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxverifierfacturecons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_verification_facture").html(data); - }, - complete: function() { - $("#btn_pop").click(); - } - }); -} - -function requetes() -{ - window.location.assign($("#racineWeb" ).val()+"Requetes/"); -} - - -function ajaxenteterequete() -{ - 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; - } - - donnees = 'codeRequete='+codeRequete; - - v_url = $("#racineWeb").val()+"Ajaxrequeteentete"+codeRequete+"/"; - - $("#div_ente_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ente_requete").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function requetes_feuilles_maladie() -{ - $('#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(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_feuilles_maladie_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/"; - - 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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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 ctrlkeypress_medecin(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_medecin(); - } -} - -function afficher_pop_recherche_medecin() -{ - - noOrdreMedecin = $("#noOrdreMedecin").val(); - nomsearch = $("#nomsearch").val(); - - if(noOrdreMedecin+nomsearch<=" ") - return; - - donnees = "valid=1&noOrdreMedecin="+noOrdreMedecin+"&nomsearch="+nomsearch; - - $("#div_listemedecins").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedecins/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listemedecins").html(data); - } - }); -} - -function selectionner_medecin(codeMedecin, nomMedecin, noOrdreMedecin) -{ - $("#codeMedecin").val(codeMedecin); - $("#nomMedecin").html(nomMedecin+" ( "+noOrdreMedecin+" )"); - $("#close_pop").click(); -} - -function reinitialiser_medecin() -{ - $("#codeMedecin").val(""); - $("#nomMedecin").html("Rechercher Médecin..."); - $("#close_pop").click(); -} - - -function requetes_bonpoec() -{ - $('#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(); - codeTypeBon = $("#codeTypeBon").val(); - codeEtatBon = $("#codeEtatBon").val(); - - // Ligne 2 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - numeroBon1 = $("#numeroBon1").val(); - numeroBon2 = $("#numeroBon2").val(); - - // Ligne 4 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBon1 = convertir_en_entier(numeroBon1); - numeroBon2 = convertir_en_entier(numeroBon2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&codeTypeBon=' + codeTypeBon; - donnees += '&codeEtatBon=' + codeEtatBon; - - // Ligne 2 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&numeroBon1=' + numeroBon1; - donnees += '&numeroBon2=' + numeroBon2; - - // Ligne 4 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_bonpoec_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(); - codeTypeBon = $("#codeTypeBon").val(); - codeEtatBon = $("#codeEtatBon").val(); - - // Ligne 2 - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - numeroBon1 = $("#numeroBon1").val(); - numeroBon2 = $("#numeroBon2").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // FIN champs - - // DEBUT convertir_en_entier - numeroBon1 = convertir_en_entier(numeroBon1); - numeroBon2 = convertir_en_entier(numeroBon2); - // FIN convertir_en_entier - - // Ligne 1 - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&codeTypeBon=' + codeTypeBon; - donnees += '&codeEtatBon=' + codeEtatBon; - - // Ligne 2 - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - donnees += '&numeroBon1=' + numeroBon1; - donnees += '&numeroBon2=' + numeroBon2; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_prestationactes() -{ - $('#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(); - datePrestation1 = $("#datePrestation1").val(); - datePrestation2 = $("#datePrestation2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - 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(); - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - codeTypePrestation = $("#codeTypePrestation").val(); - ententePrealable = $("#ententePrealable").val(); - numeroChambre = $("#numeroChambre").val(); - facture = $("#facture").val(); - - // Ligne 4 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 5 - libelleActe = $("#libelleActe").val(); - libelleFamilleActe = $("#libelleFamilleActe").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 += '&datePrestation1=' + datePrestation1; - donnees += '&datePrestation2=' + datePrestation2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - 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 += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codeTypePrestation=' + codeTypePrestation; - donnees += '&ententePrealable=' + ententePrealable; - donnees += '&numeroChambre=' + numeroChambre; - donnees += '&facture=' + facture; - - // Ligne 4 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 5 - donnees += '&libelleActe=' + libelleActe; - donnees += '&libelleFamilleActe=' + libelleFamilleActe; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_prestationactes_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(); - datePrestation1 = $("#datePrestation1").val(); - datePrestation2 = $("#datePrestation2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - 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(); - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - codeTypePrestation = $("#codeTypePrestation").val(); - ententePrealable = $("#ententePrealable").val(); - numeroChambre = $("#numeroChambre").val(); - facture = $("#facture").val(); - - // Ligne 4 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 5 - libelleActe = $("#libelleActe").val(); - libelleFamilleActe = $("#libelleFamilleActe").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 += '&datePrestation1=' + datePrestation1; - donnees += '&datePrestation2=' + datePrestation2; - donnees += '&numeroAdherent=' + numeroAdherent; - donnees += '&numeroBeneficiaire=' + numeroBeneficiaire; - - // Ligne 2 - donnees += '&codeMedecin=' + codeMedecin; - - 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 += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codeTypePrestation=' + codeTypePrestation; - donnees += '&ententePrealable=' + ententePrealable; - donnees += '&numeroChambre=' + numeroChambre; - donnees += '&facture=' + facture; - - // Ligne 4 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 5 - donnees += '&libelleActe=' + libelleActe; - donnees += '&libelleFamilleActe=' + libelleFamilleActe; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_pharmacie() -{ - $('#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(); - dateLivraison1 = $("#dateLivraison1").val(); - dateLivraison2 = $("#dateLivraison2").val(); - numeroAdherent = $("#numeroAdherent").val(); - numeroBeneficiaire = $("#numeroBeneficiaire").val(); - - // Ligne 2 - codeMedecin = $("#codeMedecin").val(); - - numeroBonConsultation1 = $("#numeroBonConsultation1").val(); - numeroBonConsultation2 = $("#numeroBonConsultation2").val(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleMedicament = $("#libelleMedicament").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); - - 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 += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleMedicament=' + libelleMedicament; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_pharmacie_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(); - - numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val(); - numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val(); - - numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val(); - numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val(); - - codePrestatairePrescription = $("#codePrestatairePrescription").val(); - - // Ligne 3 - adherent = $("#adherent").val(); - beneficiaire = $("#beneficiaire").val(); - - // Ligne 4 - libelleMedicament = $("#libelleMedicament").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); - - 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 += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1; - donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2; - - donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1; - donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2; - - donnees += '&codePrestatairePrescription=' + codePrestatairePrescription; - - // Ligne 3 - donnees += '&adherent=' + adherent; - donnees += '&beneficiaire=' + beneficiaire; - - // Ligne 4 - donnees += '&libelleMedicament=' + libelleMedicament; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_optique() -{ - $('#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 - 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; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherverifierfactureopt/reinitfacturedec/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_verification_facture").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.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(); - } - }); - } -} - -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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - 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/"); - } - }); - } -} - -function remboursement_classique() -{ - window.location.assign($("#racineWeb" ).val()+"Remboursementclassique/"); -} - -function listerremboursementbeneficiaire() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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; - } - - window.location.assign($("#racineWeb" ).val()+"Factureclassique/"); -} - - -function enregistrerfacture_classique_temp() -{ - 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 = new Date(dateEntreeBeneficiaire); - var td1 = new Date(dateConsultation); - var td2 = $("#datejourfr_C").datepicker("getDate"); - var td3 = 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="Devis déjà transformé!"; - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.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/"); - } - }); - } -} - -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); - }, - complete: function() { - } - }); -} - -function supprimer_option() -{ - transforme = $("#transforme").val(); - if (transforme=="1") - { - v_msg="Devis déjà transformé!"; - v_msgEng="Quote already transformed!"; - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.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(); - } - }); - } -} - -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; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestatairenpluscons/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_complet").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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 ((dt1  ' + 'Chargment en temps réel. Veuillez patienter...' + ''); - } - else - { - $("#div_attente").html('
  ' + 'Chargement archive du '+dateAnalyse+'. Veuillez patienter...' + '
'); - } - */ - - // $("#div_attente").html('
  ' + 'Chargement archive du '+dateAnalyse+'. Veuillez patienter...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxinitstat/initstat/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficherstat(); - } - }); -} - -function initierstatistiques_non_archives() -{ - 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="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(""); - - $("#close_pop").click(); - - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - $("#libelleApporteur").html("All / Search Provider..."); - - } - else - { - $("#nomPrestataire").html("Tous / Rechercher Prestataire ..."); - } - -} - -function ctrlkeypress_prestataire(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_prestataire(); - } -} - -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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteprestataires/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_listeprestataires").html(data); - } - }); -} - -function selectionner_prestataire(codePrestataire, nomPrestataire) -{ - $("#codePrestataire").val(codePrestataire); - $("#nomPrestataire").html(nomPrestataire); - $("#close_pop").click(); -} - -// 2 - -function reinitialiser_prestataire2() -{ - $("#codePrestataire").val(""); - $("#nomPrestataire").html("Tous / Rechercher Prestataire ..."); - $("#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_prestataire2() -{ - codesearch = $("#codesearch2").val(); - nomsearch = $("#nomsearch2").val(); - - if(codesearch+nomsearch<=" ") - return; - - donnees = "valid=1&codesearch="+codesearch+"&nomsearch="+nomsearch; - - $("#div_listeprestataires").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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) -{ - donnees = 'codePrestataire='+codePrestataire; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestatairetm/ajouterunprestatairetm/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_complet").html(data); - }, - 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); - }, - 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); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function prestataire_tm_cons() -{ - window.location.assign($("#racineWeb" ).val()+"Prestatairetmcons/"); -} - -function afficher_prestataire_tm() -{ - idCollege = $("#idCollege").val(); - - donnees = 'idCollege='+idCollege; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestatairetmcons/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_complet").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function de_archiver_garantie_college(idCollege) -{ - v_msg="Confirmez-vous le désarchivage des garanties de ce collège?"; - v_msgEng="Do you confirm the unarchivity of the guarantees of this college?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcollege/desarchivergarntie/", - type : 'post', - data: "idCollege="+idCollege, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - college_police(); - } - }); - } -} - -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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ente_requete").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -// - -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  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.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_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  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.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  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.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  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/"; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - 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 = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"export/"; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - 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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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(codeReseau) -{ - $('#div_export_b').html(""); - $("#codeReseau").val(codeReseau); - $("#btn_pop_detail").click(); -} - -function charger_detail_stat_type_prestataire() -{ - $('#div_export_b').html(""); - codeReseau = $("#codeReseau").val(); - donnees = "codeReseau="+codeReseau; - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#btn_enreg").click(); - } -} - -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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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="question"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - 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(); - } - }); - } -} - - -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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - motifSortie = ""; - - v_msg="Supprimé pour quel motif?"; - v_msgEng="Deleted for what reason?"; - - motifSortie = prompt_ebene(v_msg, v_msgEng, 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; - } - - donnees = 'idSubstitut='+idSubstitut+'&motifSortie='+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(); - } - }); - } -} - -// 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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcollege/refuserderogationmedicament/", - type : 'post', - data: "idCollege="+idCollege, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - derogation_medicament(); - } - }); - } -} - - -function accorder_derogation_medicament(idCollege) -{ - v_msg="Confirmez-vous cet accord?"; - v_msgEng="Do you confirm this agreement?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcollege/accorderderogationmedicament/", - type : 'post', - data: "idCollege="+idCollege, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - derogation_medicament(); - } - }); - } -} - - -function afficher_detail_stat_police(idPolice, emailRapport) -{ - $('#div_export_b').html(""); - $("#idPolice").val(idPolice); - $("#emailRapport").val(emailRapport); - $("#emailRapport_0").val(emailRapport); - $("#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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcollege/desarchiveradherent/", - type : 'post', - data: "idAherent="+idAherent, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - adherents_police(); - } - }); - } -} - -function archiver_adherent(idAherent) -{ - v_msg="Confirmez-vous l\'archivage de cette famille?"; - v_msgEng="Do you confirm the archiving of this family?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcollege/archiveradherent/", - type : 'post', - data: "idAherent="+idAherent, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - adherents_police(); - } - }); - } -} - -function archiver_adherent_fiche(idAherent) -{ - v_msg="Confirmez-vous l\'archivage de cette famille?"; - v_msgEng="Do you confirm the archiving of this family?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcollege/archiveradherent/", - type : 'post', - data: "idAherent="+idAherent, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - afficher_adherent_id(); - } - }); - } -} - -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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcollege/desarchiveradherent/", - type : 'post', - data: "idAherent="+idAherent, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - afficher_adherent_id(); - } - }); - } -} - -function archiver_beneficiaire(idBeneficiaire) -{ - v_msg="Confirmez-vous l\'archivage de cette personne?"; - v_msgEng="Do you confirm the archiving of this person?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcollege/archiverbeneficiaire/", - type : 'post', - data: "idBeneficiaire="+idBeneficiaire, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - afficher_adherent_id(); - } - }); - } -} - -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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcollege/desarchiverbeneficiaire/", - type : 'post', - data: "idBeneficiaire="+idBeneficiaire, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - afficher_adherent_id(); - } - }); - } -} - -function afficher_lite_prestataire() -{ - donnees = ""; - donnees_retour = ""; - - - codeTypePrestataire = $("#codeTypePrestataire").val(); - codeReseau = $("#codeReseau").val(); - libelle = $("#libelle").val(); - - codePays = $("#codePays").val(); - codeVille = $("#codeVille").val(); - codeLocalite = $("#codeLocalite").val(); - - donnees += 'codeTypePrestataire=' + codeTypePrestataire; - donnees += '&codeReseau=' + codeReseau; - donnees += '&libelle=' + libelle; - - donnees += '&codePays=' + codePays; - donnees += '&codeVille=' + codeVille; - donnees += '&codeLocalite=' + codeLocalite; - - $("#div_liste_prestataire").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_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(); - codeReseau = $("#codeReseau").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(); - - // 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(); - - 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(codeReseau<=" ") - { - v_msg="Veuillez indiquer le réseau!"; - v_msgEng="Please indicate the care network!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeReseau").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 += '&codeReseau='+codeReseau+'&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; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestataire/enregistrermodif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - retour_prestataire_id(); - } - }); - } -} - -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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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() -{ - codeReponseEntentePrealable=$("#codeReponseEntentePrealable").val(); - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'codeReponseEntentePrealable='+codeReponseEntentePrealable; - donnees += '&debut='+debut+'&fin='+fin; - - $("#div_ententeprealable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablespha/", - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - 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(); - } - }); - } -} - -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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - 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(); - } - }); - } -} - -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; - - emailMedecinConseil = $("#emailMedecinConseil").val(); - emailGestionBon = $("#emailGestionBon").val(); - donnees += '&emailMedecinConseil='+emailMedecinConseil+'&emailGestionBon='+emailGestionBon; - - - - emailCcomptabilite = $("#emailCcomptabilite").val(); - emailDerogation = $("#emailDerogation").val(); - emailAccordPrealable = $("#emailAccordPrealable").val(); - - donnees += '&emailCcomptabilite='+emailCcomptabilite+'&emailDerogation='+emailDerogation+'&emailAccordPrealable='+emailAccordPrealable; - - emailFraudeFinger = $("#emailFraudeFinger").val(); - email_standard = $("#email_standard").val(); - email_reply = $("#email_reply").val(); - - smsMedecinConseil = $("#smsMedecinConseil").val(); - - donnees += '&emailFraudeFinger='+emailFraudeFinger+'&email_standard='+email_standard+'&smsMedecinConseil='+smsMedecinConseil+'&email_reply='+email_reply; - - smsGestionBon = $("#smsGestionBon").val(); - smsDerogation = $("#smsDerogation").val(); - smsAccordPrealable = $("#smsAccordPrealable").val(); - - donnees += '&smsGestionBon='+smsGestionBon+'&smsDerogation='+smsDerogation+'&smsAccordPrealable='+smsAccordPrealable; - - /* - sms_standard = $("#sms_standard").val(); - donnees += '&sms_standard='+sms_standard; - */ - - 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; - } - - donnees += '&codeLangueSociete='+codeLangueSociete; - - $.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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.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 - { - 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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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) -{ - $('#div_export_b').html(""); - $("#idAdherent").val(idAdherent); - $("#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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - 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 - { - 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() { - } - }); -} - -function ajax_actes_possibles_selection_dec() -{ - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees = 'codeFamilleActe='+codeFamilleActe; - - $("#listeacte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactespossiblesselectiondec/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listeacte").html(data); - }, - 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, prixActe, montantTm, aRembourser, ententePrealable) -{ - donnee_a_affciher = ""; - - codeFamilleActe=$("#codeFamilleActe").val(); - - donnees="" - donnees_sav=""; - - if (codeActe<=" ") - { - v_msg="Veuillez sélectionner un acte!"; - v_msgEng="Please select an act!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(ententePrealable==1) - { - ententePrealable = "2"; - } - - donnees = 'codeFamilleActe='+codeFamilleActe+'&codeActe='+codeActe+'&ententePrealable='+ententePrealable; - donnees += '&prixActe='+prixActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser; - - numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val(); - - donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable'; - - $("#div_prestations").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherajoutactesdec/ajouteractedecompte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnee_a_affciher = data; - }, - complete: function() { - $("#div_prestations").html(donnee_a_affciher); - } - }); -} - -function retirer_un_acte_selection_dec(idActe) -{ - - donnee_a_affciher = ""; - - donnees = 'idActe='+idActe; - - $("#div_prestations").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "idPolice="+idPolice+"&emailRapport="+emailRapport; - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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); - } - }); - } -} - -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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "idPolice="+idPolice+"&emailRapport="+emailRapport; - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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); - } - }); - } -} - -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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "idPolice="+idPolice+"&emailRapport="+emailRapport; - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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); - } - }); - } - -} - -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) -{ - 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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - 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 - { - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - 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 - { - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.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 - { - 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 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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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+"/"; - - codePrestataire = $("#codePrestataire").val(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtarifmedicament/desactivermedicament/", - type : 'post', - data: "idDetail="+idDetail, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - afficher_tarifpharmacie(); - } - }); - } -} - -function activer_medicament(idDetail) -{ - v_msg="Confirmez-vous cette activation?"; - v_msgEng="Do you confirm this activation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtarifmedicament/activermedicament/", - type : 'post', - data: "idDetail="+idDetail, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - afficher_tarifpharmacie(); - } - }); - } -} - -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+"/"; - - codePrestataire = $("#codePrestataire").val(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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); - }, - 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(); - - fraisCarteAfn = $("#fraisCarteAfn").val(); - fraisCarteRen = $("#fraisCarteRen").val(); - fraisCarteImp = $("#fraisCarteImp").val(); - - fraisGestion = $("#fraisGestion").val(); - codeGestionCarte = $("#codeGestionCarte").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").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(",","."); - 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(",","."); - $("#gcTauxTva").val(gcTauxTva); - 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 = 'idGc='+idGc+'&libelle='+libelle+'&codeGcAssureur='+codeGcAssureur; - donnees += '&email='+email+'&gcTauxFraisReel='+gcTauxFraisReel+'&gcTauxRedressement='+gcTauxRedressement +'&gcTauxTva='+gcTauxTva; - donnees += '&fraisCarteAfn='+fraisCarteAfn+'&fraisCarteRen='+fraisCarteRen+'&fraisCarteImp='+fraisCarteImp; - donnees += '&fraisGestion='+fraisGestion+'&codeGestionCarte='+codeGestionCarte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcassureur/enregistrermodif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - retour_gc_assureur(); - } - }); -} - -function creer_gc_assureur() -{ - codeGcAssureur = $("#codeGcAssureur").val(); - libelle = $("#libelle").val(); - email = $("#emailGcAssureur").val(); - gcTauxFraisReel = $("#gcTauxFraisReel").val(); - gcTauxRedressement = $("#gcTauxRedressement").val(); - gcTauxTva = $("#gcTauxTva").val(); - - fraisCarteAfn = $("#fraisCarteAfn").val(); - fraisCarteRen = $("#fraisCarteRen").val(); - fraisCarteImp = $("#fraisCarteImp").val(); - - fraisGestion = $("#fraisGestion").val(); - codeGestionCarte = $("#codeGestionCarte").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").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 += '&fraisGestion='+fraisGestion+'&codeGestionCarte='+codeGestionCarte; - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcassureur/ajouter/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Fichepolice/activergc/"+$("#idPolice_C").val()+"/"); - } -} - -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 assureur!"; - v_msgEng="Please select an insurer!"; - 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 assureur!"; - v_msgEng="Please select an insurer!"; - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - window.location.assign($("#racineWeb" ).val()+"Fichepolice/desactivergc/"+idPolice+"/"); - } -} - - -function requetes_factures_gc() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - - codeGcAssureur = $("#codeGcAssureur").val(); - if(codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codeGcAssureur=' + codeGcAssureur; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - 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 assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codeGcAssureur=' + codeGcAssureur; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxrequetefacturegcexport/"; - - $.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 assureur!"; - v_msgEng="Please select an insurer!"; - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcregelement/confirminitreglement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_gc_reglement(); - } - }); - } -} - - -function lister_reglements_gc() -{ - codeGcAssureur = $("#codeGcAssureur").val(); - if(codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees = 'codeGcAssureur=' + codeGcAssureur; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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=$("#codeComposante").val(); - - if(codeComposante<=" ") - { - v_msg="Veuillez sélectionner une compsante!"; - v_msgEng="Please select a compsante!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeComposante").focus(); - return; - } - - donnees = 'codeComposante='+codeComposante; - - if(codeComposante=="SFACT") - { - v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/"; - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - } - }); - } - else - if(codeComposante=="SNFACT") - { - v_url = $("#racineWeb").val()+"Ajaxfacturegcnonselentete/"; - - $("#div_entete_sel").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_entete_sel").html(data); - $(".datepicker" ).datepicker(); - } - }); - } - else - if(codeComposante=="CFACT") - { - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcsel/"; - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - } - }); - - } - else - if(codeComposante=="CNFACT") - { - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcnonselentete/"; - - $("#div_entete_sel").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_entete_sel").html(data); - $(".datepicker" ).datepicker(); - } - }); - } - -} - -function recharger_factures_gc_non_sel() -{ - $("#detail_facture").html(''); - // $("#div_entete_sel").html(''); - - codeGcAssureur = $("#codeGcAssureur").val(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees = 'codeGcAssureur=' + codeGcAssureur; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxfacturegcnonsel/"; - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - - -function valider_selection_factures_gc() -{ - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxfacturegcnonsel/validerselection"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement_gc").html(data); - // $(".datepicker" ).datepicker(); - }, - complete: function() { - $("#detail_facture").html(''); - - v_msg="Validation terminée avec succès!"; - v_msgEng="Validation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - reafficher_factures_gc_non_sel(); - } - }); -} - -function selectionner_facture_gc(idFactureTemp, choix) -{ - donnees = 'idFactureTemp='+idFactureTemp+'&choix='+choix; - - if(choix==0) - { - v_url = $("#racineWeb").val()+"Ajaxfacturegcnonsel/deselectionner/"; - } - else - { - v_url = $("#racineWeb").val()+"Ajaxfacturegcnonsel/selectionner/"; - } - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function reafficher_factures_gc_non_sel() -{ - $("#detail_facture").html(''); - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxfacturegcnonsel/reafficher/"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -// -function selectionner_facture_sel_gc(idFactureTemp, choix) -{ - donnees = 'idFactureTemp='+idFactureTemp+'&choix='+choix; - - if(choix==0) - { - v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/deselectionner/"; - } - else - { - v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/selectionner/"; - } - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function recharger_factures_gc_sel() -{ - v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/"; - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - } - }); -} - -function reafficher_factures_gc_sel() -{ - $("#detail_facture").html(''); - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/reafficher/"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function valider_selection_factures_gc_sel() -{ - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/validerselection"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement_gc").html(data); - // $(".datepicker" ).datepicker(); - }, - complete: function() { - $("#detail_facture").html(''); - - v_msg="Validation terminée avec succès!"; - v_msgEng="Validation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - reafficher_factures_gc_sel(); - } - }); -} - -// - -function requetes_cartes_gc() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - - codeGcAssureur = $("#codeGcAssureur").val(); - if(codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codeGcAssureur=' + codeGcAssureur; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxrequetecartegc/"; - - $.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_cartes_gc_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeGcAssureur = $("#codeGcAssureur").val(); - if(codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codeGcAssureur=' + codeGcAssureur; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxrequetecartegcexport/"; - - $.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 ged_carte_gc(idGcCarte) -{ - if (idGcCarte>"0") - { - } -} - -// -function recharger_cartes_gc_non_sel() -{ - $("#detail_facture").html(''); - - codeGcAssureur = $("#codeGcAssureur").val(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees = 'codeGcAssureur=' + codeGcAssureur; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxcartegcnonsel/"; - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function valider_selection_cartes_gc() -{ - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxcartegcnonsel/validerselection"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement_gc").html(data); - // $(".datepicker" ).datepicker(); - }, - complete: function() { - $("#detail_facture").html(''); - - v_msg="Validation terminée avec succès!"; - v_msgEng="Validation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - reafficher_cartes_gc_non_sel(); - } - }); -} - -function reafficher_cartes_gc_non_sel() -{ - $("#detail_facture").html(''); - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxcartegcnonsel/reafficher/"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function selectionner_carte_gc(idCarteTemp, choix) -{ - donnees = 'idCarteTemp='+idCarteTemp+'&choix='+choix; - - if(choix==0) - { - v_url = $("#racineWeb").val()+"Ajaxcartegcnonsel/deselectionner/"; - } - else - { - v_url = $("#racineWeb").val()+"Ajaxcartegcnonsel/selectionner/"; - } - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function selectionner_carte_sel_gc(idCarteTemp, choix) -{ - donnees = 'idCarteTemp='+idCarteTemp+'&choix='+choix; - - if(choix==0) - { - v_url = $("#racineWeb").val()+"Ajaxcartegcsel/deselectionner/"; - } - else - { - v_url = $("#racineWeb").val()+"Ajaxcartegcsel/selectionner/"; - } - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function recharger_cartes_gc_sel() -{ - v_url = $("#racineWeb").val()+"Ajaxcartegcsel/"; - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - } - }); -} - -function reafficher_cartes_gc_sel() -{ - $("#detail_facture").html(''); - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxcartegcsel/reafficher/"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function valider_selection_cartes_gc_sel() -{ - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxcartegcsel/validerselection"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement_gc").html(data); - }, - complete: function() { - $("#detail_facture").html(''); - - v_msg="Validation terminée avec succès!"; - v_msgEng="Validation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - reafficher_cartes_gc_sel(); - } - }); -} - -function selectionner_carte_sel_gc_tout(choix) -{ - donnees = 'choix='+choix; - - v_url = $("#racineWeb").val()+"Ajaxcartegcsel/selectionnertout/"; - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - reafficher_cartes_gc_sel(); - } - }); -} - -function selectionner_carte_gc_tout(choix) -{ - donnees = 'choix='+choix; - - v_url = $("#racineWeb").val()+"Ajaxcartegcnonsel/selectionnertout/"; - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - reafficher_cartes_gc_non_sel(); - } - }); -} - -// factures - -function selectionner_facture_sel_gc_tout(choix) -{ - donnees = 'choix='+choix; - - v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/selectionnertout/"; - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - reafficher_factures_gc_sel(); - } - }); -} - -function selectionner_facture_gc_tout(choix) -{ - donnees = 'choix='+choix; - - v_url = $("#racineWeb").val()+"Ajaxfacturegcnonsel/selectionnertout/"; - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - reafficher_factures_gc_non_sel(); - } - }); -} - -function modifier_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; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcregelement/enregistrermodificationgcreglement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_gc_reglement(); - } - }); -} - - -function valider_gc_rglement_premier() -{ - valide0=$("#valide0").val(); - valide0 = parseInt(valide0); - - if (valide0==1) - { - v_msg="1ère validation déjà effectuée!"; - v_msgEng="1st validation already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - montantDu=$("#montantDu").val(); - montantDu = parseInt(montantDu); - - if (montantDu<=0) - { - v_msg="Rien à valider, revoir le total de la facture!"; - v_msgEng="Nothing to validate, review the total bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (valide0==0) - { - v_msg="quesConfirmez-vous la 1ère validation de cette facturation?tion"; - v_msgEng="Do you confirm the 1st validation of this billing?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcregelement/validerdecomptepremier/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - v_msg="1ère validation effectuée avec succès!"; - v_msgEng="1st validation done successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() { - afficher_gc_reglement(); - } - }); - } - } -} - -// - -function valider_gc_rglement() -{ - valide0=$("#valide0").val(); - valide0 = parseInt(valide0); - - if (valide0!=1) - { - v_msg="Veuillez procéder à la 1ère validation!"; - v_msgEng="Please proceed to the 1st validation!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - valideAs=$("#valideAs").val(); - valideAs = parseInt(valideAs); - - if (valideAs!=1) - { - v_msg="En attente de la validation de l\'assureur!"; - v_msgEng="Waiting for the validation of the insurer!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - montantDu=$("#montantDu").val(); - montantDu = parseInt(montantDu); - - if (montantDu<=0) - { - v_msg="Rien à valider, revoir le total de la facture!"; - v_msgEng="Nothing to validate, review the total bill!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - valide=$("#valide").val(); - valide = parseInt(valide); - - if (valide==0) - { - v_msg="Confirmez-vous la 2ème validation de cette facturation?"; - v_msgEng="Do you confirm the 2nd validation of this billing?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcregelement/validerdecompte/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - v_msg="2ème validation effectuée avec succès!"; - v_msgEng="2nd validation done successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() { - consulter_gc_reglement(); - } - }); - } - } -} - -function consulter_gc_reglement() -{ - window.location.assign($("#racineWeb" ).val()+"Gcreglementcons/"); -} - -function consulter_gc_reglement_id(idGcReglement) -{ - donnees = 'idGcReglement='+idGcReglement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextgcreglement/getcontextbyid/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Gcreglementcons/"); - } - }); -} - -function encaisser_gc() -{ - regle=$("#regle").val(); - - if (regle==1) - { - v_msg="Déjà encaissé!"; - v_msgEng="Already cashed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Encaissergc/"); -} - -function imprimer_detail_cartes_gc() -{ -} - - -function imprimer_detail_factures_gc() -{ -} - -function ajaxchangercompsantegcreglementcons() -{ - $("#detail_facture").html(''); - - codeComposante=$("#codeComposante").val(); - - if(codeComposante<=" ") - { - v_msg="Veuillez sélectionner une compsante!"; - v_msgEng="Please select a compsante!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeComposante").focus(); - return; - } - - donnees = 'codeComposante='+codeComposante; - - if(codeComposante=="SFACT") - { - v_url = $("#racineWeb").val()+"Ajaxfacturegccons/"; - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - } - }); - } - else - if(codeComposante=="CFACT") - { - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongccons/"; - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - } - }); - - } -} - -function enregistrer_encaissement_gc() -{ - codeModePaiement = $("#codeModePaiement").val(); - referencePaiement = $("#referencePaiement").val(); - - nomTireur = $("#nomTireur").val(); - banquePayeur = $("#banquePayeur").val(); - - montantDu = $("#montantDu").val(); - dateComptable = $("#dateComptable").val(); - - if (codeModePaiement<=" ") - { - v_msg="Veuillez sélectionner le mode de paiement!"; - v_msgEng="Please select the payment method!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModePaiement").focus(); - return; - } - - if (referencePaiement<=" ") - { - v_msg="Veuillez indiquer la référence du paiement!"; - v_msgEng="Please enter the payment reference!"; - alert_ebene(v_msg, v_msgEng); - - $("#referencePaiement").focus(); - return; - } - - if (nomTireur<=" ") - { - v_msg="Veuillez saisir le tireur!"; - v_msgEng="Please enter the issuer of the check! "; - alert_ebene(v_msg, v_msgEng); - - $("#nomTireur").focus(); - return; - } - - if (banquePayeur<=" ") - { - v_msg="Veuillez saisir la banque payeur!"; - v_msgEng="Please enter the paying bank!"; - alert_ebene(v_msg, v_msgEng); - - $("#banquePayeur").focus(); - return; - } - - if (dateComptable<=" ") - { - v_msg="Veuillez saisir la date comptable!"; - v_msgEng="Please enter the posting date!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateComptable").focus(); - return; - } - - if(montantDu<=" ") - { - montantDu = "0"; - } - - if(montantDu==0) - { - v_msg="Rien à régler!"; - v_msgEng="Nothing to pay!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cet encaissement?"; - v_msgEng="Do you confirm this receipt?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = 'codeModePaiement='+codeModePaiement+'&referencePaiement='+referencePaiement; - donnees += '&nomTireur='+nomTireur+'&banquePayeur='+banquePayeur; - donnees += '&montantDu='+montantDu+'&dateComptable='+dateComptable; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcregelement/enregistrerencaissementgc/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - consulter_gc_reglement(); - }, - complete: function() { - } - }); - } -} - -function imprimer_detail_facture_gc() -{ - $('#div_export_b').html(""); - $("#btn_pop_imprimer_detail_gc").click(); -} - -/* -function reinitialiser_emailgcassureur) -{ - emailgcassureur = $("#emailgcassureur_0").val(); - $("#emailgcassureur").val(emailgcassureur); -} -*/ - -function charger_detail_facture_gc_pdf() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfacturegcpdf/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function ctrlkeypress_liste_carte_gc(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_liste_carte_gc(); - } -} - -function afficher_liste_carte_gc() -{ - donnees = ""; - donnees_retour = ""; - - - numeroBeneficiaire = $("#numeroBeneficiaire_gc").val(); - numeroBeneficiaire = numeroBeneficiaire.trim(); - - donnees = 'numeroBeneficiaire=' + numeroBeneficiaire; - - $("#div_liste_carte_gc").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisterecherchecartegc/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_liste_carte_gc").html(donnees_retour); - } - }); -} - -function init_creer_carte_gc(idBeneficiaire) -{ - $("#idBeneficiaire_gc").val(idBeneficiaire); - - $("#btn_new_carte").click(); -} - -function creer_carte_gc() -{ - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - idBeneficiaire = $("#idBeneficiaire_gc").val(); - dateCarte = $("#dateCarte").val(); - - donnees = 'idBeneficiaire=' + idBeneficiaire+"&dateCarte="+dateCarte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisterecherchecartegc/creercarte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_carte").click(); - }, - complete: function() { - afficher_liste_carte_gc(); - } - }); - } -} - -function supprimer_carte_gc(idGcCarte, facture) -{ - if (facture==1) - { - v_msg="Carte déjà facturée!"; - v_msgEng="Card already billed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idGcCarte=' + idGcCarte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisterecherchecartegc/supprimercarte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_liste_carte_gc(); - } - }); - } -} - -function init_modif_carte_gc(idGcCarte, dateCarte, montantCarte, montantCarte_f, facture) -{ - if (facture==1) - { - v_msg="Carte déjà facturée!"; - v_msgEng="Card already billed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#idGcCarte_gc").val(idGcCarte); - $("#dateCarte_gc").val(dateCarte); - $("#montantCarte_gc").val(montantCarte); - $("#montantCarte_f").val(montantCarte_f); - - $("#btn_modif_carte").click(); -} - -function modifier_carte_gc() -{ - v_msg="Confirmez-vous cette modification?"; - v_msgEng="Do you confirm this change?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - idGcCarte = $("#idGcCarte_gc").val(); - dateCarte = $("#dateCarte_gc").val(); - montantCarte = $("#montantCarte_gc").val(); - - donnees = 'idGcCarte='+idGcCarte+"&dateCarte="+dateCarte+"&montantCarte="+montantCarte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisterecherchecartegc/modifiercarte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_modif_carte").click(); - }, - complete: function() { - afficher_liste_carte_gc(); - } - }); - } -} - -function charger_detail_carte_gc_pdf() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailcartegcpdf/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function charger_detail_tous_gc_pdf() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailtousgcpdf/", - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -// - -function selectionner_tous_compte() -{ - v_msg="Validation des factures non traitées. Confirmez-vous cette opération?"; - v_msgEng="Validation of unprocessed invoices. Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/validertouteslesfacturesdecompte/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - afficherdecompte(); - }, - complete: function() { - } - }); - } -} - -function charger_detail_facture_gc_xls() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfacturegcxls/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function charger_detail_carte_gc_xls() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailcartegcxls/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - - -function charger_detail_tous_gc_xls() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailtousgcxls/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function imprimer_recu_gc() -{ - regle=$("#regle").val(); - - if (regle!=1) - { - v_msg="Pas encore encaissé!"; - v_msgEng="Not yet cashed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrecugc/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function cartes_beneficiaire() -{ - window.location.assign($("#racineWeb" ).val()+"Cartesbenficiaire/"); -} - -function afficher_liste_carte_beneficiaire() -{ - donnees_retour = ""; - - $("#div_liste_carte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisterecherchecartebeneficiaire/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_liste_carte").html(donnees_retour); - } - }); -} - -function init_modif_carte_beneficiaire(idBeneficiaireCarte, dateCarte, montantCarte, montantCarte_f, facture) -{ - if (facture==1) - { - v_msg="Carte déjà facturée!"; - v_msgEng="Card already billed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#idBeneficiaireCarte").val(idBeneficiaireCarte); - $("#dateCarteModif").val(dateCarte); - $("#montantCarteModif").val(montantCarte); - $("#montantCarte_f").val(montantCarte_f); - - $("#btn_modif_carte").click(); -} - -// maintenant - -function init_creer_carte() -{ - $("#btn_new_carte").click(); -} - -function creer_carte() -{ - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - montantCarte = $("#montantCarteNew").val(); - dateCarte = $("#dateCarteNew").val(); - - donnees = 'dateCarte='+dateCarte+"&montantCarte="+montantCarte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisterecherchecartebeneficiaire/creercarte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_carte").click(); - }, - complete: function() { - afficher_liste_carte_beneficiaire(); - } - }); - } -} - -function supprimer_carte(idBeneficiaireCarte, facture) -{ - if (facture==1) - { - v_msg="Carte déjà facturée!"; - v_msgEng="Card already billed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idBeneficiaireCarte=' + idBeneficiaireCarte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisterecherchecartebeneficiaire/supprimercarte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_liste_carte_beneficiaire(); - } - }); - } -} - -function modifier_carte_beneficiaire() -{ - v_msg="Confirmez-vous cette modification?"; - v_msgEng="Do you confirm this change?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - idBeneficiaireCarte = $("#idBeneficiaireCarte").val(); - dateCarte = $("#dateCarteModif").val(); - montantCarte = $("#montantCarteModif").val(); - - donnees = 'idBeneficiaireCarte='+idBeneficiaireCarte+"&dateCarte="+dateCarte+"&montantCarte="+montantCarte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisterecherchecartebeneficiaire/modifiercarte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#btn_close_pop_modif_carte").click(); - }, - complete: function() { - afficher_liste_carte_beneficiaire(); - } - }); - } -} - -function maj_champ_application_plafond(idGarantie, choix) -{ - donnees = 'idGarantie='+idGarantie+'&choix='+choix; - - v_msg = "Vous venez de conformer que cette limite est par tête!"; - v_msgEng="You just complied that this limit is per head!"; - - if(choix=="0") - { - v_msg = "Vous venez de conformer que cette limite est par famille!"; - v_msgEng="You have just complied that this limit is per family!"; - } - - v_url = $("#racineWeb").val()+"Ajaxgarantiescollege/majchampapplicationplafond/"; - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(errordata) { - }, - complete: function() { - alert_ebene(v_msg, v_msgEng); - } - }); -} - -function requetes_factures_accident() -{ - $('#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(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_accident_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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 init_imprimer_demande_decompte() -{ - regle=$("#regle").val(); - regle = parseInt(regle); - - if (regle==0) - { - v_msg="Veuillez procéder à la 1ère validation!"; - v_msgEng="Please proceed to the 1st validation!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - if (regle==2) - { - v_msg="En attente de la validation du prestataire!"; - v_msgEng="Waiting for the validation of the provider!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#montantApayer").val()<="0") - { - v_msg="Rien à payer!"; - v_msgEng="Nothing to pay!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - demandeReglement=$("#demandeReglement").val(); - demandeReglement = parseInt(demandeReglement); - - if (regle==1) - { - v_msg="Déjà réglé!"; - v_msgEng="Already paid!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $('#div_export_demande_reglement').html(''); - - $("#btn_demande_reglement").click(); -} - - -function imprimer_demande_reglement() -{ - - codePrestataire = $("#codePrestataire").val(); - a_enreg = $("#a_enreg").val(); - - codeBanque = $("#codeBanque").val(); - numeroCompteBancaire = $("#numeroCompteBancaire").val(); - intituleCompteBancaire = $("#intituleCompteBancaire").val(); - - if (codeBanque<=" ") - { - v_msg="Veuillez sélectionner une banque!"; - v_msgEng="Please select a bank!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeBanque").focus(); - - return; - } - - if (numeroCompteBancaire<=" ") - { - v_msg="Veuillez indiquer le No de compte bancaire!";; - v_msgEng="Please enter the bank account No"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroCompteBancaire").focus(); - return; - } - - if (intituleCompteBancaire<=" ") - { - v_msg="Veuillez indiquer intitulé du compte!"; - v_msgEng="Please enter the owner of the account!"; - alert_ebene(v_msg, v_msgEng); - - $("#intituleCompteBancaire").focus(); - return; - } - - idReglement = $("#idReglement").val(); - if (idReglement>"0") - { - var div_export_demande_reglement = $('#div_export_demande_reglement'); - div_export_demande_reglement.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - if (a_enreg=="1") - { - codePrestataire = $("#codePrestataire").val(); - codeBanque = $("#codeBanque").val(); - codeBanqueInterne = $("#codeBanqueInterne").val(); - codeGuichet = $("#codeGuichet").val(); - numeroCompteBancaire = $("#numeroCompteBancaire").val(); - cleRib = $("#cleRib").val(); - iban = $("#iban").val(); - intituleCompteBancaire = $("#intituleCompteBancaire").val(); - - donnees = 'codePrestataire='+codePrestataire; - donnees += '&codeBanque='+codeBanque+'&codeBanqueInterne='+codeBanqueInterne+'&codeGuichet='+codeGuichet; - donnees += '&numeroCompteBancaire='+numeroCompteBancaire+'&cleRib='+cleRib+'&iban='+iban+'&intituleCompteBancaire='+intituleCompteBancaire ; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/majcomptebancaire/", - type : 'post', - data: donnees, - success: function(data) - { - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/", - type: 'POST', - success: function(data) - { - div_export_demande_reglement.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } - }); - - } - else - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/", - type: 'POST', - success: function(data) - { - div_export_demande_reglement.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } - } -} - -function novalidprestataire() -{ -/* -0 Décompte en cours - -2 Attente Valid. prestat. / Waiting for provider s valid. - -3 Validé par le prestataire - -8 Pas besoin de valid prestat / Provid valid not needed - -9 En attente de règelment - -1 Réglé / Payé -*/ - - regle=$("#regle").val(); - regle = parseInt(regle); - - if (regle==0) - { - v_msg="Veuillez procéder à la 1ère validation!"; - v_msgEng="Please proceed to the 1st validation!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==3) - { - v_msg="Déjà validé par le prestataire!"; - v_msgEng="Already validated by the provider!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==8) - { - v_msg="Déjà effectué!"; - v_msgEng="Already done!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#montantApayer").val()<="0") - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to validate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==2) - { - v_msg="Confirmez-vous que la validation du prestataire n\'est pas nécessaire?"; - v_msgEng="Do you confirm that provider validation is not necessary?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/novalidprestataire/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - v_msg="Validation terminée avec succès!"; - v_msgEng="Validation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - afficherdecompte(); - } - }); - } - } -} - -function listerdecomptes() -{ - codePrestataire = $("#codePrestataire").val(); - - codeExercice1 = $("#codeExercice1").val(); - codeMois1 = $("#codeMois1").val(); - - codeExercice2 = $("#codeExercice2").val(); - codeMois2 = $("#codeMois2").val(); - - codeEtatDecompte = $("#codeEtatDecompte").val(); - - if (codeMois1<=" ") - { - v_msg="Veuillez sélectionner le mois de départ!"; - v_msgEng="Please select the month of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois1").focus(); - return; - } - - if (codeExercice1<=" ") - { - v_msg="Veuillez sélectionner exercice de départ!"; - v_msgEng="Please select the exercise of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice1").focus(); - return; - } - - if (codeMois2<=" ") - { - v_msg="Veuillez sélectionner le mois de fin!"; - v_msgEng="Please select the month of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois2").focus(); - return; - } - - if (codeExercice2<=" ") - { - v_msg="Veuillez sélectionner exercice de fin!"; - v_msgEng="Please select the exercise of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice2").focus(); - return; - } - - codePerdiode1 = codeExercice1+codeMois1; - - codePerdiode2 = codeExercice2+codeMois2; - - donnees = 'codePrestataire='+codePrestataire+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2+'&codeEtatDecompte='+codeEtatDecompte; - - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistedecomptes/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail").html(data); - }, - complete: function() { - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - - -function listerdecomptes_export() -{ - codePrestataire = $("#codePrestataire").val(); - - codeExercice1 = $("#codeExercice1").val(); - codeMois1 = $("#codeMois1").val(); - - codeExercice2 = $("#codeExercice2").val(); - codeMois2 = $("#codeMois2").val(); - - codeEtatDecompte = $("#codeEtatDecompte").val(); - - if (codeMois1<=" ") - { - v_msg="Veuillez sélectionner le mois de départ!"; - v_msgEng="Please select the month of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois1").focus(); - return; - } - - if (codeExercice1<=" ") - { - v_msg="Veuillez sélectionner exercice de départ!"; - v_msgEng="Please select the exercise of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice1").focus(); - return; - } - - if (codeMois2<=" ") - { - v_msg="Veuillez sélectionner le mois de fin!"; - v_msgEng="Please select the month of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois2").focus(); - return; - } - - if (codeExercice2<=" ") - { - v_msg="Veuillez sélectionner exercice de fin!"; - v_msgEng="Please select the exercise of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice2").focus(); - return; - } - - codePerdiode1 = codeExercice1+codeMois1; - - codePerdiode2 = codeExercice2+codeMois2; - - donnees = 'codePrestataire='+codePrestataire+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2+'&codeEtatDecompte='+codeEtatDecompte; - - var div_export = $('#div_detail'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxlistedecomptesexport/"; - - $.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 maj_reception_facture_decompte() -{ - dateReception = $("#dateReception_pop").val(); - montantPrestataire = $("#montantPrestataire_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); - - $("#dateReception_pop").focus(); - return; - } - - if (montantPrestataire<=" ") - { - montantPrestataire = "0"; - } - - montantPrestataire = montantPrestataire.replace(" ", ""); - montantPrestataire = parseInt(montantPrestataire); - - if (montantPrestataire=="0") - { - v_msg="Veuillez indicquer le montant de la facture du prestataire!"; - v_msgEng="Please enter the invoice amount of the service provider!"; - alert_ebene(v_msg, v_msgEng); - - $("#montantPrestataire_pop").focus(); - return; - } - - donnees = 'dateReception='+dateReception+'&montantPrestataire='+montantPrestataire; - - v_msg="Confirmez-vous ces informations?"; - v_msgEng="Do you confirm this information?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/majreceptionfactureprestataire/", - type: 'POST', - data: donnees, - success: function(data) { - $("#btn_close_pop_reception").click(); - }, - error: function(erreur) { - }, - complete: function() { - - dateReception = $("#dateReception_pop").val(); - - $("#dateReception").val(dateReception+" / "+montantPrestataire); - $("#btn_dateReception").val(dateReception+" / "+montantPrestataire); - - v_msg="Opération effectuée avec succès!"; - v_msgEng="Operation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - re_afficherdecompte(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -// - - -function imprimer_lite_prestataire() -{ - donnees = ""; - donnees_retour = ""; - - - codeTypePrestataire = $("#codeTypePrestataire").val(); - codeReseau = $("#codeReseau").val(); - libelle = $("#libelle").val(); - - donnees += 'codeTypePrestataire=' + codeTypePrestataire; - donnees += '&codeReseau=' + codeReseau; - donnees += '&libelle=' + libelle; - - $("#div_liste_prestataire").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdlisteprestataireparametrage/", - type: 'POST', - data: donnees, - success: function(data) - { - $("#div_liste_prestataire").html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - - -function exporter_lite_prestataire() -{ - donnees = ""; - donnees_retour = ""; - - - codeTypePrestataire = $("#codeTypePrestataire").val(); - codeReseau = $("#codeReseau").val(); - libelle = $("#libelle").val(); - - donnees += 'codeTypePrestataire=' + codeTypePrestataire; - donnees += '&codeReseau=' + codeReseau; - donnees += '&libelle=' + libelle; - - $("#div_liste_prestataire").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdlisteprestataireparametrageexport/", - type: 'POST', - data: donnees, - success: function(data) - { - $("#div_liste_prestataire").html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function exporter_lite_prestataire_actif() -{ - /* - donnees = ""; - donnees_retour = ""; - - - codeTypePrestataire = $("#codeTypePrestataire").val(); - codeReseau = $("#codeReseau").val(); - libelle = $("#libelle").val(); - - donnees += 'codeTypePrestataire=' + codeTypePrestataire; - donnees += '&codeReseau=' + codeReseau; - donnees += '&libelle=' + libelle; -*/ - - donnees = ""; - donnees_retour = ""; - - - codeTypePrestataire = $("#codeTypePrestataire").val(); - codeReseau = $("#codeReseau").val(); - libelle = $("#libelle").val(); - - codePays = $("#codePays").val(); - codeVille = $("#codeVille").val(); - codeLocalite = $("#codeLocalite").val(); - - donnees += 'codeTypePrestataire=' + codeTypePrestataire; - donnees += '&codeReseau=' + codeReseau; - donnees += '&libelle=' + libelle; - - donnees += '&codePays=' + codePays; - donnees += '&codeVille=' + codeVille; - donnees += '&codeLocalite=' + codeLocalite; - - // alert(donnees); - // return; - - $("#div_liste_prestataire").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdlisteprestataireparametrageexport/actif/", - type: 'POST', - data: donnees, - success: function(data) - { - $("#div_liste_prestataire").html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function creer_prestataire() -{ - idPrestataire = $("#idPrestataire").val(); - libelle = $("#libelle").val(); - codeTypePrestataire = $("#codeTypePrestataire").val(); - codeReseau = $("#codeReseau").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(); - - // 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(); - - 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(codeReseau<=" ") - { - v_msg="Veuillez indiquer le réseau!"; - v_msgEng="Please indicate the care network!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeReseau").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 (codeTypePrestataire=="CSO" || 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(codePays<=" ") - { - v_msg="Veuillez indiquer le pays!"; - v_msgEng="Please indicate the country!"; - alert_ebene(v_msg, v_msgEng); - - $("#codePays").focus(); - return; - } - - if (codeVille<=" ") - { - v_msg="Veuillez préciser la localisation!"; - v_msgEng="Please specify the location!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeVille").focus(); - return; - } - - if (codeLocalite<=" ") - { - v_msg="Veuillez préciser la localisation!"; - v_msgEng="Please specify the location!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLocalite").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 = 'libelle='+libelle+'&codeTypePrestataire='+codeTypePrestataire; - donnees += '&codeReseau='+codeReseau+'&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; - - v_msg="Confirmez-vous ce nouveau prestataire?"; - v_msgEng="Do you confirm this new provider?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestataire/creerprestataire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $('#div_idPrestataire').html(data); - }, - complete: function() - { - idPrestataire = $("#idPrestataire").val(); - - afficher_prestataire_id(idPrestataire); - } - }); - } -} - -function param_prestataire() -{ - window.location.assign($("#racineWeb" ).val()+"Prestataires/"); -} - -function creer_user_prestataire() -{ - nom = $("#nom").val(); - prenoms = $("#prenoms").val(); - telephone = $("#telephone").val(); - email = $("#email").val(); - - codeLangue = $("#codeLangueUser").val(); - actVisible = $("#actVisibleUser").val(); - AffectionVisible = $("#AffectionVisible").val(); - - nvmdp = $("#nvmdp").val(); - cfnvmdp = $("#cfnvmdp").val(); - - if(nom<=" ") - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#nom").focus(); - return; - } - - if(codeLangue<=" ") - { - v_msg="Veuillez indiquer la langue!"; - v_msgEng="Please select the language"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLangueUser").focus(); - return; - } - - if (actVisible<=" ") - { - v_msg="Actes visbles oui ou non?"; - v_msgEng="Acts are visible yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#actVisibleUser").focus(); - return; - } - - if (AffectionVisible<=" ") - { - v_msg="Affections visbles oui ou non?"; - v_msgEng="Affections are visible yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#AffectionVisible").focus(); - return; - } - - if(nvmdp<=" ") - { - v_msg="Veuillez indiquer le mot de passe!"; - v_msgEng="Please enter the password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return; - } - - if(nvmdp != cfnvmdp) - { - v_msg="Veuillez confirmer votre mot de passe!"; - v_msgEng="Please confirm your password!"; - alert_ebene(v_msg, v_msgEng); - - $("#cfnvmdp").focus(); - return; - } - - motPass = nvmdp; - - donnees = 'nom='+nom+'&prenoms='+prenoms; - donnees += '&telephone='+telephone+'&email='+email+'&motPass='+motPass; - - donnees += '&codeLangue='+codeLangue+'&actVisible='+actVisible+'&AffectionVisible='+AffectionVisible; - - v_msg="Confirmez-vous ce nouvel utilisateur?"; - v_msgEng="Do you confirm this new user?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestataire/creeruserprestataire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - users_prestataire(); - } - }); - } -} - -function controle_new_pass() -{ - if ($("#nvmdp" ).val()<=' ') - { - v_msg="Veuillez saisir un mot de passe!"; - v_msgEng="Please enter a password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - longueur = $("#nvmdp").val().length; - - if(longueur>0 && longueur<6) - { - v_msg="6 caractères minimum exigé!"; - v_msgEng="6 characters minmum required!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } - - if ($("#cfnvmdp" ).val()!=$("#nvmdp" ).val()) - { - v_msg="Veuillez confirmer votre mot de passe!"; - v_msgEng="Please confirm your password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return false; - } -} - -// - -function desactiver_prestataire(codePrestataire) -{ - v_msg="Confirmez-vous la désactivation?"; - v_msgEng="Do you confirm the deactivation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codePrestataire="+codePrestataire; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestataire/desactiverprestataire/", - 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); - - retour_prestataire_id(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function activer_prestataire(codePrestataire) -{ - v_msg="Confirmez-vous l\'activation?"; - v_msgEng="Do you confirm the activation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codePrestataire="+codePrestataire; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestataire/activerprestataire/", - 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); - - retour_prestataire_id(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function demander_reglement() -{ - regle=$("#regle").val(); - regle = parseInt(regle); - - demandeReglement=$("#demandeReglement").val(); - demandeReglement = parseInt(demandeReglement); - - if (demandeReglement==1) - { - v_msg="Demande déjà effectuée!"; - v_msgEng="Request already made!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (regle==1) - { - v_msg="Déjà réglé!"; - v_msgEng="Already paid!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous la demande de règlement?"; - v_msgEng="Do you confirm the request of payment?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/demanderreglement/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - consulterdecompte(); - }, - complete: function() { - } - }); - } -} - -function demandesreglement() -{ - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxldemandesteglement/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_detail").html(data); - }, - complete: function() { - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function demandesreglement_export() -{ - $('#div_detail').html(""); - - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxldemandesteglementexport/"; - - $.ajax({ - url: v_url, - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -// - -function initierdecompte_liste(codePrestataire, codeExercice, codeMois) -{ - donnees = 'codePrestataire='+codePrestataire+'&codeExercice='+codeExercice+'&codeMois='+codeMois; - - $.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 || regle==8) - { - afficherdecompte(); - } - else - { - // 9 => Décompte validé mais en attente de règlemen - // 1 => Décompte réglé - consulterdecompte(); - } - } - }); -} - -function releve_compte_prestataire() -{ - codePrestataire = $("#codePrestataire").val(); - - if (codePrestataire>" ") - { - window.location.assign($("#racineWeb" ).val()+"Relevecompteprestaire/"); - } -} - -function detail_releve_compte_prestataire() -{ - codePrestataire = $("#codePrestataire").val(); - - codeExercice1 = $("#codeExercice1").val(); - codeMois1 = $("#codeMois1").val(); - - codeExercice2 = $("#codeExercice2").val(); - codeMois2 = $("#codeMois2").val(); - - if (codeMois1<=" ") - { - v_msg="Veuillez sélectionner le mois de départ!"; - v_msgEng="Please select the month of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois1").focus(); - return; - } - - if (codeExercice1<=" ") - { - v_msg="Veuillez sélectionner exercice de départ!"; - v_msgEng="Please select the exercise of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice1").focus(); - return; - } - - if (codeMois2<=" ") - { - v_msg="Veuillez sélectionner le mois de fin!"; - v_msgEng="Please select the month of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois2").focus(); - return; - } - - if (codeExercice2<=" ") - { - v_msg="Veuillez sélectionner exercice de fin!"; - v_msgEng="Please select the exercise of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice2").focus(); - return; - } - - codePerdiode1 = codeExercice1+codeMois1; - - codePerdiode2 = codeExercice2+codeMois2; - - donnees = 'codePrestataire='+codePrestataire+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2; - - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrelevecompteprestaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail").html(data); - }, - complete: function() { - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function detail_releve_compte_prestataire_export() -{ - codePrestataire = $("#codePrestataire").val(); - - codeExercice1 = $("#codeExercice1").val(); - codeMois1 = $("#codeMois1").val(); - - codeExercice2 = $("#codeExercice2").val(); - codeMois2 = $("#codeMois2").val(); - - if (codeMois1<=" ") - { - v_msg="Veuillez sélectionner le mois de départ!"; - v_msgEng="Please select the month of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois1").focus(); - return; - } - - if (codeExercice1<=" ") - { - v_msg="Veuillez sélectionner exercice de départ!"; - v_msgEng="Please select the exercise of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice1").focus(); - return; - } - - if (codeMois2<=" ") - { - v_msg="Veuillez sélectionner le mois de fin!"; - v_msgEng="Please select the month of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois2").focus(); - return; - } - - if (codeExercice2<=" ") - { - v_msg="Veuillez sélectionner exercice de fin!"; - v_msgEng="Please select the exercise of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice2").focus(); - return; - } - - codePerdiode1 = codeExercice1+codeMois1; - - codePerdiode2 = codeExercice2+codeMois2; - - donnees = 'codePrestataire='+codePrestataire+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2; - - var div_export = $('#div_detail'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxrelevecompteprestaireexport/"; - - $.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 detail_releve_compte_prestataire_global() -{ - codePrestataire = $("#codePrestataire").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; - } - - detail_releve_compte_prestataire(); -} - -function detail_releve_compte_prestataire_export_global() -{ - codePrestataire = $("#codePrestataire").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; - } - - detail_releve_compte_prestataire_export(); -} - -function imprimer_demande_reglement_ff() -{ - fraisFuneraireDemande=$("#fraisFuneraireDemande_C").val(); - fraisFunerairePaye=$("#fraisFunerairePaye_C").val(); - - if (fraisFuneraireDemande!=1) - { - v_msg="Aucune demande en cours!"; - v_msgEng="No request in progress!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - demandeReglement=$("#demandeReglement").val(); - demandeReglement = parseInt(demandeReglement); - - if (fraisFunerairePaye==1) - { - v_msg="Déjà payé!"; - v_msgEng="Already paid!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - var div_export_demande_reglement = $('#div_export_demande_reglement'); - div_export_demande_reglement.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglementff/", - type: 'POST', - success: function(data) - { - div_export_demande_reglement.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function imprimer_releve_ff() -{ - fraisFuneraireDemande=$("#fraisFuneraireDemande_C").val(); - fraisFunerairePaye=$("#fraisFunerairePaye_C").val(); - - if (fraisFuneraireDemande!=1) - { - v_msg="Aucune demande en cours!"; - v_msgEng="No request in progress!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - var div_export_demande_reglement = $('#div_export_demande_reglement'); - div_export_demande_reglement.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglementff/imprimerreleve/", - type: 'POST', - success: function(data) - { - div_export_demande_reglement.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function enregistrer_dossier_classique() -{ - enVigueur=$("#enVigueur_C").val(); - codeEtatBeneficiaire=$("#codeEtatBeneficiaire_C").val(); - etatbeneficiaire=$("#etatbeneficiaire_C").val(); - - if (enVigueur!="1") - { - v_msg="Attention! cette personne n'est pas en vigueur"; - v_msgEng="Warning! This person is not in force"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (codeEtatBeneficiaire!="V") - { - v_msg="Attention! "+etatbeneficiaire; - v_msgEng="Warning! "+etatbeneficiaire; - alert_ebene(v_msg, v_msgEng); - - return; - } - - demandeur = $("#demandeur").val(); - codeLienDemandeur = $("#codeLienDemandeur").val(); - - beneficiaireReglement = $("#beneficiaireReglement").val(); - codeLienBeneficiaire = $("#codeLienBeneficiaire").val(); - - observations = $("#observations").val(); - - codeModePaiementDemande = $("#codeModePaiementDemande").val(); - codeBanqueBeneficiaire = $("#codeBanqueBeneficiaire").val(); - numeroCompteBeneficiaire = $("#numeroCompteBeneficiaire").val(); - - - if (demandeur<=" ") - { - v_msg="Veuillez saisir le nom du demandeur!"; - v_msgEng="Please enter the name of the payment requestor"; - alert_ebene(v_msg, v_msgEng); - - $("#demandeur").focus(); - return; - } - - if (codeLienDemandeur<=" ") - { - v_msg="Veuillez sélectionner le lien de parenté avec le demandeur!"; - v_msgEng="Please select the relationship with the requestor!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLienDemandeur").focus(); - return; - } - - prestataireConsultation = $("#prestataireConsultation").val(); - - if (prestataireConsultation<=" ") - { - v_msg="Veuillez indiquer le prestataire qui a consulté!"; - v_msgEng="Please indicate the provider who consulted!"; - alert_ebene(v_msg, v_msgEng); - - $("#prestataireConsultation").focus(); - return; - } - - dateConsultation=$("#dateConsultation").val(); - - if (dateConsultation<=" ") - { - v_msg="Veuillez saisir la date de la facture!"; - v_msgEng="Please enter the date of the invoice!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateConsultation").focus(); - return; - } - - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - - if (codeRaisonConsultation<=" ") - { - v_msg="Veuillez sélectionner une raison pour la consultation!"; - v_msgEng="Please select a reason for the consultation!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRaisonConsultation").focus(); - return; - } - - hospitalisation = $("#hospitalisation").val(); - if (hospitalisation<=" ") - { - v_msg="Veuillez indiquer si hospitalisation ou pas!"; - v_msgEng="Please indicate whether hospitalization or not!"; - alert_ebene(v_msg, v_msgEng); - - $("#hospitalisation").focus(); - return; - } - - if (beneficiaireReglement<=" ") - { - v_msg="Veuillez saisir le nom du bénéficiaire du règlement!"; - v_msgEng="Please enter the name of the payee!"; - alert_ebene(v_msg, v_msgEng); - - $("#beneficiaireReglement").focus(); - return; - } - - if (codeLienBeneficiaire<=" ") - { - v_msg="Veuillez sélectionner le lien avec le bénéficiaire du règlement!"; - v_msgEng="Please select the relationship with the payee!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLienBeneficiaire").focus(); - return; - } - - if (codeModePaiementDemande<=" ") - { - v_msg="Veuillez sélectionner le mode de paiement!"; - v_msgEng="Please select the payment method!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModePaiementDemande").focus(); - return; - } - - if (codeModePaiementDemande=="VR") - { - if (codeBanqueBeneficiaire<=" ") - { - v_msg="Veuillez sélectionner la banque du bénéficiaire!"; - v_msgEng="Please select the beneficiary\'s bank!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeBanqueBeneficiaire").focus(); - return; - } - - if (numeroCompteBeneficiaire<=" ") - { - v_msg="Veuillez saisir le No de compte du bénéficiaire!"; - v_msgEng="Please enter the beneficiary\'s account number"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroCompteBeneficiaire").focus(); - return; - } - } - - dateEffetPolice = $("#dateEffetPolice_C").val(); - dateEcheancePolice = $("#dateEcheancePolice_C").val(); - - // var td0 = new Date(dateEffetPolice); - dateEntreeBeneficiaire= $("#dateEntreeBeneficiaire_C").val(); - var td0 = new Date(dateEntreeBeneficiaire); - var td1 = $("#dateConsultation").datepicker("getDate"); - var td2 = $("#datejourfr_C").datepicker("getDate"); - var td3 = new Date(dateEcheancePolice); - - 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)); - - if (dt1>dt2) - { - v_msg="Veuillez revoir la date de consultation!"; - v_msgEng="Please review the date!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateConsultation").focus(); - return; - } - - if (dt1>dt3 || dt1dt3) - { - v_msg="Attention! cette police n'est pas couverte à cette date!"; - v_msgEng="Warning! This insurance policy is not valid on this date!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ce dossier hors tiers payant?"; - v_msgEng="Do you confirm this claim?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'demandeur='+demandeur+'&codeLienDemandeur='+codeLienDemandeur; - donnees += '&beneficiaireReglement='+beneficiaireReglement+'&codeLienBeneficiaire='+codeLienBeneficiaire; - - donnees += '&codeModePaiementDemande='+codeModePaiementDemande; - donnees += '&codeBanqueBeneficiaire='+codeBanqueBeneficiaire+'&numeroCompteBeneficiaire='+numeroCompteBeneficiaire; - - donnees += '&prestataireConsultation=' +prestataireConsultation; - donnees += '&dateConsultation=' +dateConsultation; - donnees += '&codeRaisonConsultation=' +codeRaisonConsultation; - donnees += '&hospitalisation=' +hospitalisation; - donnees += '&observations=' +observations; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdossierclassique/enregistrerdossierclassique/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - v_msg="Opération effectuée avec succès!"; - v_msgEng="Operation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - }, - complete: function() { - afficher_dossier_classique(); - } - }); - } -} - -function lister_dossiers_classiques() -{ - d1=$("#d1").val(); - d2=$("#d2").val(); - - donnees = 'd1='+d1+'&d2='+d2; - - $("#div_dossiers").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturesclassiques/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_dossiers").html(data); - }, - complete: function() { - } - }); -} - -function afficher_dossier_classique() -{ - window.location.assign($("#racineWeb" ).val()+"Dossierclassique/"); -} - -function consulter_dossier_classique(idDossierClassique) -{ - donnees = 'idDossierClassique='+idDossierClassique; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdossierclassique/getcontextbyid/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - complete: function() { - afficher_dossier_classique(); - } - }); -} - -function payerdossierclassique() -{ - regle=$("#regle").val(); - - if (regle==1) - { - v_msg="Déjà payé!"; - v_msgEng="Already paid!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - fraisRetenu=$("#fraisRetenu").val(); - if (fraisRetenu<=0) - { - v_msg="Rien à payer!"; - v_msgEng="Nothing to pay!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - demandeReglement=$("#demandeReglement").val(); - demandeReglement = parseInt(demandeReglement); - - if (demandeReglement==0) - { - v_msg="Aucune Demande de Règlement!"; - v_msgEng="No request in progress!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Payerdossierclassique/"); -} - -function modifierdossierclassique() -{ - 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; - } - - window.location.assign($("#racineWeb" ).val()+"Modifierdossierclassique/"); -} - -function imprimer_releve_dc() -{ - fraisRetenu=$("#fraisRetenu").val(); - - if (fraisRetenu<=0) - { - v_msg="Rien à imprimer!"; - v_msgEng="Nothing to print!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - var div_export_demande_reglement = $('#div_export_demande_reglement'); - div_export_demande_reglement.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglementdc/imprimerreleve/", - type: 'POST', - success: function(data) - { - div_export_demande_reglement.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function imprimer_demande_reglement_dc() -{ - regle=$("#regle").val(); - if (regle==1) - { - v_msg="Déjà payé!"; - v_msgEng="Already paid!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - fraisRetenu=$("#fraisRetenu").val(); - - if (fraisRetenu<=0) - { - v_msg="Rien à imprimer!"; - v_msgEng="Nothing to print!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - var div_export_demande_reglement = $('#div_export_demande_reglement'); - div_export_demande_reglement.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglementdc/", - type: 'POST', - success: function(data) - { - div_export_demande_reglement.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function enregistrermodificationsdossierclassique() -{ - enVigueur=$("#enVigueur_C").val(); - codeEtatBeneficiaire=$("#codeEtatBeneficiaire_C").val(); - etatbeneficiaire=$("#etatbeneficiaire_C").val(); - - if (enVigueur!="1") - { - v_msg="Attention! cette personne n'est pas en vigueur"; - v_msgEng="Warning! This person is not in force"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (codeEtatBeneficiaire!="V") - { - v_msg="Attention! "+etatbeneficiaire; - v_msgEng="Warning! "+etatbeneficiaire; - alert_ebene(v_msg, v_msgEng); - - return; - } - - demandeur = $("#demandeur").val(); - codeLienDemandeur = $("#codeLienDemandeur").val(); - - beneficiaireReglement = $("#beneficiaireReglement").val(); - codeLienBeneficiaire = $("#codeLienBeneficiaire").val(); - - observations = $("#observations").val(); - - codeModePaiementDemande = $("#codeModePaiementDemande").val(); - codeBanqueBeneficiaire = $("#codeBanqueBeneficiaire").val(); - numeroCompteBeneficiaire = $("#numeroCompteBeneficiaire").val(); - - - if (demandeur<=" ") - { - v_msg="Veuillez saisir le nom du demandeur!"; - v_msgEng="Please enter the name of the payment requestor"; - alert_ebene(v_msg, v_msgEng); - - $("#demandeur").focus(); - return; - } - - if (codeLienDemandeur<=" ") - { - v_msg="Veuillez sélectionner le lien de parenté avec le demandeur!"; - v_msgEng="Please select the relationship with the requestor!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLienDemandeur").focus(); - return; - } - - prestataireConsultation = $("#prestataireConsultation").val(); - - if (prestataireConsultation<=" ") - { - v_msg="Veuillez indiquer le prestataire qui a consulté!"; - v_msgEng="Please indicate the provider who consulted!"; - alert_ebene(v_msg, v_msgEng); - - $("#prestataireConsultation").focus(); - return; - } - - dateConsultation=$("#dateConsultation").val(); - - if (dateConsultation<=" ") - { - v_msg="Veuillez saisir la date de la facture!"; - v_msgEng="Please enter the date of the invoice!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateConsultation").focus(); - return; - } - - codeRaisonConsultation = $("#codeRaisonConsultation").val(); - - if (codeRaisonConsultation<=" ") - { - v_msg="Veuillez sélectionner une raison pour la consultation!"; - v_msgEng="Please select a reason for the consultation!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeRaisonConsultation").focus(); - return; - } - - hospitalisation = $("#hospitalisation").val(); - if (hospitalisation<=" ") - { - v_msg="Veuillez indiquer si hospitalisation ou pas!"; - v_msgEng="Please indicate whether hospitalization or not!"; - alert_ebene(v_msg, v_msgEng); - - $("#hospitalisation").focus(); - return; - } - - if (beneficiaireReglement<=" ") - { - v_msg="Veuillez saisir le nom du bénéficiaire du règlement!"; - v_msgEng="Please enter the name of the payee!"; - alert_ebene(v_msg, v_msgEng); - - $("#beneficiaireReglement").focus(); - return; - } - - if (codeLienBeneficiaire<=" ") - { - v_msg="Veuillez sélectionner le lien avec le bénéficiaire du règlement!"; - v_msgEng="Please select the relationship with the payee!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLienBeneficiaire").focus(); - return; - } - - if (codeModePaiementDemande<=" ") - { - v_msg="Veuillez sélectionner le mode de paiement!"; - v_msgEng="Please select the payment method!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModePaiementDemande").focus(); - return; - } - - if (codeModePaiementDemande=="VR") - { - if (codeBanqueBeneficiaire<=" ") - { - v_msg="Veuillez sélectionner la banque du bénéficiaire!"; - v_msgEng="Please select the beneficiary\'s bank!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeBanqueBeneficiaire").focus(); - return; - } - - if (numeroCompteBeneficiaire<=" ") - { - v_msg="Veuillez saisir le No de compte du bénéficiaire!"; - v_msgEng="Please enter the beneficiary\'s account number"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroCompteBeneficiaire").focus(); - return; - } - } - - dateEffetPolice = $("#dateEffetPolice_C").val(); - dateEcheancePolice = $("#dateEcheancePolice_C").val(); - - // var td0 = new Date(dateEffetPolice); - dateEntreeBeneficiaire= $("#dateEntreeBeneficiaire_C").val(); - var td0 = new Date(dateEntreeBeneficiaire); - - var td1 = $("#dateConsultation").datepicker("getDate"); - var td2 = $("#datejourfr_C").datepicker("getDate"); - var td3 = new Date(dateEcheancePolice); - - 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)); - - if (dt1>dt2) - { - v_msg="Veuillez revoir la date de consultation!"; - v_msgEng="Please review the date!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateConsultation").focus(); - return; - } - - if (dt1>dt3 || dt1dt3) - { - v_msg="Attention! cette police n'est pas couverte à cette date!"; - v_msgEng="Warning! This insurance policy is not valid on this date!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ces modificatons?"; - v_msgEng="Do you confirm these changes?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'demandeur='+demandeur+'&codeLienDemandeur='+codeLienDemandeur; - donnees += '&beneficiaireReglement='+beneficiaireReglement+'&codeLienBeneficiaire='+codeLienBeneficiaire; - - - donnees += '&codeModePaiementDemande='+codeModePaiementDemande; - donnees += '&codeBanqueBeneficiaire='+codeBanqueBeneficiaire+'&numeroCompteBeneficiaire='+numeroCompteBeneficiaire; - - donnees += '&prestataireConsultation=' +prestataireConsultation; - donnees += '&dateConsultation=' +dateConsultation; - donnees += '&codeRaisonConsultation=' +codeRaisonConsultation; - donnees += '&hospitalisation=' +hospitalisation; - donnees += '&observations=' +observations; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdossierclassique/enregistrermodificationsdossierclassique/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - v_msg="Modifications effectuées avec succès!"; - v_msgEng="Changes made successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() { - afficher_dossier_classique(); - } - }); - } -} - -function enregistrerpaiementfraisfuneraire() -{ - idFraisfuneraire = $("#idFraisfuneraire").val(); - dateComptable = $("#dateComptable").val(); - montantPaye = $("#montantPaye").val(); - codeModePaiement = $("#codeModePaiement").val(); - referencePaiement = $("#referencePaiement").val(); - - codeBanquePayeur = $("#codeBanquePayeur").val(); - - if (codeModePaiement<=" ") - { - v_msg="Veuillez sélectionner le mode de paiement!"; - v_msgEng="Please select the payment method!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModePaiement").focus(); - return; - } - - if (codeBanquePayeur<=" ") - { - v_msg="Veuillez sélectionner la banque de paiement!"; - v_msgEng="Please select the payment bank!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeBanquePayeur").focus(); - return; - } - - if (referencePaiement<=" ") - { - v_msg="Veuillez indiquer la référence du paiement!"; - v_msgEng="Please enter the payment reference!"; - alert_ebene(v_msg, v_msgEng); - - $("#referencePaiement").focus(); - return; - } - - if (dateComptable<=" ") - { - v_msg="Veuillez saisir la date comptable!"; - v_msgEng="Please enter the posting date!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateComptable").focus(); - return; - } - - if(montantPaye<=" ") - { - montantPaye = "0"; - } - - if(montantPaye==0) - { - v_msg="Veuillez revoir le montant!"; - v_msgEng="Please review the amount!"; - alert_ebene(v_msg, v_msgEng); - - $("#montantPaye").focus(); - - return; - } - - v_msg="Confirmez-vous ce paiement?"; - v_msgEng="Do you confirm this payment?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idFraisfuneraire='+idFraisfuneraire+'&codeModePaiement='+codeModePaiement; - donnees += '&referencePaiement='+referencePaiement+'&montantPaye='+montantPaye; - donnees += '&dateComptable='+dateComptable; - donnees += '&codeBanquePayeur='+codeBanquePayeur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerdemandefraisfuneraire/enregistrerpaiementfraisfuneraire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - v_msg="Opération effectuée avec succès!"; - v_msgEng="Operation successfully completed"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() { - fraisfuneraire(); - } - }); - } -} - -function enregistrer_paiement_dossier_classique() -{ - idDossierClassique = $("#idDossierClassique").val(); - dateComptable = $("#dateComptable").val(); - montantPaye = $("#montantPaye").val(); - codeModePaiement = $("#codeModePaiement").val(); - referencePaiement = $("#referencePaiement").val(); - - codeBanquePayeur = $("#codeBanquePayeur").val(); - - if (codeModePaiement<=" ") - { - v_msg="Veuillez sélectionner le mode de paiement!"; - v_msgEng="Please select the payment method!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModePaiement").focus(); - return; - } - - if (codeBanquePayeur<=" ") - { - v_msg="Veuillez sélectionner la banque de paiement!"; - v_msgEng="Please select the payment bank!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeBanquePayeur").focus(); - return; - } - - if (referencePaiement<=" ") - { - v_msg="Veuillez indiquer la référence du paiement!"; - v_msgEng="Please enter the payment reference!"; - alert_ebene(v_msg, v_msgEng); - - $("#referencePaiement").focus(); - return; - } - - if (dateComptable<=" ") - { - v_msg="Veuillez saisir la date comptable!"; - v_msgEng="Please enter the posting date!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateComptable").focus(); - return; - } - - if(montantPaye<=" ") - { - montantPaye = "0"; - } - - if(montantPaye==0) - { - v_msg="Veuillez revoir le montant!"; - v_msgEng="Please review the amount!"; - alert_ebene(v_msg, v_msgEng); - - $("#montantPaye").focus(); - - return; - } - - v_msg="Confirmez-vous ce paiement?"; - v_msgEng="Do you confirm this payment?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idDossierClassique='+idDossierClassique+'&codeModePaiement='+codeModePaiement; - donnees += '&referencePaiement='+referencePaiement+'&montantPaye='+montantPaye; - donnees += '&dateComptable='+dateComptable; - donnees += '&codeBanquePayeur='+codeBanquePayeur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdossierclassique/enregistrerpaiementdossierclassique/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - v_msg="Opération effectuée avec succès!"; - v_msgEng="Operation successfully completed"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() { - afficher_dossier_classique(); - } - }); - } -} - -function rechercher_dossier_classique(numeroDecompte, idBeneficiaire) -{ - donnees = "numeroDecompte="+numeroDecompte+"&idBeneficiaire="+idBeneficiaire; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdossierclassique/getcontextbyidreglement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_dossier_classique(); - } - }); -} - -function rechercher_frais_funeraire(idReglement, idBeneficiaire) -{ - donnees = "idReglement="+idReglement+"&idBeneficiaire="+idBeneficiaire; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfraisfuneraire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - fraisfuneraire(); - } - }); -} - -function demander_reglement_ff() -{ - fraisFuneraireDemande=$("#fraisFuneraireDemande_C").val(); - fraisFunerairePaye=$("#fraisFunerairePaye_C").val(); - - if (fraisFuneraireDemande!=1) - { - v_msg="Aucune demande en cours!"; - v_msgEng="No request in progress!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (fraisFunerairePaye==1) - { - v_msg="Déjà payé!"; - v_msgEng="Already paid!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - regle=$("#regle").val(); - regle = parseInt(regle); - - if (regle==1) - { - v_msg="Déjà réglé!"; - 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; - } - - v_msg="Confirmez-vous la demande de règlement?"; - v_msgEng="Do you confirm the request of payment?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - idFraisfuneraire = $("#idFraisfuneraire").val(); - donnees = 'idFraisfuneraire='+idFraisfuneraire; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxenregistrerdemandefraisfuneraire/demanderreglement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - v_msg="Demande de Règlement effectuée avec succès!"; - v_msgEng="Request of payment successfully completed!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() { - fraisfuneraire(); - } - }); - } -} - -function demander_reglement_dc() -{ - fraisRetenu=$("#fraisRetenu").val(); - if (fraisRetenu<=0) - { - v_msg="Rien à régler!"; - v_msgEng="Nothing to pay!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - regle=$("#regle").val(); - regle = parseInt(regle); - - if (regle==1) - { - v_msg="Déjà réglé!"; - 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; - } - - v_msg="Confirmez-vous la demande de règlement?"; - v_msgEng="Do you confirm the request of payment?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - idDossierClassique = $("#idDossierClassique").val(); - donnees = 'idDossierClassique='+idDossierClassique; - - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdossierclassique/demanderreglement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - v_msg="Demande de Règlement effectuée avec succès!"; - v_msgEng="Request of payment successfully completed!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() { - afficher_dossier_classique(); - } - }); - } -} - - -function initierdecompte_liste_cpt(codePrestataire, codeExercice, codeMois) -{ - donnees = 'codePrestataire='+codePrestataire+'&codeExercice='+codeExercice+'&codeMois='+codeMois; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/initierdecompte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - consulterdecompte_cpt(); - } - }); -} - -// -function consulterdecompte_cpt() -{ - var div_wait = $('#detail_reglement'); - div_wait.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - window.location.assign($("#racineWeb" ).val()+"Decomptecpt/"); -} - -function initierpaimentdecompte() -{ - v_msg="Confirmez-vous l\'initiaition d\'un nouveau paiement?"; - v_msgEng="Do you confirm the initiation of a new payment?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxpaiementdecompte/initierpaimentdecompte/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - paiement_decompte(); - } - }); - } -} - -function paiement_decompte() -{ - window.location.assign($("#racineWeb" ).val()+"Paiementdecompte/"); -} - -function consulterpaiements() -{ - window.location.assign($("#racineWeb" ).val()+"Consulterpaiementdecompte/"); -} - -function modifierpaiement() -{ -} - -function imprimer_detail_paiement_decompte() -{ - $('#div_export_b').html(""); - $("#btn_pop_imprimer_detail_pdc").click(); -} - -function ajaxchangercompsantepaiement_decompte() -{ - $("#div_detail_paiement_decompte").html(''); - - codeComposante=$("#codeComposante").val(); - - if(codeComposante<=" ") - { - v_msg="Veuillez sélectionner une compsante!"; - v_msgEng="Please select a compsante!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeComposante").focus(); - return; - } - - donnees = 'codeComposante='+codeComposante; - - if(codeComposante=="DP") - { - // DP => Décomptes à payer - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptesel/"; - - $("#div_detail_paiement_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail_paiement_decompte").html(data); - $(".datepicker" ).datepicker(); - } - }); - } - else - { - // DNP => Décomptes non payés - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptenonsel/"; - - $("#div_detail_paiement_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail_paiement_decompte").html(data); - $(".datepicker" ).datepicker(); - } - }); - } -} - -function lister_paiement_decompte() -{ - debut=$("#debut").val(); - fin=$("#fin").val(); - - valide=$("#valide").val(); - - donnees = 'debut='+debut+'&fin='+fin+'&valide='+valide; - - // alert(donnees); - // return; - - $("#div_detail_paiement_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxpaiementdecompte/listerpaiementdecompte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail_paiement_decompte").html(data); - }, - complete: function() { - } - }); -} - -function get_contexte_paiement_decompte(idPaiementDecompte) -{ - donnees = 'idPaiementDecompte='+idPaiementDecompte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxpaiementdecompte/getcontextbyid/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - } - }); -} - -function conulter_paiement_decompte() -{ - window.location.assign($("#racineWeb" ).val()+"Paiementdecomptecons/"); -} - -function get_contexte_paiement_decompte_et_afficher(idPaiementDecompte, valide) -{ - donnees = 'idPaiementDecompte='+idPaiementDecompte+'&valide='+valide; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxpaiementdecompte/getcontextbyid/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - if(valide=="1") - { - conulter_paiement_decompte(); - } - else - { - paiement_decompte(); - } - } - }); -} - -function recharger_paiement_decompte_non_sel() -{ - $("#div_detail_paiement_decompte").html(''); - - $("#div_detail_paiement_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptenonsel/"; - - - $.ajax({ - url: v_url, - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail_paiement_decompte").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - - -function selectionner_paiement_decompte_non_sel_tout(choix) -{ - donnees = 'choix='+choix; - - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptenonsel/selectionnertout/"; - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - reafficher_paiement_decompte_non_sel(); - - } - }); -} - -function reafficher_paiement_decompte_non_sel() -{ - $("#div_detail_paiement_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptenonsel/reafficher/"; - - $.ajax({ - url: v_url, - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail_paiement_decompte").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function selectionner_paiement_decompte_non_sel(idDecompteTemp, choix) -{ - donnees = 'idDecompteTemp='+idDecompteTemp+'&choix='+choix; - - if(choix==0) - { - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptenonsel/deselectionner/"; - } - else - { - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptenonsel/selectionner/"; - } - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(ErrorData) { - }, - complete: function() { - } - }); -} - -// - -function anomaliesdecomptes() -{ - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxanomaliesdecomptes/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_detail").html(data); - }, - complete: function() { - } - }); -} - -function anomaliesdecomptes_export() -{ - $('#div_detail').html(""); - - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxanomaliesdecomptesexport/"; - - $.ajax({ - url: v_url, - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - - -function valider_selection_paiement_decompte_non_sel() -{ - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptenonsel/validerselection/"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_paiementdecompte").html(data); - // $(".datepicker" ).datepicker(); - }, - complete: function() { - $("#detail_facture").html(''); - - v_msg="Validation terminée avec succès!"; - v_msgEng="Validation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - reafficher_paiement_decompte_non_sel(); - } - }); -} - -function recharger_paiement_decompte_sel() -{ - $("#div_detail_paiement_decompte").html(''); - - $("#div_detail_paiement_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptesel/"; - - - $.ajax({ - url: v_url, - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail_paiement_decompte").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function reafficher_paiement_decompte_sel() -{ - $("#div_detail_paiement_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptesel/reafficher/"; - - $.ajax({ - url: v_url, - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_detail_paiement_decompte").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function selectionner_paiement_decompte_sel_tout(choix) -{ - donnees = 'choix='+choix; - - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptesel/selectionnertout/"; - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - reafficher_paiement_decompte_sel(); - - } - }); -} - -function selectionner_paiement_decompte_sel(idDecompteTemp, choix) -{ - donnees = 'idDecompteTemp='+idDecompteTemp+'&choix='+choix; - - if(choix==0) - { - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptesel/deselectionner/"; - } - else - { - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptesel/selectionner/"; - } - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function valider_selection_paiement_decompte_sel() -{ - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxpaiementdecomptesel/validerselection/"; - - $.ajax({ - url: v_url, - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_paiementdecompte").html(data); - // $(".datepicker" ).datepicker(); - }, - complete: function() { - $("#detail_facture").html(''); - - v_msg="Validation terminée avec succès!"; - v_msgEng="Validation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - reafficher_paiement_decompte_sel(); - } - }); -} - -function paiement_decompte_courant() -{ - idPaiementDecompte_courant=$("#idPaiementDecompte_C").val(); - - if(idPaiementDecompte_courant==0) - { - v_msg="Veuillez sélectionner un paiement!"; - v_msgEng="Please select a payment!"; - alert_ebene(v_msg, v_msgEng); - - consulterpaiements(); - - return; - } - - paiement_decompte(); - -} - -// - -function valider_paiement_decompte() -{ - valide=$("#valide").val(); - montantApayer=$("#montantApayer").val(); - - if (valide==1) - { - v_msg="Déjà Validé!"; - v_msgEng="Already validated!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(montantApayer<=" ") - { - montantApayer = "0"; - } - - if(montantApayer==0) - { - v_msg="Rien à valider!"; - v_msgEng="Nothing to validate!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Validerpaiementdecompte/"); -} - -function demandesreglement_cpt() -{ - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxldemandesteglementcpt/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_detail").html(data); - }, - complete: function() { - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function rechercher_frais_funeraire_cpt(idReglement, idBeneficiaire) -{ - donnees = "idReglement="+idReglement+"&idBeneficiaire="+idBeneficiaire; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcontextfraisfuneraire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - fraisfuneraire_cpt(); - } - }); -} - -function fraisfuneraire_cpt() -{ - window.location.assign($("#racineWeb" ).val()+"Fraisfunerairecpt/"); -} - -function rechercher_dossier_classique_cpt(numeroDecompte, idBeneficiaire) -{ - donnees = "numeroDecompte="+numeroDecompte+"&idBeneficiaire="+idBeneficiaire; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdossierclassique/getcontextbyidreglement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_dossier_classique_cpt(); - } - }); -} - -function afficher_dossier_classique_cpt() -{ - window.location.assign($("#racineWeb" ).val()+"Dossierclassiquecpt/"); -} - -function enregistrer_valider_paiement_decompte() -{ - valide=$("#valide").val(); - montantApayer=$("#montantApayer").val(); - - if (valide==1) - { - v_msg="Déjà Validé!"; - v_msgEng="Already validated!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idPaiementDecompte = $("#idPaiementDecompte").val(); - dateComptable = $("#dateComptable").val(); - montantPaye = $("#montantPaye").val(); - codeModePaiement = $("#codeModePaiement").val(); - referencePaiement = $("#referencePaiement").val(); - - codeBanquePayeur = $("#codeBanquePayeur").val(); - - if (codeModePaiement<=" ") - { - v_msg="Veuillez sélectionner le mode de paiement!"; - v_msgEng="Please select the payment method!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModePaiement").focus(); - return; - } - - if (codeBanquePayeur<=" ") - { - v_msg="Veuillez sélectionner la banque de paiement!"; - v_msgEng="Please select the payment bank!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeBanquePayeur").focus(); - return; - } - - if (referencePaiement<=" ") - { - v_msg="Veuillez indiquer la référence du paiement!"; - v_msgEng="Please enter the payment reference!"; - alert_ebene(v_msg, v_msgEng); - - $("#referencePaiement").focus(); - return; - } - - if (dateComptable<=" ") - { - v_msg="Veuillez saisir la date comptable!"; - v_msgEng="Please enter the posting date!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateComptable").focus(); - return; - } - - if(montantPaye<=" ") - { - montantPaye = "0"; - } - - if(montantPaye==0) - { - v_msg="Rien à régler!"; - v_msgEng="Nothing to pay!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous ce règelement?"; - v_msgEng="Do you confirm this payment?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idPaiementDecompte='+idPaiementDecompte+'&codeModePaiement='+codeModePaiement; - donnees += '&referencePaiement='+referencePaiement+'&montantPaye='+montantPaye; - donnees += '&dateComptable='+dateComptable; - donnees += '&codeBanquePayeur='+codeBanquePayeur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxpaiementdecompte/enregistrervaliderpaiementdecompte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - conulter_paiement_decompte(); - } - }); - } -} - -function imprimer_detail_paiement_decompte_pdf() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpaiementdecomptepdf/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function imprimer_detail_paiement_decompte_xls() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailpaiementdecomptexls/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function en_attente_demandesreglement() -{ - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxattentedemandesteglement/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_detail").html(data); - }, - complete: function() { - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function en_attente_demandesreglement_export() -{ - $('#div_detail').html(""); - - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxattentedemandesteglementexport/"; - - $.ajax({ - url: v_url, - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function rattrapage_reception_facture_decompte() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/initrattrapagereceptionfactureprestataire/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_rattrapage_reception").html(data); - $(".datepicker" ).datepicker(); - }, - complete: function() { - $('#btn_pop_rattrapage_reception').click(); - } - }); - - -} - -function maj_rattrapage_reception_facture_decompte() -{ - dateReception = $("#dateReception_pop_rattrapage").val(); - montantPrestataire = $("#montantPrestataire_pop_rattrapage").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); - - $("#dateReception_pop_rattrapage").focus(); - return; - } - - if (montantPrestataire<=" ") - { - montantPrestataire = "0"; - } - - montantPrestataire = montantPrestataire.replace(" ", ""); - montantPrestataire = parseInt(montantPrestataire); - - if (montantPrestataire=="0") - { - v_msg="Veuillez indicquer le montant de la facture du prestataire!"; - v_msgEng="Please enter the invoice amount of the service provider!"; - alert_ebene(v_msg, v_msgEng); - - $("#montantPrestataire_pop_rattrapage").focus(); - return; - } - - motif=$("#motif_rattrapage").val(); - - if (motif<=" ") - { - v_msg="Veuillez saisir un motif!"; - v_msgEng="Please enter a reaon!"; - alert_ebene(v_msg, v_msgEng); - - $("#motif_rattrapage").focus(); - return; - } - - donnees = 'dateReception='+dateReception+'&montantPrestataire='+montantPrestataire+'&motif='+motif; - - v_msg="Confirmez-vous ces informations?"; - v_msgEng="Do you confirm this information?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdecompte/rattrapagereceptionfactureprestataire/", - type: 'POST', - data: donnees, - success: function(data) { - $("#close_pop_rattrapage_reception").click(); - $('#reglement').html(data); - - }, - error: function(erreur) { - }, - complete: function() { - v_msg="Opération effectuée avec succès!"; - v_msgEng="Operation successfully completed"; - alert_ebene(v_msg, v_msgEng); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -// Etats MUGABO - -function propositions_paiement_prestataire() -{ - codeExercice1 = $("#codeExercice1").val(); - codeMois1 = $("#codeMois1").val(); - - codeExercice2 = $("#codeExercice2").val(); - codeMois2 = $("#codeMois2").val(); - - if (codeMois1<=" ") - { - v_msg="Veuillez sélectionner le mois de départ!"; - v_msgEng="Please select the month of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois1").focus(); - return; - } - - if (codeExercice1<=" ") - { - v_msg="Veuillez sélectionner exercice de départ!"; - v_msgEng="Please select the exercise of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice1").focus(); - return; - } - - if (codeMois2<=" ") - { - v_msg="Veuillez sélectionner le mois de fin!"; - v_msgEng="Please select the month of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois2").focus(); - return; - } - - if (codeExercice2<=" ") - { - v_msg="Veuillez sélectionner exercice de fin!"; - v_msgEng="Please select the exercise of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice2").focus(); - return; - } - - codePerdiode1 = codeExercice1+codeMois1; - - codePerdiode2 = codeExercice2+codeMois2; - - donnees = 'codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2; - - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxemandesreglementsglobal/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail").html(data); - }, - complete: function() { - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function propositions_paiement_prestataire_export() -{ - codeExercice1 = $("#codeExercice1").val(); - codeMois1 = $("#codeMois1").val(); - - codeExercice2 = $("#codeExercice2").val(); - codeMois2 = $("#codeMois2").val(); - - if (codeMois1<=" ") - { - v_msg="Veuillez sélectionner le mois de départ!"; - v_msgEng="Please select the month of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois1").focus(); - return; - } - - if (codeExercice1<=" ") - { - v_msg="Veuillez sélectionner exercice de départ!"; - v_msgEng="Please select the exercise of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice1").focus(); - return; - } - - if (codeMois2<=" ") - { - v_msg="Veuillez sélectionner le mois de fin!"; - v_msgEng="Please select the month of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois2").focus(); - return; - } - - if (codeExercice2<=" ") - { - v_msg="Veuillez sélectionner exercice de fin!"; - v_msgEng="Please select the exercise of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice2").focus(); - return; - } - - codePerdiode1 = codeExercice1+codeMois1; - - codePerdiode2 = codeExercice2+codeMois2; - - donnees = 'codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2; - - var div_export = $('#div_detail'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxemandesreglementsglobalexport/"; - - $.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 imprimerdecompteprestataireaccord() -{ - idReglement = $("#idReglement").val(); - - if (idReglement>"0") - { - var div_wait = $('#div_wait'); - div_wait.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/imprimerdecompteprestataireaccord", - type: 'POST', - success: function(data) - { - div_wait.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } -} - -function chercher_facture(idFacture) -{ - - $("#div_facture_detail").html(''); - - $("#div_consulter_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturecons/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_consulter_facture").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfacturefeuillemaladie() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturecons/feuillemaladie/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureprestationactes() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturecons/prestationactes/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfacturemedicaments() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturecons/medicaments/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulter_facture_pop(idFacture) -{ - - $("#div_facture_detail").html(''); - - $("#div_consulter_facture_pop").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_consulter_facture_pop").html(data); - }, - error: function(data) { - }, - complete: function() { - $('#btn_pop_consulter_facture').click(); - } - }); -} - -function consulterfacturefeuillemaladie_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/feuillemaladie/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureprestationactes_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/prestationactes/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfacturemedicaments_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/medicaments/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ged_decompte_gc(idFacture) -{ - numeroDecompte = $("#numeroDecompte").val(); - - if (idFacture>"0") - { - donnees = 'numeroDecompte='+numeroDecompte+'&idFacture='+idFacture; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgedfacturegc/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - $("#btn_pop_ged").click(); - } - }); - } -} - -function valider_ged_decompte_gc() -{ - idFacture = $("#idFactureGed").val(); - v_url = $("#racineWeb").val()+"Ajaxgedfacturegc/chargerged"; - - donnees = ""; - - donnees = new FormData($("#ajax_form_upload")[0]); - - $.ajax({ - type: "POST", - url: v_url, - data: donnees, - contentType: false, - cache: false, - processData :false, - - success: function(message){ - alert(message); - $("#btn_close_pop_ged_facture").click(); - }, - error: function(errorData){ - }, - complete: function() { - } - }); -} - -function consulterfactureged_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/geds/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function reafficher_ged_facture(idFacture) -{ - if (idFacture>"0") - { - donnees = 'idFacture='+idFacture; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgedfacture/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ged").html(data); - }, - complete: function() { - } - }); - } -} - -function valider_ged_facture() -{ - idFacture = $("#idFactureGed").val(); - v_url = $("#racineWeb").val()+"Ajaxgedfacture/chargerged"; - - donnees = ""; - - donnees = new FormData($("#ajax_form_upload")[0]); - - $.ajax({ - type: "POST", - url: v_url, - data: donnees, - contentType: false, - cache: false, - processData :false, - - success: function(message){ - alert(message); - }, - error: function(errorData){ - }, - complete: function() { - // reafficher_ged_facture(idFacture); - } - }); -} - -function consulterfactureged() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturecons/geds/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -// factures GC cumulées -function requetes_factures_gc_cumul() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - codeGcAssureur = $("#codeGcAssureur").val(); - if(codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - codeExercice1 = $("#codeExercice1").val(); - codeMois1 = $("#codeMois1").val(); - - codeExercice2 = $("#codeExercice2").val(); - codeMois2 = $("#codeMois2").val(); - - if (codeMois1<=" ") - { - v_msg="Veuillez sélectionner le mois de départ!"; - v_msgEng="Please select the month of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois1").focus(); - return; - } - - if (codeExercice1<=" ") - { - v_msg="Veuillez sélectionner exercice de départ!"; - v_msgEng="Please select the exercise of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice1").focus(); - return; - } - - if (codeMois2<=" ") - { - v_msg="Veuillez sélectionner le mois de fin!"; - v_msgEng="Please select the month of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois2").focus(); - return; - } - - if (codeExercice2<=" ") - { - v_msg="Veuillez sélectionner exercice de fin!"; - v_msgEng="Please select the exercise of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice2").focus(); - return; - } - - codePerdiode1 = codeExercice1+codeMois1; - - codePerdiode2 = codeExercice2+codeMois2; - - donnees = 'codeGcAssureur='+codeGcAssureur+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxrequetefacturegccumul/"; - - $.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_cumul_export() -{ - donnees = ""; - donnees_retour = ""; - - codeGcAssureur = $("#codeGcAssureur").val(); - if(codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - codeExercice1 = $("#codeExercice1").val(); - codeMois1 = $("#codeMois1").val(); - - codeExercice2 = $("#codeExercice2").val(); - codeMois2 = $("#codeMois2").val(); - - if (codeMois1<=" ") - { - v_msg="Veuillez sélectionner le mois de départ!"; - v_msgEng="Please select the month of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois1").focus(); - return; - } - - if (codeExercice1<=" ") - { - v_msg="Veuillez sélectionner exercice de départ!"; - v_msgEng="Please select the exercise of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice1").focus(); - return; - } - - if (codeMois2<=" ") - { - v_msg="Veuillez sélectionner le mois de fin!"; - v_msgEng="Please select the month of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois2").focus(); - return; - } - - if (codeExercice2<=" ") - { - v_msg="Veuillez sélectionner exercice de fin!"; - v_msgEng="Please select the exercise of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice2").focus(); - return; - } - - codePerdiode1 = codeExercice1+codeMois1; - - codePerdiode2 = codeExercice2+codeMois2; - - donnees = 'codeGcAssureur='+codeGcAssureur+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxrequetefacturegccumulexport/"; - - $.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_opt() -{ - window.location.assign($("#racineWeb" ).val()+"Listeententeprealablesopt/"); -} - -function listeententeprealablesopt() -{ - codeReponseEntentePrealable=$("#codeReponseEntentePrealable").val(); - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'codeReponseEntentePrealable='+codeReponseEntentePrealable; - donnees += '&debut='+debut+'&fin='+fin; - - $("#div_ententeprealable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesopt/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ententeprealable").html(data); - }, - complete: function() { - } - }); -} - -function consulter_ententeprealable_opt_2(idDemandeententeprealable) -{ - window.location.assign($("#racineWeb" ).val()+"Consulterententeprealablesopt/"+idDemandeententeprealable+"/"); -} - -function demandesreglement_filtre() -{ - codePrestataire = $("#codePrestataire").val(); - - codeExercice1 = $("#codeExercice1").val(); - codeMois1 = $("#codeMois1").val(); - - codeExercice2 = $("#codeExercice2").val(); - codeMois2 = $("#codeMois2").val(); - - if (codeMois1<=" ") - { - v_msg="Veuillez sélectionner le mois de départ!"; - v_msgEng="Please select the month of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois1").focus(); - return; - } - - if (codeExercice1<=" ") - { - v_msg="Veuillez sélectionner exercice de départ!"; - v_msgEng="Please select the exercise of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice1").focus(); - return; - } - - if (codeMois2<=" ") - { - v_msg="Veuillez sélectionner le mois de fin!"; - v_msgEng="Please select the month of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois2").focus(); - return; - } - - if (codeExercice2<=" ") - { - v_msg="Veuillez sélectionner exercice de fin!"; - v_msgEng="Please select the exercise of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice2").focus(); - return; - } - - codePerdiode1 = codeExercice1+codeMois1; - - codePerdiode2 = codeExercice2+codeMois2; - - donnees = 'codePrestataire='+codePrestataire+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2; - - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxldemandesteglementfiltre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail").html(data); - }, - complete: function() { - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - - -function demandesreglement_filtre_export() -{ - codePrestataire = $("#codePrestataire").val(); - - codeExercice1 = $("#codeExercice1").val(); - codeMois1 = $("#codeMois1").val(); - - codeExercice2 = $("#codeExercice2").val(); - codeMois2 = $("#codeMois2").val(); - - if (codeMois1<=" ") - { - v_msg="Veuillez sélectionner le mois de départ!"; - v_msgEng="Please select the month of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois1").focus(); - return; - } - - if (codeExercice1<=" ") - { - v_msg="Veuillez sélectionner exercice de départ!"; - v_msgEng="Please select the exercise of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice1").focus(); - return; - } - - if (codeMois2<=" ") - { - v_msg="Veuillez sélectionner le mois de fin!"; - v_msgEng="Please select the month of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois2").focus(); - return; - } - - if (codeExercice2<=" ") - { - v_msg="Veuillez sélectionner exercice de fin!"; - v_msgEng="Please select the exercise of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice2").focus(); - return; - } - - codePerdiode1 = codeExercice1+codeMois1; - - codePerdiode2 = codeExercice2+codeMois2; - - donnees = 'codePrestataire='+codePrestataire+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2; - - var div_export = $('#div_detail'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxldemandesteglementfiltreexport/"; - - $.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 demandesreglement_filtre_cpt() -{ - codePrestataire = $("#codePrestataire").val(); - - codeExercice1 = $("#codeExercice1").val(); - codeMois1 = $("#codeMois1").val(); - - codeExercice2 = $("#codeExercice2").val(); - codeMois2 = $("#codeMois2").val(); - - if (codeMois1<=" ") - { - v_msg="Veuillez sélectionner le mois de départ!"; - v_msgEng="Please select the month of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois1").focus(); - return; - } - - if (codeExercice1<=" ") - { - v_msg="Veuillez sélectionner exercice de départ!"; - v_msgEng="Please select the exercise of start!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice1").focus(); - return; - } - - if (codeMois2<=" ") - { - v_msg="Veuillez sélectionner le mois de fin!"; - v_msgEng="Please select the month of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeMois2").focus(); - return; - } - - if (codeExercice2<=" ") - { - v_msg="Veuillez sélectionner exercice de fin!"; - v_msgEng="Please select the exercise of end!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice2").focus(); - return; - } - - codePerdiode1 = codeExercice1+codeMois1; - - codePerdiode2 = codeExercice2+codeMois2; - - donnees = 'codePrestataire='+codePrestataire+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2; - - $("#div_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxldemandesteglementcpt/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail").html(data); - }, - complete: function() { - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function accepter_ententeprealable_opt(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()+"Accepterententeprealablesopt/"+idDemandeententeprealable+"/"); -} - -function refuser_ententeprealable_opt(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()+"Refuserententeprealablesopt/"+idDemandeententeprealable+"/"); -} - -// -function enregistreraccordententepreslable_opt() -{ - idDemandeententeprealable = $("#idDemandeententeprealable").val(); - motifReel = $("#motifReel").val(); - prixAccorde = $("#prixAccorde").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; - } - - - v_msg="Confirmez-vous cet accord?"; - v_msgEng="Do you confirm this agreement?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - codePrestataire = $("#codePrestataire").val(); - - donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&prixAccorde='+prixAccorde; - donnees += '&codePrestataire='+codePrestataire; - - donnees_sav = donnees; - typeMail='accordententeprealableopt'; - typeSms = "accordententeprealableopt"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistreraccordententeprealableopt/", - 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_opt(); - } - }); - } -} - -// -function enregistrerrefusententepreslable_opt() -{ - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - codePrestataire = $("#codePrestataire").val(); - - donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure; - donnees += '&codePrestataire='+codePrestataire; - - donnees_sav = donnees; - typeMail='refusententeprealableopt'; - typeSms="refusententeprealableopt"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistrerrefusententeprealableopt/", - 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_opt(); - } - }); - } -} - -function liste_ententeprealables_mont() -{ - window.location.assign($("#racineWeb" ).val()+"Listeententeprealablesmont/"); -} - -function listeententeprealablesmont() -{ - codeReponseEntentePrealable=$("#codeReponseEntentePrealable").val(); - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'codeReponseEntentePrealable='+codeReponseEntentePrealable; - donnees += '&debut='+debut+'&fin='+fin; - - $("#div_ententeprealable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesmont/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ententeprealable").html(data); - }, - complete: function() { - } - }); -} - -function consulter_ententeprealable_mont_2(idDemandeententeprealable) -{ - window.location.assign($("#racineWeb" ).val()+"Consulterententeprealablesmont/"+idDemandeententeprealable+"/"); -} - -function accepter_ententeprealable_mont(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()+"Accepterententeprealablesmont/"+idDemandeententeprealable+"/"); -} - - -function enregistreraccordententepreslable_mont() -{ - idDemandeententeprealable = $("#idDemandeententeprealable").val(); - motifReel = $("#motifReel").val(); - prixAccorde = $("#prixAccorde").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; - } - - - v_msg="Confirmez-vous cet accord?"; - v_msgEng="Do you confirm this agreement?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - codePrestataire = $("#codePrestataire").val(); - - donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&prixAccorde='+prixAccorde; - donnees += '&codePrestataire='+codePrestataire; - - donnees_sav = donnees; - typeMail='accordententeprealablemont'; - typeSms = "accordententeprealablemont"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistreraccordententeprealablemont/", - 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_mont(); - } - }); - } -} - -function refuser_ententeprealable_mont(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()+"Refuserententeprealablesmont/"+idDemandeententeprealable+"/"); -} - - -function enregistrerrefusententepreslable_mont() -{ - 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?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - codePrestataire = $("#codePrestataire").val(); - - donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure; - donnees += '&codePrestataire='+codePrestataire; - - donnees_sav = donnees; - typeMail='refusententeprealablemont'; - typeSms="refusententeprealablemont"; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistrerrefusententeprealablemont/", - 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_mont(); - } - }); - } -} - -function histsupprempreinte() -{ - $("#div_detail_suppr_empreinte").html(""); - - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'debut='+debut+'&fin='+fin; - - $("#div_detail_suppr_empreinte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxhistsupprempreinte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail_suppr_empreinte").html(data); - }, - complete: function() { - } - }); -} - -function histsupprempreinte_export() -{ - $("#div_detail_suppr_empreinte").html(""); - - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'debut='+debut+'&fin='+fin; - donnees_retour = ""; - - $("#div_detail_suppr_empreinte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxhistsupprempreinteexport/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_suppr_empreinte").html(donnees_retour); - } - }); -} - -function liste_ententeprealables_pha() -{ - window.location.assign($("#racineWeb" ).val()+"Listeententeprealablespha/"); -} - -function exporter_modele_assure() -{ - $('#div_form_upload').hide(); - - var div_export = $('#div_exporter_liste_assures'); - - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassure/exportermodele/", - type: 'POST', - // data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function init_importer_modele_assure() -{ - etape2=$("#etape2").val(); - - if (etape2 != "1") - { - v_msg="Etape 2 incomplète!"; - v_msgEng="Incomplete step 2!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $('#div_form_upload').hide(); - - var div_export = $('#div_exporter_liste_assures'); - - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassure/initimportermodele/", - type: 'POST', - // data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function importer_modele_assure(idAvenant) -{ - etape2=$("#etape2").val(); - - if (etape2 != "1") - { - v_msg="Etape 2 incomplète!"; - v_msgEng="Incomplete step 2!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $('#div_form_upload').hide(); - - var div_export = $('#div_exporter_liste_assures'); - - div_export.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - cheminFichier=$("#cheminFichier").val(); - - donnees = 'idAvenant='+idAvenant+'&cheminFichier='+cheminFichier; - - $("#div_erreur_excel").html(""); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassure/importermodele/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(''); - $("#div_erreur_excel").html(data); - - v_msg="Opération terminée avec succès!"; - v_msgEng="Operation completed successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - div_export.html(''); - - succes_impot_execl=$("#succes_impot_execl").val(); - - if (succes_impot_execl == "1") - { - maj_etape_3_import_assures(); - } - } - }); -} - - -function traiter_lignes_importees() -{ - etape2=$("#etape2").val(); - - if (etape2 != "1") - { - v_msg="Etape 2 incomplète!"; - v_msgEng="Incomplete step 2!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - etape3=$("#etape3").val(); - - if (etape3 != "1") - { - v_msg="Etape 3 incomplète!"; - v_msgEng="Incomplete step 3!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - // window.location.assign($("#racineWeb" ).val()+"Listeimportassure/"); - afficher_liste_assures_a_importer(); -} - - -function afficher_une_ligne_importee(idBeneficiairemodel) -{ -} - - -function exclure_ligne_assure_importee(idBeneficiairemodel, exclure) -{ - donnees = 'idBeneficiairemodel='+idBeneficiairemodel+'&exclure='+exclure; - - v_url = $("#racineWeb").val()+"Ajaximporterlisteassure/exclureligneimportee/"; - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function calculer_prime_inmportation() -{ - nb_adh=$("#nb_adh").val(); - - if (nb_adh>"0") - { - v_msg="Veuillez lier toutes les famille à leur collège!"; - v_msgEng="Please link all the family to their college!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous le calcul de primes?"; - v_msgEng="Do you confirm the premium calculation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - var div_attente = $('#div_liste_assure_importe'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassure/calculerprimeimportee/", - type: 'POST', - // data: donnees, - success: function(data) { - v_msg="Calcul de primes terminée avec succès!"; - v_msgEng="Premium calculation completed successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - error: function(data) { - }, - complete: function() - { - // window.location.assign($("#racineWeb" ).val()+"Listeimportassure/"); - afficher_liste_assures_a_importer(); - } - }); - } -} - -function charger_fichier_modele_assure() -{ - $('#div_exporter_liste_assures').html(""); - - $('#div_form_upload').show(); - - // return; -} - - -function afficher_adherent_importee() -{ - idCollege=$("#idCollege").val(); - - if (idCollege<=" ") - { - v_msg="Veuillez sélectionner un collège!"; - v_msgEng="Please select a college!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idCollege='+idCollege; - - var div_attente = $('#div_adherents_importes'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassure/afficheradherentimportee/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function retirer_un_adherent_importe_college(idBeneficiairemodel) -{ - donnees = 'idBeneficiairemodel='+idBeneficiairemodel; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassure/retirerunadherentaucollege/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_adherent_importee(); - } - }); -} - -function ajouter_un_adherent_importe_college(idBeneficiairemodel) -{ - idCollege=$("#idCollege").val(); - - if (idCollege<=" ") - { - v_msg="Veuillez sélectionner un collège!"; - v_msgEng="Please select a college!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idBeneficiairemodel='+idBeneficiairemodel+'&idCollege='+idCollege; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassure/ajouterunadherentaucollege/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_adherent_importee(); - } - }); -} - -function incorporer_assures_inmportes() -{ - nb_adh=$("#nb_adh").val(); - - if (nb_adh>"0") - { - v_msg="Veuillez revoir les collèges et relancer le calcul des primes!"; - v_msgEng="Please review the colleges and restart the premium calculation!!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nb_ligne_ass=$("#nb_ligne_ass").val(); - - if (nb_ligne_ass=="0") - { - v_msg="Rien à importer!"; - v_msgEng="Nothing to import!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Avez-vous fait l\'étape 2 => calcul des primes?"; - v_msgEng="Did you do step 2 => premium calculation?"; - - if(!confirm_ebene(v_msg, v_msgEng)) - { - return; - } - - primeTtcTotal=$("#primeTtcTotal").val(); - - if (primeTtcTotal=="0") - { - v_msg="Pas de primes! souhaitez-vous recalculer les primes?"; - v_msgEng="No premiums! do you want to recalculate the premiums?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - return; - } - - v_msg="Notez que vous avez accepté l\'incorporation sans primes!"; - v_msgEng="Note that you accepted the incorporation without premium!"; - alert_ebene(v_msg, v_msgEng); - } - - v_msg="Confirmez-vous l\'incorporation de cette liste?"; - v_msgEng="Do you confirm the incorporation of this list?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - var div_attente = $('#div_liste_assure_importe'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassure/incorpoerassuresimportes/", - type: 'POST', - // data: donnees, - success: function(data) { - v_msg="Incorporation terminée avec succès!"; - v_msgEng="Incorporation completed successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - error: function(data) { - }, - complete: function() { - afficher_police_id(); - } - }); - } -} - -function ajouter_tous_adherent_importe_college() -{ - idCollege=$("#idCollege").val(); - - if (idCollege<=" ") - { - v_msg="Veuillez sélectionner un collège!"; - v_msgEng="Please select a college!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idCollege='+idCollege; - - v_msg="Attention, cela va vider tous les autres collèges! Confirmez-vous?"; - v_msgEng="Be careful, this will empty all other colleges! Do you confirm?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassure/ajoutertousadherentaucollege/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_adherent_importee(); - } - }); - } -} - -function ajouter_sans_college_adherent_importe_college() -{ - idCollege=$("#idCollege").val(); - - if (idCollege<=" ") - { - v_msg="Veuillez sélectionner un collège!"; - v_msgEng="Please select a college!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idCollege='+idCollege; - - v_msg="Attention! Confirmez-vous cette opération?"; - v_msgEng="Warning! Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassure/ajoutersanscollegeadherentaucollege/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_adherent_importee(); - } - }); - } -} - - -function retirer_tous_adherent_importe_college() -{ - idCollege=$("#idCollege").val(); - - if (idCollege<=" ") - { - v_msg="Veuillez sélectionner un collège!"; - v_msgEng="Please select a college!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idCollege='+idCollege; - - v_msg="Attention, cela va vider ce collège! Confirmez-vous?"; - v_msgEng="Attention, this will empty this college! Do you confirm?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassure/retirertousadherentaucollege/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_adherent_importee(); - } - }); - } -} - -function maj_etape_3_import_assures() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassure/majetape/", - type: 'POST', - success: function(data) - { - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - // window.location.assign($("#racineWeb" ).val()+"Listeimportassure/"); - afficher_liste_assures_a_importer(); - } - }); -} - -function retour_tarifs_medicaments() -{ - window.location.assign($("#racineWeb" ).val()+"Tarifsmedicaments/"); -} - -function creer_tarif_medicaments() -{ - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le nom en Français!"; - v_msgEng="Please enter the name in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez indiquer le nom en Anglais!"; - v_msgEng="Please enter the name in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - donnees = 'libelle='+libelle+'&libelleEng='+libelleEng; - - v_msg="Confirmez-vous ce nouveau tarif?"; - v_msgEng="Do you confirm this new rate?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveautarifmedicament/creertarifmedicaments/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - //$('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_tarifs_medicaments(); - } - }); - } -} - -function modifier_tarif_medicaments(idTarif) -{ - window.location.assign($("#racineWeb" ).val()+"Modifiertarifmedicament/"+idTarif+"/"); -} - -function enregistrer_modif_tarif_medicaments() -{ - idTarif = $("#idTarif").val(); - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le nom en Français!"; - v_msgEng="Please enter the name in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez indiquer le nom en Anglais!"; - v_msgEng="Please enter the name in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - donnees = 'idTarif='+idTarif+'&libelle='+libelle+'&libelleEng='+libelleEng; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveautarifmedicament/enregistrermodif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - lister_tarif_medicaments(); - } - }); - } -} - - -function lister_tarif_medicaments() -{ - window.location.assign($("#racineWeb" ).val()+"Listetarifmedicament/"); -} - -function supprimer_tarif_medicaments(idTarif) -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveautarifmedicament/supprimer/", - type : 'post', - data: "idTarif="+idTarif, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - lister_tarif_medicaments(); - } - }); - } -} - -function importer_tarif_medicaments(idTarif) -{ - v_msg="En cours!"; - v_msgEng="In progress!"; - alert_ebene(v_msg, v_msgEng); - - // return; - - // window.location.assign($("#racineWeb" ).val()+"Importertarifmedicament/"+idTarif+"/"); -} - -function exporter_modele_tarif_medicament() -{ - $('#div_form_upload').hide(); - - var div_export = $('#div_exporter_tarif'); - - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximportertarifmedicament/exportermodele/", - type: 'POST', - // data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - } - }); -} - -function charger_fichier_modele_tarif_medicament() -{ - $('#div_exporter_tarif').html(""); - - $('#div_form_upload').show(); - - // return; -} - -function importer_modele_tarif_medicament() -{ - etape2=$("#etape2").val(); - - if (etape2 != "1") - { - v_msg="Etape 2 incomplète!"; - v_msgEng="Incomplete step 2!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idTarif=$("#idTarif").val(); - codeTarifMedicament=$("#codeTarifMedicament").val(); - cheminFichier=$("#cheminFichier").val(); - - donnees = 'idTarif='+idTarif+'&codeTarifMedicament='+codeTarifMedicament+'&cheminFichier='+cheminFichier; - - $('#div_form_upload').hide(); - - var div_export = $('#div_exporter_tarif'); - - div_export.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $("#div_erreur_excel").html(""); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximportertarifmedicament/importermodele/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(''); - $("#div_erreur_excel").html(data); - - v_msg="Opération terminée avec succès!"; - v_msgEng="Operation completed successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - div_export.html(''); - - succes_impot_execl=$("#succes_impot_execl").val(); - - if (succes_impot_execl == "1") - { - maj_etape_3_import_medicaments(); - } - } - }); -} - -function change_categorie_college_temp() -{ - codeProduit = $('#codeProduit').val(); - - if($('#codeProduit').val()<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - $('#codeProduit').focus(); - return; - } - - donnees = 'codeProduit='+codeProduit; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangecategorie/changecategorie/", - type: 'POST', - data: donnees, - success: function(data) - { - // $("#div_test_gabarit").html(data); - $("#div_prime_categorie").html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - $plafondAdherent = $('#plafondAdherentInfo').val(); - $plafondBeneficiaire = $('#plafondBeneficiaireInfo').val(); - $('#plafondAdherent').val($plafondAdherent); - $('#plafondBeneficiaire').val($plafondBeneficiaire); - - maj_college(); - } - }); -} - - -function traiter_medicaments_importes() -{ - etape2=$("#etape2").val(); - - if (etape2 != "1") - { - v_msg="Etape 2 incomplète!"; - v_msgEng="Incomplete step 2!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - etape3=$("#etape3").val(); - - if (etape3 != "1") - { - v_msg="Etape 3 incomplète!"; - v_msgEng="Incomplete step 3!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Listeimporttarifmedicament/"); -} - - -function maj_etape_3_import_medicaments() -{ - idTarif=$("#idTarif").val(); - - donnees = 'idTarif='+idTarif; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximportertarifmedicament/majetape/", - type: 'POST', - data: donnees, - success: function(data) - { - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - window.location.assign($("#racineWeb" ).val()+"Listeimporttarifmedicament/"); - } - }); -} - -function retour_importer_tarif_medicaments() -{ - idTarif=$("#idTarif").val(); - - importer_tarif_medicaments(idTarif); -} - -function incorporer_medicaments_inmportes() -{ - nb_ligne_med=$("#nb_ligne_med").val(); - - if (nb_ligne_med==0) - { - v_msg="Rien à importer!"; - v_msgEng="Nothing to import!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous l\'incorporation de cette liste?"; - v_msgEng="Do you confirm the incorporation of this list?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - var div_attente = $('#div_liste_medicament_importe'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximportertarifmedicament/incorporermedicamentsimportes/", - type: 'POST', - // data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - lister_tarif_medicaments(); - } - }); - } -} - -function controle_bornes_primes() -{ - primeFamille = $("#primeFamille").val(); - primeMin = $("#primeMin").val(); - primeMax = $("#primeMax").val(); - - - primeFamille = parseInt(primeFamille); - primeMin = parseInt(primeMin); - primeMax = parseInt(primeMax); - - if((primeMin>0) && (primeFamille0) && (primeFamille>primeMax)) - { - v_msg="Attention, prime maximum catégorie => " + primeMax.toLocaleString(); - v_msgEng="Warning, premium maximum category => " + primeMax.toLocaleString(); - alert_ebene(v_msg, v_msgEng); - - return; - } - -} - -function modifier_produit(idProduit) -{ - window.location.assign($("#racineWeb" ).val()+"Modifierproduit/"+idProduit+"/"); -} - -function supprimer_produit(idProduit) -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveauproduit/supprimer/", - type : 'post', - data: "idProduit="+idProduit, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - retour_liste_produits(); - } - }); - } -} - -function creer_produit() -{ - codeProduit = $("#codeProduit").val(); - - if(codeProduit<=" ") - { - v_msg="Veuillez indiquer un code!"; - v_msgEng="Please enter a code!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProduit").focus(); - return; - } - - libelle = $("#libelle").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le libellé!"; - v_msgEng="Please enter the label!!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - donnees = 'codeProduit='+codeProduit+'&libelle='+libelle; - - primeFamille = $("#primeFamille").val(); - primeIndividu = $("#primeIndividu").val(); - primeMin = $("#primeMin").val(); - primeMax = $("#primeMax").val(); - - donnees += '&primeFamille='+primeFamille; - donnees += '&primeIndividu='+primeIndividu; - donnees += '&primeMin='+primeMin; - donnees += '&primeMax='+primeMax; - - v_msg="Confirmez-vous ce nouveau tarif?"; - v_msgEng="Do you confirm this new rate?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveauproduit/creerproduit/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - retour_liste_produits(); - } - }); - } -} - -function retour_liste_produits() -{ - window.location.assign($("#racineWeb" ).val()+"Produits/"); -} - -function enregistrer_modif_produit() -{ - idProduit = $("#idProduit").val(); - - libelle = $("#libelle").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le libellé!"; - v_msgEng="Please enter the label!!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - donnees = 'idProduit='+idProduit+'&libelle='+libelle; - - primeFamille = $("#primeFamille").val(); - primeIndividu = $("#primeIndividu").val(); - primeMin = $("#primeMin").val(); - primeMax = $("#primeMax").val(); - - donnees += '&primeFamille='+primeFamille; - donnees += '&primeIndividu='+primeIndividu; - donnees += '&primeMin='+primeMin; - donnees += '&primeMax='+primeMax; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveauproduit/enregistrermodif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - retour_liste_produits(); - } - }); - } -} - -function modifier_reseau(idReseau) -{ - window.location.assign($("#racineWeb" ).val()+"Modifierreseausoins/"+idReseau+"/"); -} - -function supprimer_reseau(idReseau) -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveaureseau/supprimer/", - type : 'post', - data: "idReseau="+idReseau, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - retour_liste_reseaus(); - } - }); - } -} - -function creer_reseau() -{ - codeReseau = $("#codeReseau").val(); - - if(codeReseau<=" ") - { - v_msg="Veuillez indiquer un code!"; - v_msgEng="Please enter a code!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeReseau").focus(); - return; - } - - libelle = $("#libelle").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le libellé!"; - v_msgEng="Please enter the label!!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - donnees = 'codeReseau='+codeReseau+'&libelle='+libelle; - - tm = $("#tm").val(); - - donnees += '&tm='+tm; - - v_msg="Confirmez-vous ce nouveau tarif?"; - v_msgEng="Do you confirm this new rate?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveaureseau/creerreseau/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - retour_liste_reseaus(); - } - }); - } -} - -function retour_liste_reseaus() -{ - window.location.assign($("#racineWeb" ).val()+"Reseausoins/"); -} - -function enregistrer_modif_reseaus() -{ - idReseau = $("#idReseau").val(); - - libelle = $("#libelle").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le libellé!"; - v_msgEng="Please enter the label!!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - donnees = 'idReseau='+idReseau+'&libelle='+libelle; - - tm = $("#tm").val(); - - donnees += '&tm='+tm; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveaureseau/enregistrermodif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - retour_liste_reseaus(); - } - }); - } -} - -function afficher_reseau_categorie() -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit; - - var div_attente = $('#div_produitreseau'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxproduitreseau/afficherreseaucategorie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function ajouter_tous_reseaus_produit() -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit; - - v_msg="Attention, cela va rendre tous les réseaux accessibles pour cette catégorie! Confirmez-vous?"; - v_msgEng="Be careful, this will make all networks accessible for this category! Do you confirm?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxproduitreseau/ajoutertousreseauproduit/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_reseau_categorie(); - } - }); - } -} - -function ajouter_un_reseau_produit(codeReseau) -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit+'&codeReseau='+codeReseau; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxproduitreseau/ajouterunreseauproduit/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_reseau_categorie(); - } - }); -} - -function retirer_tous_reseau_produit() -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit; - - v_msg="Attention, cela va vider cette catégorie! Confirmez-vous?"; - v_msgEng="Be careful, this will empty this category! Do you confirm?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxproduitreseau/retirertousreseauproduit/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_reseau_categorie(); - } - }); - } -} - -function maj_tm_produit_reseau(codeReseau, tm) -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit+'&codeReseau='+codeReseau+"&tm="+tm; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxproduitreseau/majtm/", - type: 'POST', - data: donnees, - success: function(data) { - }, - complete: function(data) - { - } - }); -} - -function retirer_un_reseau_produit(codeReseau) -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit+'&codeReseau='+codeReseau; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxproduitreseau/retirerunreseauproduit/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_reseau_categorie(); - } - }); -} - -function afficher_facturation_police() -{ - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'debut='+debut+'&fin='+fin; - - $("#div_page_complet").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_page_complet").html(data); - }, - complete: function() { - } - }); -} - -function select_tous_beneficiaire_a_facturer(p_choix) -{ - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'choix='+p_choix+'&debut='+debut+'&fin='+fin; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/selectionnertoutlignesafacturer/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_facturation_police(); - } - }); -} - -function select_beneficiaire_a_facturer(p_choix, idBeneficiairePrimeTemp) -{ - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'idBeneficiairePrimeTemp='+idBeneficiairePrimeTemp; - donnees += '&choix='+p_choix+'&debut='+debut+'&fin='+fin; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/selectionner/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_entete_prime_a_facture").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function lancer_facturation_police() -{ - nblignes_a_facturer=$("#nblignes_a_facturer").val(); - - if (nblignes_a_facturer=="0") - { - v_msg="Rien à facturer!"; - v_msgEng="Nothing to charge!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette sélection?"; - v_msgEng="Do you confirm this selection?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'debut='+debut+'&fin='+fin; - - $("#div_bouton_selection").html(""); - $("#div_detail_prime_a_facture").html(""); - - $("#div_echeancier").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/initecheancierfacturation/", - type: 'POST', - data: donnees, - success: function(data) - { - }, - error: function(data) - { - }, - complete: function() { - afficherecheancierfacturation_temp(); - } - }); - } -} - -// -function ajax_init_echancier_temp() -{ - $("#div_echeancier_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/getnbecheancier/", - type : 'post', - data: "codeTypeEcheancier="+$("#codeTypeEcheancier").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infonbEcheance").html(data); - }, - complete: function() { - $("#nbEcheance").val( $("#nbEcheance_info").val()); - ajax_maj_echancier_temp(); - } - }); -} - -function ajax_maj_echancier_temp() -{ - codeTypeEcheancier = $("#codeTypeEcheancier").val(); - nbEcheance = $("#nbEcheance").val(); - tauxInteret = $("#tauxInteret").val(); - - donnees = "codeTypeEcheancier="+codeTypeEcheancier+"&nbEcheance="+nbEcheance+"&tauxInteret="+tauxInteret; - - // alert(donnees); - // return; - - $("#div_echeancier_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/majecheancier/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - }, - complete: function() { - afficherecheancierfacturation_temp(); - } - }); -} - -function ajax_maj_date_echancier_temp(idEcheancier, datePaiement) -{ - donnees = "idEcheancier="+idEcheancier+"&datePaiement="+datePaiement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/majdatepaiement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - }, - complete: function() - { - } - }); -} - -function ajax_maj_taux_echancier_temp(idEcheancier, tauxEcheance) -{ - nbEcheance = $("#nbEcheance").val(); - - donnees = "idEcheancier="+idEcheancier+"&tauxEcheance="+tauxEcheance+"&nbEcheance="+nbEcheance; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/majtauxecheance/", - type : 'post', - data: donnees, - error: function(errorData) - { - }, - success: function(data) - { - }, - complete: function() - { - afficherecheancierfacturation_temp(); - } - }); -} - -function ajax_maj_lib_echancier_temp(idEcheancier, libelleEcheance) -{ - donnees = "idEcheancier="+idEcheancier+"&libelleEcheance="+libelleEcheance; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/majlibelle/", - type : 'post', - data: donnees, - error: function(errorData) - { - }, - success: function(data) - { - }, - complete: function() - { - } - }); -} - -function valider_facturation_police() -{ - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'debut='+debut+'&fin='+fin; - - v_msg="Confirmez-vous cet échéancier?"; - v_msgEng="Do you confirm this payment schedule?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/enregistrer/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - v_msg="Facturation terminée avec succès!"; - v_msgEng="Billing successfully completed!"; - alert_ebene(v_msg, v_msgEng); - - afficher_police_id(); - } - }); - } -} - -function afficherecheancierfacturation_temp() -{ - $("#div_echeancier_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/afficherecheancierfacturation/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_echeancier").html(data); - }, - complete: function() - { - $(".datepicker" ).datepicker(); - } - }); -} - -// 29/03/2019 -function requetes_factures_verif_gc() -{ - $('#div_export_a').html(""); - - donnees = ""; - donnees_retour = ""; - - - codeGcAssureur = $("#codeGcAssureur").val(); - if(codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codeGcAssureur=' + codeGcAssureur; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxrequetefactureverifgc/"; - - $.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_verif_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeGcAssureur = $("#codeGcAssureur").val(); - if(codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codeGcAssureur=' + codeGcAssureur; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxrequetefactureverifgcexport/"; - - $.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); - } - }); -} - -// 31/03/2019 => Rapport SP par police dans un meme exercice - -function etat_rapport_sp_exercice() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/"; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - 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_exercice_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"export/"; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function afficher_detail_stat_police_exercice(idPolice, debutSinistre, finSinistre) -{ - $('#div_export_b').html(""); - $("#idPolice").val(idPolice); - $("#debutSinistre").val(debutSinistre); - $("#finSinistre").val(finSinistre); - /* - $("#emailRapport").val(emailRapport); - $("#emailRapport_0").val(emailRapport); - */ - $("#btn_pop_detail").click(); -} - -function charger_detail_stat_police_facture_exercice_pdf() -{ - $('#div_export_b').html(""); - - idPolice = $("#idPolice").val(); - debutSinistre = $("#debutSinistre").val(); - finSinistre = $("#finSinistre").val(); - - donnees = "idPolice="+idPolice+"&debutSinistre="+debutSinistre+"&finSinistre="+finSinistre; - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailrapportspfactureexercicepdf/", - 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_exercice() -{ - $('#div_export_b').html(""); - - idPolice = $("#idPolice").val(); - debutSinistre = $("#debutSinistre").val(); - finSinistre = $("#finSinistre").val(); - - donnees = "idPolice="+idPolice+"&debutSinistre="+debutSinistre+"&finSinistre="+finSinistre; - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailrapportspfactureexercice/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_export_b').html(donnees_retour); - } - }); -} - -function sinistres_a_prime_police() -{ - $("#div_detail_sp").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsppolice/police/", - type: 'POST', - success: function(data) { - $("#div_detail_sp").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function sinistres_a_prime_categorie() -{ - $("#div_detail_sp").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsppolice/categorie/", - type: 'POST', - success: function(data) { - $("#div_detail_sp").html(data); - }, - error: function(data) { - }, - complete: function() { - return; - } - }); -} - -function sinistres_a_prime_college() -{ - $("#div_detail_sp").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsppolice/college/", - type: 'POST', - success: function(data) { - $("#div_detail_sp").html(data); - }, - error: function(data) { - }, - complete: function() { - return; - } - }); -} - -function maj_libelle_college() -{ - libelleCollege = $("#libelleCollege").val(); - - $("#btn_pop_lib_college").click(); -} - -function enregistrer_maj_libelle_college() -{ - libelleCollege = $("#libelleCollege").val(); - - nouvLibelleCollege = $("#nouvLibelleCollege").val(); - - libelleCollege = libelleCollege.trim(); - nouvLibelleCollege = nouvLibelleCollege.trim(); - - if(libelleCollege==nouvLibelleCollege) - { - v_msg="Aucune modification!!"; - v_msgEng="No modification!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(nouvLibelleCollege<=" ") - { - v_msg="Veuillez saisir le nouveau libellé!"; - v_msgEng="Please enter the new label!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous cette modification?"; - v_msgEng="Do you confirm this change?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "nouvLibelleCollege="+nouvLibelleCollege; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmajlibellecollege/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#libelleCollege").val(nouvLibelleCollege); - $("#ancLibelleCollege").val(nouvLibelleCollege); - }, - complete: function() - { - $("#btn_close_pop_maj_libelle").click(); - } - }); - } -} - -// 06/04/2019 -function changer_langue() -{ - codeLangue = $("#codeLangue").val(); - - v_msg="Confirmez-vous le changement de langue?"; - v_msgEng="Do you confirm the language change?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxchangerlangue/changerlangue/", - type : 'post', - // data: donnees, - error: function(errorData) - { - }, - success: function(data) - { - // $("#div_test_gabarit").html(data); - }, - complete: function() - { - window.location.assign($("#racineWeb" ).val()+"Connexion/deconnecter/"); - } - }); - } -} - -function envoyersms(p_destinataires, p_message, creation_message) -{ - if(creation_message=="1") - { - envoyer_messagerie(p_message, "0"); - } - - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return; - } - - if(p_destinataires.length<5) - { - /* - v_msg="SMS => Pas de destintaire!"; - v_msgEng="SMS => No recipient!"; - - alert_ebene(v_msg, v_msgEng); - */ - - return; - } - - fournisseurSms = $("#fournisseurSms").val(); - - if (fournisseurSms<=" ") - { - v_msg="Fournisseur de SMS non défini!"; - v_msgEng="SMS provider not defined!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if(fournisseurSms=="esicia") - { - ajouter_sms_attente(p_destinataires, p_message); - return; - } - else - if(fournisseurSms=="blive") - { - ajouter_sms_attente(p_destinataires, p_message); - return; - } - else - if(fournisseurSms=="hooza") - { - ajouter_sms_attente(p_destinataires, p_message); - return; - } - else - { - v_msg=fournisseurSms+" => Fournisseur de SMS inconnu!"; - v_msgEng=fournisseurSms+" => Unknown SMS Provider!"; - alert_ebene(v_msg, v_msgEng); - return; - } -} - -function ajouter_sms_attente(p_destinataires, p_message) -{ - donnees = "destinataires="+p_destinataires+"&message="+p_message; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsmsattente/ajouter/", - type: 'POST', - data: donnees, - success: function(data) - { - }, - error: function(errdata) - { - }, - complete: function() - { - } - }); -} - -function ajouter_sms_attente_singleton(p_destinataires, p_message) -{ - donnees = "destinataires="+p_destinataires+"&message="+p_message; - - var addr = p_destinataires.split(","); - - addr.forEach(function(element) - { - p_dest = element; - - if(p_dest.length>4) - { - donnees = "destinataires="+p_dest+"&message="+p_message; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsmsattente/ajouter/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); - } - else - { - v_msg=p_dest+" => Mauvais format!"; - v_msgEng=p_dest+" => wrong phone format!"; - alert_ebene(v_msg, v_msgEng); - } - }); -} - -function tester_disponibiliter_sms() -{ - p_destinataires = $("#destinataires").val(); - if (p_destinataires<=" ") - { - v_msg="Veuillez saisir un destinataire!"; - v_msgEng="Please enter a recipient!"; - alert_ebene(v_msg, v_msgEng); - - $("#destinataires").focus(); - return; - } - - p_message = ""; - - fournisseurSms = $("#fournisseurSms").val(); - - if (fournisseurSms<=" ") - { - v_msg="Fournisseur de SMS non défini!"; - v_msgEng="SMS provider not defined!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - if(fournisseurSms=="esicia") - { - p_message = "Fournisseur : esicia "; - } - else - if(fournisseurSms=="blive") - { - p_message = "Fournisseur : blive "; - } - else - if(fournisseurSms=="hooza") - { - p_message = "Fournisseur : hooza "; - } - else - if(fournisseurSms=="skysms") - { - p_message = "Fournisseur : skysms "; - } - else - { - v_msg=fournisseurSms+" => Fournisseur de SMS inconnu!"; - v_msgEng=fournisseurSms+" => Unknown SMS Provider!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - // p_destinataires = "25761198584"; - // p_destinataires = "25761198584,25761198584"; - // p_destinataires = "25761198584,25769499899,25779969130,25779841895"; - // p_destinataires = "25769499899,25779969130,25779841895"; - // p_destinataires = "25761198584"; - - - donnees = "destinataires="+p_destinataires+"&message="+p_message+"&fournisseurSms="+fournisseurSms; - - alert(donnees); - // return; - - $("#div_test_gabarit").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxtesterdisponiblitesms/envoyerlesms/", - type: 'POST', - data: donnees, - success: function(data) - { - alert("success "+data); - $('#div_test_gabarit').html(data); - }, - error: function(errdata) - { - alert("Error : "+errdata); - $('#div_test_gabarit').html(errdata); - }, - complete: function() - { - v_msg="Opération terminée avec succès!"; - v_msgEng="Operation completed successfully!"; - alert_ebene(v_msg, v_msgEng); - } - }); -} - -function ajouter_destinataire_sms_adherent(p_destinataires) -{ - envoismsactif = $("#envoismsactif").val(); - if(envoismsactif=="0") - { - return p_destinataires; - } - - smsAssure = $("#smsAssure").val(); - if(smsAssure=="0") - { - return p_destinataires; - } - - tel_adh = $("#telephonePortableAdherent").val(); - - if(tel_adh.length>4) - { - return p_destinataires+","+tel_adh; - } - - return p_destinataires; -} - -function ajouter_mail_attente(emailAdherent, p_objet_email_adh, p_messageemail_adh) -{ - donnees = "email="+emailAdherent+"&objet="+p_objet_email_adh+"&message="+p_messageemail_adh; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxsmailadhattente/ajouter/", - type: 'POST', - data: donnees, - success: function(data) - { - }, - error: function(errdata) - { - }, - complete: function() - { - } - }); -} - -function maj_acess_facturation() -{ - alert("maj_acess_facturation"); - return; - /* - nv_access=$("#nv_access").val(); - if(isNaN(nv_access)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#nv_access").val("0"); - $("#nv_access").focus(); - return; - } - - if(nv_access<"0") - { - v_msg="Veuillez saisir une valeur!"; - v_msgEng="Please enter a value!"; - alert_ebene(v_msg, v_msgEng); - - $("#nv_access").val("0"); - $("#nv_access").focus(); - return; - } - - if(nv_access==0) - { - v_msg="Attention! Confirmez-vous les accessoires à zéro?"; - v_msgEng="Warning! Do you confirm the accessories at zero?"; - - if(!confirm_ebene(v_msg, v_msgEng)) - { - $("#nv_access").focus(); - return; - } - } - - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'fraisCarte='+nv_access+'&debut='+debut+'&fin='+fin; - - $("#div_page_complet").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/majaccessoiresfacturation/", - type: 'POST', - data: donnees, - success: function(data) - { - $("#btn_close_pmaj_access").click(); - }, - error: function(data) { - }, - complete: function() { - afficher_facturation_police(); - } - }); - */ -} - -function maj_cartes_facturation() -{ - nv_access=$("#nv_access").val(); - if(isNaN(nv_access)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#nv_access").val("0"); - $("#nv_access").focus(); - return; - } - - if(nv_access<"0") - { - v_msg="Veuillez saisir une valeur!"; - v_msgEng="Please enter a value!"; - alert_ebene(v_msg, v_msgEng); - - $("#nv_access").val("0"); - $("#nv_access").focus(); - return; - } - - if(nv_access==0) - { - v_msg="Attention! Confirmez-vous les accessoires à zéro?"; - v_msgEng="Warning! Do you confirm the accessories at zero?"; - - if(!confirm_ebene(v_msg, v_msgEng)) - { - $("#nv_access").focus(); - return; - } - } - - debut=$("#debut").val(); - fin=$("#fin").val(); - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Reset the counts. Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'fraisCarte='+nv_access+'&debut='+debut+'&fin='+fin; - - // alert(donnees); - // return; - - $("#div_page_complet").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/majaccessoiresfacturation/", - type: 'POST', - data: donnees, - success: function(data) - { - $("#btn_close_pmaj_access").click(); - }, - error: function(data) { - }, - complete: function() { - afficher_facturation_police(); - } - }); - } - -} - - -function maj_prime_base_facturation() -{ - idCollege=$("#idCollege").val(); - if(idCollege<=" ") - { - v_msg="Veuillez sélectionner un collège!"; - v_msgEng="Please select a college!"; - alert_ebene(v_msg, v_msgEng); - - $("#idCollege").focus(); - - return; - } - - old_primeNette=$("#old_primeNette").val(); - if(isNaN(old_primeNette)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#old_primeNette").val("0"); - $("#old_primeNette").focus(); - return; - } - - if(old_primeNette<"0") - { - v_msg="Veuillez saisir une valeur!"; - v_msgEng="Please enter a value!"; - alert_ebene(v_msg, v_msgEng); - - $("#old_primeNette").val("0"); - $("#old_primeNette").focus(); - return; - } - - - if(old_primeNette==0) - { - v_msg="Attention! Confirmez-vous la mise à jour des anciennes primes nulles?"; - v_msgEng="Warning! Do you confirm the update of old zero premium?"; - - if(!confirm_ebene(v_msg, v_msgEng)) - { - $("#old_primeNette").focus(); - return; - } - } - - // - - nv_primeNette=$("#nv_primeNette").val(); - if(isNaN(nv_primeNette)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#nv_primeNette").val("0"); - $("#nv_primeNette").focus(); - return; - } - - if(nv_primeNette<"0") - { - v_msg="Veuillez saisir une valeur!"; - v_msgEng="Please enter a value!"; - alert_ebene(v_msg, v_msgEng); - - $("#nv_primeNette").val("0"); - $("#nv_primeNette").focus(); - return; - } - - if(nv_primeNette==0) - { - v_msg="Attention! Confirmez-vous les primes à zéro?"; - v_msgEng="Warning! Do you confirm the premium at zero?"; - - if(!confirm_ebene(v_msg, v_msgEng)) - { - $("#nv_primeNette").focus(); - return; - } - } - - if(nv_primeNette==old_primeNette) - { - v_msg="Veuillez revoir vos primes!"; - v_msgEng="Please review your premiums!"; - - alert_ebene(v_msg, v_msgEng); - - return; - } - - debut=$("#debut").val(); - fin=$("#fin").val(); - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Reset the counts. Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idCollege='+idCollege+'&old_primeNette='+old_primeNette+'&nv_primeNette='+nv_primeNette+'&debut='+debut+'&fin='+fin; - - $("#div_page_complet").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/majprimesfacturation/", - type: 'POST', - data: donnees, - success: function(data) - { - $("#btn_close_pmaj_prime").click(); - }, - error: function(data) { - }, - complete: function() { - afficher_facturation_police(); - } - }); - } -} - -function desactiver_click_droit() -{ - if (document.addEventListener) { - document.addEventListener('contextmenu', function (e) { - e.preventDefault(); - }, false); - } else { - document.attachEvent('oncontextmenu', function () { - window.event.returnValue = false; - }); - } -} - -function requetes_factures(p_chrono) -{ - $('#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(); - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codePrestataire=' + codePrestataire; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - donnees += '&chrono=' + p_chrono; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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 ajouter_tous_medecins_prestataire() -{ - codePrestataire=$("#codePrestataire").val(); - - if (codePrestataire<=" ") - { - v_msg="Veuillez sélectionner un prestataire!"; - v_msgEng="Please select a provider!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codePrestataire='+codePrestataire; - - v_msg="Attention, cela va ajouter tous les médecins disponibles pour ce prestataire! Confirmez-vous?"; - v_msgEng="Be careful, this will add all the doctors available for this provider! Do you confirm?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - $("#div_medecins_prestataire").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmedecinsprestataire/ajoutertousmedecinsprestataire/", - type: 'POST', - data: donnees, - success: function(data) { - $('#div_medecins_prestataire').html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - - -function retirer_tous_medecins_prestataire() -{ - codePrestataire=$("#codePrestataire").val(); - - if (codePrestataire<=" ") - { - v_msg="Veuillez sélectionner un prestataire!"; - v_msgEng="Please select a provider!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codePrestataire='+codePrestataire; - - v_msg="Attention, cela va vider ce prestataire de tous ces médecins! Confirmez-vous?"; - v_msgEng="Be careful, this will empty this provider of all these doctors! Do you confirm?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - $("#div_medecins_prestataire").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmedecinsprestataire/retirertousmedecinsprestataire/", - type: 'POST', - data: donnees, - success: function(data) - { - $('#div_medecins_prestataire').html(data); - }, - error: function(data) - { - }, - complete: function() - { - } - }); - } -} - -function ajouter_un_medecin_prestataire(codeMedecin) -{ - codePrestataire=$("#codePrestataire").val(); - - if (codePrestataire<=" ") - { - v_msg="Veuillez sélectionner un prestataire!"; - v_msgEng="Please select a provider!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codePrestataire='+codePrestataire+'&codeMedecin='+codeMedecin; - - $("#div_medecins_prestataire").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmedecinsprestataire/ajouterunmedecinprestataire/", - type: 'POST', - data: donnees, - success: function(data) { - $('#div_medecins_prestataire').html(data); - }, - error: function(data) { - }, - complete: function() - { - } - }); -} - -function retirer_un_medecin_prestataire(codeMedecin) -{ - codePrestataire=$("#codePrestataire").val(); - - if (codePrestataire<=" ") - { - v_msg="Veuillez sélectionner un prestataire!"; - v_msgEng="Please select a provider!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codePrestataire='+codePrestataire+'&codeMedecin='+codeMedecin; - - $("#div_medecins_prestataire").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmedecinsprestataire/retirerunmedecinprestataire/", - type: 'POST', - data: donnees, - success: function(data) { - $('#div_medecins_prestataire').html(data); - }, - error: function(data) { - }, - complete: function() - { - } - }); -} - - -function enregistrer_new_notes() -{ - notesNew = $("#notesNew").val(); - notesNew = notesNew.trim(); - - if (notesNew<=" ") - { - v_msg="Veuillez saisir la note!"; - v_msgEng="Please enter the note!"; - alert_ebene(v_msg, v_msgEng); - - $("#notesNew").focus(); - return; - } - - donnees = 'notesNew='+notesNew; - - v_msg="Confirmez-vous cette note?"; - v_msgEng="Do you confirm this note?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/creernote/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#btn_pop_note_new_quit").click(); - }, - complete: function() { - afficher_notes_feuille(); - } - }); - } -} - -function afficher_notes_feuille() -{ - $("#div_notes").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_notes").html(donnees_retour); - } - }); -} - -function initiernotesfeuille() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesfeuillemaladie/nouvellenote/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_note_new").html(data); - }, - complete: function() { - $("#btn_pop_note_new").click(); - } - }); -} - - -function afficher_medecins_prestataire() -{ - codePrestataire=$("#codePrestataire").val(); - - if (codePrestataire<=" ") - { - v_msg="Veuillez sélectionner un prestataire!"; - v_msgEng="Please select a provider!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codePrestataire='+codePrestataire; - - $("#div_medecins_prestataire").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmedecinsprestataire/ajouterunmedecinprestataire/", - type: 'POST', - data: donnees, - success: function(data) { - $('#div_medecins_prestataire').html(data); - }, - error: function(data) { - }, - complete: function() - { - } - }); -} - - -function initier_gc_frais_gestion() -{ - codeGcAssureur=$("#codeGcAssureur").val(); - codeExercice=$("#codeExercice").val(); - codeMois=$("#codeMois").val(); - - if (codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - 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 = 'codeGcAssureur='+codeGcAssureur+'&codeExercice='+codeExercice+'&codeMois='+codeMois; - - var div_wait = $('#div_liste_entete_gc_frais_gestion'); - div_wait.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcfraisgestion/initiergcfraisgestion/", - 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) - { - affichergcfraisgestion(); - } - else - { - consultergcfraisgestion(); - } - } - }); -} - -function affichergcfraisgestion() -{ - window.location.assign($("#racineWeb" ).val()+"Gcfraisgestion/"); -} - -function re_affichergcfraisgestion() -{ - $("#detail_reglement").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - affichergcfraisgestion(); -} - -function rechargergcfraisgestion() -{ - $("#div_detail_fraisgestion").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcfraisgestion/rechargergcfraisgestion/", - type : 'post', - error: function(errorData) { - }, - success: function(data) - { - $("#div_detail_fraisgestion").html(''); - - v_msg="Rechargement terminé avec succès!"; - v_msgEng="Reloading completed successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() - { - afficher_detail_gcfraisgestion(); - } - }); -} - -function consultergcfraisgestion() -{ -} - -function afficher_detail_gcfraisgestion() -{ - var div_wait = $('#div_detail_fraisgestion'); - div_wait.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcfraisgestion/affichergcfraisgestion/", - type : 'post', - error: function(errorData) { - }, - success: function(data) - { - $("#div_fraisgestion").html(data); - }, - complete: function() - { - } - }); -} - -function cumul_gc_frais_gestion_par_client() -{ - var div_wait = $('#div_detail_fraisgestion'); - div_wait.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcfraisgestion/affichergcfraisgestioncumul/", - type : 'post', - error: function(errorData) { - }, - success: function(data) - { - $("#div_fraisgestion").html(data); - }, - complete: function() - { - } - }); -} - -function lister_entete_gc_frais_gestion() -{ - codeGcAssureur=$("#codeGcAssureur").val(); - codeExercice=$("#codeExercice").val(); - codeMois=$("#codeMois").val(); - - if (codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - if (codeExercice<=" ") - { - v_msg="Veuillez sélectionner un exercice!"; - v_msgEng="Please select an exercise!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeExercice").focus(); - return; - } - - donnees = 'codeGcAssureur='+codeGcAssureur+'&codeExercice='+codeExercice; - - var div_wait = $('#div_liste_entete_gc_frais_gestion'); - div_wait.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcfraisgestion/listeentetegcfraisgestion/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - div_wait.html(data); - }, - complete: function() - { - } - }); -} - -function initier_gc_frais_gestion_sel(codeMois, regle) -{ - codeGcAssureur=$("#codeGcAssureur").val(); - codeExercice=$("#codeExercice").val(); - - if (codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - 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); - - return; - } - - donnees = 'codeGcAssureur='+codeGcAssureur+'&codeExercice='+codeExercice+'&codeMois='+codeMois; - - var div_wait = $('#div_liste_entete_gc_frais_gestion'); - div_wait.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcfraisgestion/initiergcfraisgestion/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - }, - complete: function() - { - if(regle==0) - { - affichergcfraisgestion(); - } - else - { - consultergcfraisgestion(); - } - } - }); -} - -function recharger_frais_gestion_gc_non_sel() -{ - $("#detail_facture").html(''); - - codeGcAssureur = $("#codeGcAssureur").val(); - - donnees = 'codeGcAssureur=' + codeGcAssureur; - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcnonsel/"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function reafficher_frais_gestion_gc_non_sel() -{ - $("#detail_facture").html(''); - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcnonsel/reafficher/"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function valider_selection_frais_gestion_gc() -{ - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcnonsel/validerselection"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement_gc").html(data); - // $(".datepicker" ).datepicker(); - }, - complete: function() { - $("#detail_facture").html(''); - - v_msg="Validation terminée avec succès!"; - v_msgEng="Validation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - reafficher_frais_gestion_gc_non_sel(); - } - }); -} - -function selectionner_frais_gestion_gc_tout(choix) -{ - donnees = 'choix='+choix; - - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcnonsel/selectionnertout/"; - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - reafficher_frais_gestion_gc_non_sel(); - } - }); -} - - -function selectionner_frais_gestion_gc(idCarteTemp, choix) -{ - donnees = 'idCarteTemp='+idCarteTemp+'&choix='+choix; - - if(choix==0) - { - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcnonsel/deselectionner/"; - } - else - { - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcnonsel/selectionner/"; - } - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function recharger_frais_gestion_gc_sel() -{ - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcsel/"; - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - } - }); -} - -function reafficher_frais_gestion_gc_sel() -{ - $("#detail_facture").html(''); - - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcsel/reafficher/"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#detail_facture").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function valider_selection_frais_gestion_gc_sel() -{ - $("#detail_facture").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcsel/validerselection"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#reglement_gc").html(data); - // $(".datepicker" ).datepicker(); - }, - complete: function() { - $("#detail_facture").html(''); - - v_msg="Validation terminée avec succès!"; - v_msgEng="Validation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - reafficher_frais_gestion_gc_sel(); - } - }); -} - -function selectionner_frais_gestion_sel_gc(idCarteTemp, choix) -{ - donnees = 'idCarteTemp='+idCarteTemp+'&choix='+choix; - - if(choix==0) - { - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcsel/deselectionner/"; - } - else - { - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcsel/selectionner/"; - } - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function selectionner_frais_gestion_sel_gc_tout(choix) -{ - donnees = 'choix='+choix; - - v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcsel/selectionnertout/"; - - $.ajax({ - url: v_url, - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - reafficher_frais_gestion_gc_sel(); - } - }); -} - -function charger_frais_gestion_mois_pdf() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfraisgestiongcpdf/", - - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function charger_frais_gestion_mois_xls() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfraisgestiongcxls/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function charger_frais_gestion_souscripteur_pdf() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfraisgestiongcsouscripteurpdf/", - - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function charger_frais_gestion_souscripteur_xls() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfraisgestiongcsouscripteurxls/", - - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - - -function charger_frais_gestion_detail_pdf() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfraisgestiongcdetailpdf/", - - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function charger_frais_gestion_detail_xls() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfraisgestiongcdetailxls/", - - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function charger_synthese_gc_pdf() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - // url: $("#racineWeb").val()+"Ajaxdetailfraisgestiongcpdf/", - url: $("#racineWeb").val()+"Ajaxsynthsegcpdf/", - - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - -function charger_synthese_gc_xls() -{ -} - -function remplacer_adherent() -{ - nbAdh = $("#nbAdh_C").val(); - codeTypeContrat = $("#codeTypeContrat_C").val(); - - if ( (codeTypeContrat!="G") && (nbAdh>0) ) - { - v_msg="Ce n\'est pas une police GROUPE!"; - v_msgEng="This is not a GROUP policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#idAdherent_C" ).val()<= " ") - { - v_msg="Veuillez sélectionner une famille!"; - v_msgEng="Please select a family!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - remplacementAdherent=$("#remplacementAdherent").val(); - if (remplacementAdherent!="1") - { - v_msg="Remplacement de famille non actif pour cette police!"; - v_msgEng="Family replacement inactive for this policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - remplace=$("#remplace").val(); - remplacant=$("#remplacant").val(); - - if (remplacant=="1") - { - if (remplace=="1") - { - v_msg="Famille déjà remplacée!"; - v_msgEng="Family already replaced!"; - alert_ebene(v_msg, v_msgEng); - - consulter_remplacement_adherent(); - } - else - { - v_msg="Cette famille en a déjà remplacé une autre, confirmez-vous son remplacement à son tour?"; - v_msgEng="This family has already replaced another, do you confirm its replacement in turn?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - fiche_remplacer_adherent(); - } - else - { - consulter_remplacant_adherent(); - } - } - } - else - if (remplace=="1") - { - v_msg="Famille déjà remplacée!"; - v_msgEng="Family already replaced!"; - alert_ebene(v_msg, v_msgEng); - - consulter_remplacement_adherent(); - } - else - { - fiche_remplacer_adherent(); - // window.location.assign($("#racineWeb" ).val()+"Remplaceradherent/"); - } -} - -function init_remplacement_adherent() -{ - dateSortieAdh = $("#dateSortieAdh").datepicker("getDate"); - dateRemplacement = $("#dateRemplacement").datepicker("getDate"); - - dateEffetPolice = $("#dateEffetPolice_C").val(); - - dateEffetAdherent = $("#dateEffetAdherent").val(); - - dateEcheancePolice = $("#dateEcheancePolice_C").val(); - - var td0 = new Date(dateEffetAdherent); - var td1 = new Date(dateSortieAdh); - var td11 = new Date(dateRemplacement); - var td2 = new Date(dateEcheancePolice); - - dt0=Math.round(Date.parse(td0)/(1000*3600*24)); - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dt11=Math.round(Date.parse(td11)/(1000*3600*24)); - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); - - if (td11<=td1) - { - v_msg="Attention! Veuiilez revoir vos dates!"; - v_msgEng="Warning! Please review your dates!"; - alert_ebene(v_msg, v_msgEng); - return false; - } - - if (dt1>dt2 || dt1"2000-01-01") - { - var tdd = new Date(dateSortieAdherent); - dtd=Math.round(Date.parse(tdd)/(1000*3600*24)); - - if (dt1>dtd) - { - v_msg="Attention! cette personne n'est pas couverte à cette date!"; - v_msgEng="Warning! This person is not valid on this date!"; - alert_ebene(v_msg, v_msgEng); - return false; - } - } - */ - - etatRetrait = $("#etatRetrait").val(); - dateRetrait = $("#dateRetrait").val(); - ristourneRetrait = $("#ristourneRetrait").val(); - ristourneRetrait = parseInt(ristourneRetrait); - - if(etatRetrait=="R" && ristourneRetrait<0) - { - v_msg="Attention! cette personne a été retirée avec une ristourne!"; - v_msgEng=" Warning! this person was withdrawn with premium!"; - alert_ebene(v_msg, v_msgEng); - return false; - } - - motifavenant=$("#motifavenant").val(); - - if ($("#motifavenant").val()<" ") - { - v_msg="Veuillez fournir le motif!"; - v_msgEng="Please provide the reason"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - dateS = $("#dateSortieAdh").val(); - dateR = $("#dateRemplacement").val(); - - fraisCarte = $("#fraisCarte").val(); - - donnees = 'dateSortie='+dateS+'&dateRemplacement='+dateR+'&motifavenant='+motifavenant+'&fraisCarte='+fraisCarte; - - $("#div_remplacement_adherent").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxremplaceradherent/init/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#div_remplacement_adherent").html(data); - }, - complete: function() { - $(".datepicker" ).datepicker(); - } - }); -} - -function enregistrer_remplacement_adherent() -{ - nom = $("#nom").val(); - if ($("#nom").val()<" ") - { - v_msg="Veuillez saisir le nom de famille!"; - v_msgEng="Please enter the last name!"; - alert_ebene(v_msg, v_msgEng); - - $("#nom").focus(); - return; - } - - prenoms = $("#prenoms").val(); - if ($("#prenoms").val()<" ") - { - v_msg="Veuillez saisir le prénom!"; - v_msgEng="Please enter the first name!"; - alert_ebene(v_msg, v_msgEng); - - $("#prenoms").focus(); - return; - } - - codeNaturePiece = $("#codeNaturePiece").val(); - if ($("#codeNaturePiece").val()<" ") - { - v_msg="Veuillez saisir la nature de pièce d\'identité!"; - v_msgEng="Please enter the nature of ID!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeNaturePiece").focus(); - return; - } - - numeroPiece = $("#numeroPiece").val(); - if ($("#numeroPiece").val()<" ") - { - v_msg="Veuillez saisir le No de la pièce d\'identité!"; - v_msgEng="Please enter the ID number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroPiece").focus(); - return; - } - - sexe = $("#sexe").val(); - if ($("#sexe").val()<" ") - { - v_msg="Veuillez saisir le sexe!"; - v_msgEng="Please enter the sex!"; - alert_ebene(v_msg, v_msgEng); - - $("#sexe").focus(); - return; - } - - dateNaissance = $("#dateNaissance").val(); - if ($("#dateNaissance").val()<" ") - { - v_msg="Veuillez saisir la date de naissance!"; - v_msgEng="Please enter the date of birth!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateNaissance").focus(); - return; - } - - codeGroupeSanguin = $("#codeGroupeSanguin").val(); - if ($("#codeGroupeSanguin").val()<" ") - { - v_msg="Veuillez saisir le groupe sanguin!"; - v_msgEng="Please enter the blood type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGroupeSanguin").focus(); - return; - } - - codeSituationFamille = $("#codeSituationFamille").val(); - if ($("#codeSituationFamille").val()<" ") - { - v_msg="Veuillez saisir la situation familiale!"; - v_msgEng="Please enter the family situation!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeSituationFamille").focus(); - return; - } - - nombreEnfants = $("#nombreEnfants").val(); - adresseGeo = $("#adresseGeo").val(); - adressePostale = $("#adressePostale").val(); - - codePays = $("#codePays").val(); - if ($("#codePays").val()<" ") - { - v_msg="Veuillez indiquer le pays!"; - v_msgEng="Please indicate the country!"; - alert_ebene(v_msg, v_msgEng); - - $("#codePays").focus(); - return; - } - - telephonFixe = $("#telephonFixe").val(); - telephonePortable = $("#telephonePortable").val(); - email = $("#email").val(); - - fraisCarte = $("#fraisCarte").val(); - - donnees = 'nom='+nom+'&prenoms='+prenoms+'&codeNaturePiece='+codeNaturePiece; - - donnees += '&numeroPiece='+numeroPiece+'&sexe='+sexe+'&dateNaissance='+dateNaissance; - - donnees += '&codeGroupeSanguin='+codeGroupeSanguin+'&codeSituationFamille='+codeSituationFamille+'&nombreEnfants='+nombreEnfants; - - donnees += '&adresseGeo='+adresseGeo+'&adressePostale='+adressePostale+'&codePays='+codePays; - - donnees += '&telephonFixe='+telephonFixe+'&telephonePortable='+telephonePortable+'&email='+email+'&fraisCarte='+fraisCarte; - - v_msg="Confirmez-vous le remplacement de famille?"; - v_msgEng="Do you confirm family replacement?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $("#div_remplacement_adherent").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxremplaceradherent/enregistrerremplacementadherent/", - 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); - - consulter_remplacement_adherent(); - } - }); - } -} - -function consulter_remplacement_adherent() -{ - idAdherent = $("#idAdherent_C" ).val(); - - if (idAdherent>"0") - { - window.location.assign($("#racineWeb" ).val()+"Remplaceradherentcons/"); - } -} - -function consulter_remplacant_adherent() -{ - idAdherent = $("#idAdherent_C" ).val(); - - if (idAdherent>"0") - { - window.location.assign($("#racineWeb" ).val()+"Remplaceradherentcons/remplacant/"); - } -} - - -function fiche_remplacer_adherent() -{ - 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()+"Remplaceradherent/"); -} - -function ajaxListerVilleConsultation() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxville/consultation/", - type : 'post', - data: "codePays="+$("#codePays").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listeville").html(data); - }, - complete: function() { - } - }); -} - -function ajaxListerLocaliteConsultation() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlocalite/consultation/", - type : 'post', - data: "codePays="+$("#codePays").val()+"&codeVille="+$("#codeVille").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listelocalite").html(data); - } - }); -} - -function imprimer_feuille_maladie() -{ - /* - - facture=$("#facture").val(); - - if (facture!=1) - { - v_msg="Pas encore facturée!"; - v_msgEng="Not yet charged!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - */ - - donnees_retour = ""; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerfeuillemaladie/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_export_a").html(donnees_retour); - $("#btn_imprimer_feuille_maladie").click(); - } - }); -} - -function enregistrer_modif_parametres_prod() -{ - idSocieteuser = $("#idSocieteuser").val(); - donnees = 'idSocieteuser='+idSocieteuser; - - spMax = $("#spMax").val(); - fraisCarteAN = $("#fraisCarteAN").val(); - donnees += '&spMax='+spMax+'&fraisCarteAN='+fraisCarteAN; - - fraisCarteREN = $("#fraisCarteREN").val(); - fraisCarteImp = $("#fraisCarteImp").val(); - spAlertAdherent = $("#spAlertAdherent").val(); - donnees += '&fraisCarteREN='+fraisCarteREN+'&fraisCarteImp='+fraisCarteImp+'&spAlertAdherent='+spAlertAdherent; - - tauxRistourne = $("#tauxRistourne").val(); - seuilRistourne = $("#seuilRistourne").val(); - donnees += '&tauxRistourne='+tauxRistourne+'&seuilRistourne='+seuilRistourne; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparametresgeneraux/enregistrermodifprod/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_autres_parametresgeneraux(); - } - }); -} - -function afficher_autres_parametresgeneraux() -{ - window.location.assign($("#racineWeb" ).val()+"Autresparametresgeneraux/"); -} - -function controle_numerique_new(idControle, oldValue) -{ - controle = document.getElementById(idControle); - - valeur = controle.value; - - if(isNaN(valeur)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - controle.value=oldValue; - controle.focus(); - return false; - } - return true; -} - -function enregistrer_modif_parametres_sin() -{ - idSocieteuser = $("#idSocieteuser").val(); - donnees = 'idSocieteuser='+idSocieteuser; - - accesAjoutPh = $("#s_accesAjoutPh").val(); - ajoutPrescription = $("#s_ajoutPrescription").val(); - donnees += '&accesAjoutPh='+accesAjoutPh+'&ajoutPrescription='+ajoutPrescription; - - ajoutPrescriptionExam = $("#s_ajoutPrescriptionExam").val(); - envoismsactif = $("#s_envoismsactif").val(); - donnees += '&ajoutPrescriptionExam='+ajoutPrescriptionExam+'&envoismsactif='+envoismsactif; - - smsAssure = $("#s_smsAssure").val(); - smsmParFacture = $("#s_smsmParFacture").val(); - donnees += '&smsAssure='+smsAssure+'&smsmParFacture='+smsmParFacture; - - emailParFacture = $("#s_emailParFacture").val(); - copieSmsAssure = $("#s_copieSmsAssure").val(); - donnees += '&emailParFacture='+emailParFacture+'&copieSmsAssure='+copieSmsAssure; - - filtreMedecin = $("#s_filtreMedecin").val(); - nbMedicamentMax = $("#s_nbMedicamentMax").val(); - donnees += '&filtreMedecin='+filtreMedecin+'&nbMedicamentMax='+nbMedicamentMax; - - seuilAlerteActif = $("#s_seuilAlerteActif").val(); - donnees += '&seuilAlerteActif='+seuilAlerteActif; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparametresgeneraux/enregistrermodifsin/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - v_msg="Mise à jour effectuée avec succès!"; - v_msgEng="Update done successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() - { - afficher_autres_parametresgeneraux(); - } - }); - } -} - -function maj_duree_vie_bon(idTypebon, dureeVie) -{ - donnees = 'idTypebon='+idTypebon+'&dureeVie='+dureeVie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamdureeviebon/majdureevie/", - type: 'POST', - data: donnees, - success: function(data) { - }, - complete: function(data) - { - } - }); -} - -function afficher_garantie_produit_cons() -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit; - - var div_attente = $('#div_garantieproduit'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamseuilalerte/affichergarantieproduitcons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function afficher_garantie_produit() -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit; - - var div_attente = $('#div_garantieproduit'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamseuilalerte/affichergarantieproduit/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function ajouter_tous_garantie_produit() -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamseuilalerte/ajoutertousgarantieproduit/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_garantie_produit(); - } - }); - } -} - -function retirer_tous_garantie_produit() -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamseuilalerte/retirertousgarantieproduit/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_garantie_produit(); - } - }); - } -} - -function retirer_un_garantie_produit(id_garantie_produit) -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit+'&idGarantieProduit='+id_garantie_produit; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamseuilalerte/retirerungarantieproduit/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_garantie_produit(); - } - }); -} - -function ajouter_un_garantie_produit(codeGarantie) -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit+'&codeGarantie='+codeGarantie; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamseuilalerte/ajouterungarantieproduit/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_garantie_produit(); - } - }); -} - -function maj_taux_seuil_alerte_garantie(id_garantie_produit, tauxSeuilAlerte) -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProduit='+codeProduit+'&idGarantieProduit='+id_garantie_produit+"&tauxSeuilAlerte="+tauxSeuilAlerte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamseuilalerte/majtauxseuilalertegarantie/", - type: 'POST', - data: donnees, - success: function(data) { - }, - complete: function(data) - { - } - }); -} - -function maj_seuil_alerte_garantie(id_garantie_produit, seuilAlerte) -{ - codeProduit=$("#codeProduit").val(); - - if (codeProduit<=" ") - { - v_msg="Veuillez sélectionner une catégorie!"; - v_msgEng="Please select a category!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - - donnees = 'codeProduit='+codeProduit+'&idGarantieProduit='+id_garantie_produit+"&seuilAlerte="+seuilAlerte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamseuilalerte/majseuilalertegarantie/", - type: 'POST', - data: donnees, - success: function(data) { - }, - complete: function(data) - { - } - }); -} - -// - -function requetes_synthese_consommation_police() -{ - v_url = $("#racineWeb").val()+"Ajaxsyntheseconsopolice/"; - - $("#div_detail_exp").html(''); - - $("#div_detail_sp").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - error: function(errorData) - { - }, - success: function(data) - { - donnees_retour = data; - }, - complete: function() - { - $("#div_detail_sp").html(donnees_retour); - } - }); -} - - -function requetes_synthese_consommation_police_export() -{ - v_url = $("#racineWeb").val()+"Ajaxsyntheseconsopolice/exportxls/"; - - $("#div_detail_exp").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - error: function(errorData) - { - }, - success: function(data) - { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_exp').html(donnees_retour); - } - }); -} - -function modifier_type_bon(idTypebon) -{ - donnees = 'idTypebon='+idTypebon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparambons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - donnees_retour = data; - }, - complete: function() - { - $('#div_maj_type_bon').html(donnees_retour); - } - }); -} - -function enregistrer_modif_type_bon() -{ - - idTypebon = $("#idTypebon").val(); - dureeVie = $("#dureeVie").val(); - codeGestionBon = $("#codeGestionBon").val(); - - if (dureeVie<="0") - { - v_msg="Veuillez donner une durée de vie au bon!"; - v_msgEng="Please give a lifetime to the form!"; - alert_ebene(v_msg, v_msgEng); - - $("#dureeVie").focus(); - return; - } - - if (codeGestionBon<=" ") - { - v_msg="Veuillez sélectionner un type de gestion!"; - v_msgEng="Please select a management type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGestionBon").focus(); - return; - } - - donnees = 'idTypebon='+idTypebon+'&dureeVie='+dureeVie+'&codeGestionBon='+codeGestionBon; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparambons/enregistrermodif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - v_msg="Mis à jour avec succès!"; - v_msgEng="Updated successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() - { - window.location.assign($("#racineWeb" ).val()+"Parambons/"); - } - }); -} - -function gerer_acces_actes_prestataire(codeUtilisateur, actVisible) -{ - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur+"&actVisible="+actVisible; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestataire/gereraccesactes/", - 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 - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function afficher_utilsateur_actesvisibles() -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil; - - var div_attente = $('#div_liste'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamactesvisible/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function gerer_acces_actes_assureur(codeUtilisateur, actVisible) -{ - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur+"&actVisible="+actVisible; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamactesvisible/gereraccesactes/", - 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); - - afficher_utilsateur_actesvisibles(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function lister_provisions() -{ - debutAnalyse = $("#debutAnalyse").val(); - dateAnalyse = $("#dateAnalyse").val(); - - donnees = 'debutAnalyse='+debutAnalyse+'&dateAnalyse='+dateAnalyse; - - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxprovisonssin/"; - - $.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 lister_provisions_cpt() -{ - debutAnalyse = $("#debutAnalyse").val(); - dateAnalyse = $("#dateAnalyse").val(); - - donnees = 'debutAnalyse='+debutAnalyse+'&dateAnalyse='+dateAnalyse; - - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxprovisonssincpt/"; - - $.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 lister_provisions_sys() -{ - debutAnalyse = $("#debutAnalyse").val(); - dateAnalyse = $("#dateAnalyse").val(); - - donnees = 'debutAnalyse='+debutAnalyse+'&dateAnalyse='+dateAnalyse; - - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxprovisonssinsys/"; - - $.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 afficher_user_profil_ass() -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil; - - var div_attente = $('#div_liste'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function gerer_acces_actes_assureur_hab(codeUtilisateur, actVisible) -{ - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur+"&actVisible="+actVisible; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamactesvisible/gereraccesactes/", - 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); - - afficher_user_profil_ass(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function reinitpaswd_assureur(codeUtilisateur) -{ - v_msg="Confirmez-vous la réinitialisation?"; - v_msgEng="Do you confirm the reset?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/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); - - afficher_user_profil_ass(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function desactiver_user_assureur(codeUtilisateur) -{ - v_msg="Confirmez-vous la désactivation?"; - v_msgEng="Do you confirm the deactivation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/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); - - afficher_user_profil_ass(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function activer_user_assureur(codeUtilisateur) -{ - v_msg="Confirmez-vous l\'activation?"; - v_msgEng="Do you confirm the activation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/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); - - afficher_user_profil_ass(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function afficher_attribution_profil_assureur() -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil; - - var div_attente = $('#div_utilisateur_profil'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/afficherattributionprofilassureur/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function ajouter_un_utilisateur_profil_ass(codeUtilisateur) -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil+'&codeUtilisateur='+codeUtilisateur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/ajouterunutilisateurprofilassureur/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_attribution_profil_assureur(); - } - }); -} - -function ajouter_tous_utilisateur_profil_ass() -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/ajoutertousutilisateurprofilassureur/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_attribution_profil_assureur(); - } - }); - } -} - -function afficher_menu_principal_profil_assureur() -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil; - - var div_attente = $('#div_menu_profil'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/afficheraccesmenuprincipalass/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function ajouter_un_meunu_principal_profil_ass(codeMenu) -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil+'&codeMenu='+codeMenu; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/ajouterunmenuprincipalprofilassureur/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_menu_principal_profil_assureur(); - } - }); -} - -function retirer_un_meunu_principal_profil_ass(codeMenu) -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil+'&codeMenu='+codeMenu; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/retirerunmenuprincipalprofilassureur/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_menu_principal_profil_assureur(); - } - }); -} - -function ajouter_tous_menus_principal_profil_ass() -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/ajoutertousmenuprincipalprofilassureur/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_menu_principal_profil_assureur(); - } - }); -} - -function retirer_tous_menus_principal_profil_ass() -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/retirerousmenuprincipalprofilassureur/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_menu_principal_profil_assureur(); - } - }); -} - -function ajaxListerVueModule() -{ - codeModule=$("#codeModule").val(); - donnees = 'codeModule='+codeModule; - - var div_attente = $('#listevue'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/listervuemodule/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() - { - vider_menu_vue_module_assureur(); - } - }); -} - -function afficher_menu_vue_module_assureur() -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - codeModule=$("#codeModule").val(); - - if (codeModule<=" ") - { - v_msg="Veuillez sélectionner un module!"; - v_msgEng="Please select a module!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModule").focus(); - return; - } - - vue=$("#vue").val(); - - if (vue<=" ") - { - v_msg="Veuillez sélectionner une vue!"; - v_msgEng="Please select a view!"; - alert_ebene(v_msg, v_msgEng); - - $("#vue").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil; - donnees += '&codeModule='+codeModule; - donnees += '&vue='+vue; - - var div_attente = $('#div_menu_profil'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/afficheraccessousmenusass/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function vider_menu_vue_module_assureur() -{ - var div_attente = $('#div_menu_profil'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - div_attente.html(""); -} - -function ajouter_tous_menu_vue_module_assureur() -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - codeModule=$("#codeModule").val(); - - if (codeModule<=" ") - { - v_msg="Veuillez sélectionner un module!"; - v_msgEng="Please select a module!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModule").focus(); - return; - } - - vue=$("#vue").val(); - - if (vue<=" ") - { - v_msg="Veuillez sélectionner une vue!"; - v_msgEng="Please select a view!"; - alert_ebene(v_msg, v_msgEng); - - $("#vue").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil; - donnees += '&codeModule='+codeModule; - donnees += '&vue='+vue; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/ajoutertoussousmenusass/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_menu_vue_module_assureur(); - } - }); -} - -function retirer_tous_menu_vue_module_assureur() -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - codeModule=$("#codeModule").val(); - - if (codeModule<=" ") - { - v_msg="Veuillez sélectionner un module!"; - v_msgEng="Please select a module!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModule").focus(); - return; - } - - vue=$("#vue").val(); - - if (vue<=" ") - { - v_msg="Veuillez sélectionner une vue!"; - v_msgEng="Please select a view!"; - alert_ebene(v_msg, v_msgEng); - - $("#vue").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil; - donnees += '&codeModule='+codeModule; - donnees += '&vue='+vue; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/retirertoussousmenusass/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_menu_vue_module_assureur(); - } - }); -} - -function ajouter_un_menu_vue_module_assureur(codeMenu) -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - codeModule=$("#codeModule").val(); - - if (codeModule<=" ") - { - v_msg="Veuillez sélectionner un module!"; - v_msgEng="Please select a module!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModule").focus(); - return; - } - - vue=$("#vue").val(); - - if (vue<=" ") - { - v_msg="Veuillez sélectionner une vue!"; - v_msgEng="Please select a view!"; - alert_ebene(v_msg, v_msgEng); - - $("#vue").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil; - donnees += '&codeModule='+codeModule; - donnees += '&vue='+vue; - - donnees += '&codeMenu='+codeMenu; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/ajouterunsousmenusass/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_menu_vue_module_assureur(); - } - }); -} - -function retirer_un_menu_vue_module_assureur(codeMenu) -{ - codeProfil=$("#codeProfil").val(); - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - codeModule=$("#codeModule").val(); - - if (codeModule<=" ") - { - v_msg="Veuillez sélectionner un module!"; - v_msgEng="Please select a module!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeModule").focus(); - return; - } - - vue=$("#vue").val(); - - if (vue<=" ") - { - v_msg="Veuillez sélectionner une vue!"; - v_msgEng="Please select a view!"; - alert_ebene(v_msg, v_msgEng); - - $("#vue").focus(); - return; - } - - donnees = 'codeProfil='+codeProfil; - donnees += '&codeModule='+codeModule; - donnees += '&vue='+vue; - - donnees += '&codeMenu='+codeMenu; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/retirerunsousmenusass/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_menu_vue_module_assureur(); - } - }); -} - -function users_gc() -{ - codeGcAssureur = $("#codeGcAssureur").val(); - - if (codeGcAssureur>" ") - { - window.location.assign($("#racineWeb" ).val()+"Usersgcassureur/"); - } -} - -function reinitpaswd_gc(codeUtilisateur) -{ - v_msg="Confirmez-vous la réinitialisation?"; - v_msgEng="Do you confirm the reset?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcassureur/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_gc(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function desactiver_user_gc(codeUtilisateur) -{ - v_msg="Confirmez-vous la désactivation?"; - v_msgEng="Do you confirm the deactivation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcassureur/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_gc(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function activer_user_gc(codeUtilisateur) -{ - v_msg="Confirmez-vous l\'activation?"; - v_msgEng="Do you confirm the activation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcassureur/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_gc(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function gerer_acces_actes_gc(codeUtilisateur, actVisible) -{ - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur+"&actVisible="+actVisible; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcassureur/gereraccesactes/", - 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_gc(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function retour_au_profil_ass() -{ - window.location.assign($("#racineWeb" ).val()+"Listeprofilass/"); -} - -function creer_profil_ass() -{ - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le nom en Français!"; - v_msgEng="Please enter the name of the profil in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez indiquer le nom en anglais!"; - v_msgEng="Please enter the name of the profil in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - donnees = 'libelle='+libelle+'&libelleEng='+libelleEng; - - v_msg="Confirmez-vous ce nouveau profil?"; - v_msgEng="Do you confirm this new profile?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/creerprofilass/", - 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); - - retour_au_profil_ass(); - } - }); - } -} - -// tranferer_droits_profil_ass -function tranferer_droits_profil_ass() -{ - codeProfilSource=$("#codeProfilSource").val(); - - if (codeProfilSource<=" ") - { - v_msg="Veuillez sélectionner le profil source!"; - v_msgEng="Please select the source profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfilSource").focus(); - return; - } - - codeProfilDest=$("#codeProfilDest").val(); - - if (codeProfilDest<=" ") - { - v_msg="Veuillez sélectionner le profil de destination!"; - v_msgEng="Please select the destination profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfilDest").focus(); - return; - } - - if (codeProfilDest==codeProfilSource) - { - v_msg="Veuillez changer le profil de destination!"; - v_msgEng="Please change the destination profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfilDest").focus(); - return; - } - - donnees = 'codeProfilSource='+codeProfilSource; - donnees += '&codeProfilDest='+codeProfilDest; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/transfererdroitsprofilassureur/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() - { - v_msg="Opération effectuée avec succès!"; - v_msgEng="Operation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - retour_au_profil_ass(); - } - }); - } -} - -function batch_vider_droits_profil_assureur(codeProfil) -{ - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProfil='+codeProfil; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - var div_attente = $('#div_liste'); - sav_div_liste_htm = div_attente.html(); - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/batchviderprofilass/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() - { - v_msg="Opération effectuée avec succès!"; - v_msgEng="Operation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - div_attente.html(sav_div_liste_htm); - } - }); - } -} - -function batch_atrtribuer_droits_reference_profil_assureur(codeProfil) -{ - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'codeProfil='+codeProfil; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - var div_attente = $('#div_liste'); - sav_div_liste_htm = div_attente.html(); - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/batchattribuerdroitsreferenceass/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() - { - v_msg="Opération effectuée avec succès!"; - v_msgEng="Operation successfully completed"; - alert_ebene(v_msg, v_msgEng); - - div_attente.html(sav_div_liste_htm); - } - }); - } -} - -function reinitpaswd_assure(idAdherent) -{ - v_msg="Confirmez-vous la réinitialisation?"; - v_msgEng="Do you confirm the reset?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "idAdherent="+idAdherent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxhabilitationadherent/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); - - retour_a_extranet_adh(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function retour_a_extranet_adh() -{ - window.location.assign($("#racineWeb" ).val()+"Extranetadherent/"); -} - -function desactiver_user_assure(idAdherent) -{ - v_msg="Confirmez-vous la désactivation?"; - v_msgEng="Do you confirm the deactivation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "idAdherent="+idAdherent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxhabilitationadherent/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); - - retour_a_extranet_adh(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function activer_user_assure(idAdherent) -{ - v_msg="Confirmez-vous l\'activation?"; - v_msgEng="Do you confirm the activation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "idAdherent="+idAdherent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxhabilitationadherent/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); - - retour_a_extranet_adh(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function ctrlkeypress_liste_users_ass(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_liste_users_ass(); - } -} - -function afficher_liste_users_ass() -{ - donnees = ""; - donnees_retour = ""; - - codeProfil = $("#codeProfil").val(); - nom = $("#nom").val(); - prenoms = $("#prenoms").val(); - - if (codeProfil+nom+prenoms<=" ") - { - v_msg="Veuillez indiquer au moins un critère de recherche!"; - v_msgEng="Please enter at least one search criteria!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - donnees += 'codeProfil=' + codeProfil; - donnees += '&nom=' + nom; - donnees += '&prenoms=' + prenoms; - - - $("#div_liste_users").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/Ajaxlisteusersass/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - donnees_retour = data; - }, - complete: function() { - $("#div_liste_users").html(donnees_retour); - } - }); -} - -function afficher_users_ass_id(idUtilisateur) -{ - window.location.assign($("#racineWeb" ).val()+"Ficheusersass/"+idUtilisateur+"/"); -} - -function retour_a_usersassureur() -{ - window.location.assign($("#racineWeb" ).val()+"Usersassureur/"); -} - -function enregistrer_modif_usersassureur() -{ - idUtilisateur = $("#idUtilisateur").val(); - nom = $("#nom").val(); - prenoms = $("#prenoms").val(); - codeProfil = $("#codeProfil").val(); - actif = $("#actif").val(); - actVisible = $("#actVisibleUser").val(); - codeLangue = $("#codeLangueUser").val(); - AffectionVisible = $("#AffectionVisible").val(); - - if (nom<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#nom").focus(); - return; - } - - if (codeProfil<=" ") - { - v_msg="Veuillez sélectionner un profil!"; - v_msgEng="Please select a user profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - if (actif<=" ") - { - v_msg="Utilisateur actif oui ou non?"; - v_msgEng="Is the user active yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#actif").focus(); - return; - } - - if(codeLangue<=" ") - { - v_msg="Veuillez indiquer la langue!"; - v_msgEng="Please select the language"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLangueUser").focus(); - return; - } - - if (actVisible<=" ") - { - v_msg="Actes visbles oui ou non?"; - v_msgEng="Acts are visible yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#actVisibleUser").focus(); - return; - } - - if (AffectionVisible<=" ") - { - v_msg="Affections visbles oui ou non?"; - v_msgEng="Affections are visible yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#AffectionVisible").focus(); - return; - } - - donnees = 'idUtilisateur=' + idUtilisateur; - donnees += '&codeProfil=' + codeProfil; - donnees += '&nom=' + nom; - donnees += '&prenoms=' + prenoms; - donnees += '&actif=' + actif; - donnees += '&actVisible=' + actVisible; - donnees += '&codeLangue=' + codeLangue; - donnees += '&AffectionVisible=' + AffectionVisible; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/enregistrermodifusersass/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - retour_a_usersassureur(); - } - }); - } -} - -function creer_user_assureur() -{ - codeProfil = $("#codeProfil").val(); - codeUtilisateur = $("#codeUtilisateur").val(); - codeUtilisateur = codeUtilisateur.trim(); - codeUtilisateur = supprimer_espace_string(codeUtilisateur); - codeUtilisateur = codeUtilisateur.toLowerCase(); - - nom = $("#nom").val(); - prenoms = $("#prenoms").val(); - telephone = $("#telephone").val(); - email = $("#email").val(); - - codeLangue = $("#codeLangueUser").val(); - actVisible = $("#actVisibleUser").val(); - AffectionVisible = $("#AffectionVisibleUser").val(); - - nvmdp = $("#nvmdp").val(); - cfnvmdp = $("#cfnvmdp").val(); - - if(nom<=" ") - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#nom").focus(); - return; - } - - if(codeProfil<=" ") - { - v_msg="Veuillez sélectionner le profil source!"; - v_msgEng="Please select the source profile!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeProfil").focus(); - return; - } - - if(codeUtilisateur<=" ") - { - v_msg="Veuillez indiquer le login!"; - v_msgEng="Please enter the login!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeUtilisateur").focus(); - return; - } - - - if(codeLangue<=" ") - { - v_msg="Veuillez indiquer la langue!"; - v_msgEng="Please select the language"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLangueUser").focus(); - return; - } - - if (actVisible<=" ") - { - v_msg="Actes visbles oui ou non?"; - v_msgEng="Acts are visible yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#actVisibleUser").focus(); - return; - } - - - if (AffectionVisible<=" ") - { - v_msg="Affections visbles oui ou non?"; - v_msgEng="Affections are visible yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#AffectionVisibleUser").focus(); - return; - } - - if(nvmdp<=" ") - { - v_msg="Veuillez indiquer le mot de passe!"; - v_msgEng="Please enter the password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return; - } - - if(nvmdp != cfnvmdp) - { - v_msg="Veuillez confirmer votre mot de passe!"; - v_msgEng="Please confirm your password!"; - alert_ebene(v_msg, v_msgEng); - - $("#cfnvmdp").focus(); - return; - } - - motPass = nvmdp; - - donnees = 'codeProfil='+codeProfil+'&codeUtilisateur='+codeUtilisateur; - donnees += '&nom='+nom+'&prenoms='+prenoms; - donnees += '&telephone='+telephone+'&email='+email+'&motPass='+motPass; - donnees += '&codeLangue='+codeLangue+'&actVisible='+actVisible+'&AffectionVisible='+AffectionVisible; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ce nouvel utilisateur?"; - v_msgEng="Do you confirm this new user?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamhabilitationass/creeruserassureur/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $('#div_unicite_login').html(data); - }, - complete: function() - { - uniciteLogin = $("#uniciteLogin").val(); - if(uniciteLogin==1) - { - v_msg="Utilisateur ( "+codeUtilisateur+" ) créé avec succès!"; - v_msgEng="User ( "+codeUtilisateur+" ) created succssfully!"; - alert_ebene(v_msg, v_msgEng); - - retour_a_usersassureur(); - } - else - { - v_msg="Login " + codeUtilisateur +" déjà utilisé!"; - v_msgEng="Login " + codeUtilisateur +" already in use!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeUtilisateur").focus(); - } - } - }); - } -} - -function supprimer_espace_string(p_mot) -{ - p_mot = p_mot.trim(); - p_mot = p_mot.replace(/ /g, ""); - return p_mot; -} - -function enregistrer_modif_user_prestataire() -{ - idUtilisateur = $("#idUtilisateur").val(); - nom = $("#nom").val(); - prenoms = $("#prenoms").val(); - actif = $("#actif").val(); - actVisible = $("#actVisibleUser").val(); - codeLangue = $("#codeLangueUser").val(); - AffectionVisible = $("#AffectionVisibleUser").val(); - - if (nom<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#nom").focus(); - return; - } - - if (actif<=" ") - { - v_msg="Utilisateur actif oui ou non?"; - v_msgEng="Is the user active yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#actif").focus(); - return; - } - - if(codeLangue<=" ") - { - v_msg="Veuillez indiquer la langue!"; - v_msgEng="Please select the language"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLangueUser").focus(); - return; - } - - if (actVisible<=" ") - { - v_msg="Actes visbles oui ou non?"; - v_msgEng="Acts are visible yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#actVisibleUser").focus(); - return; - } - - if (AffectionVisible<=" ") - { - v_msg="Affections visbles oui ou non?"; - v_msgEng="Affections are visible yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#AffectionVisible").focus(); - return; - } - - donnees = 'idUtilisateur=' + idUtilisateur; - donnees += '&nom=' + nom; - donnees += '&prenoms=' + prenoms; - donnees += '&actif=' + actif; - donnees += '&actVisible=' + actVisible; - donnees += '&codeLangue=' + codeLangue; - donnees += '&AffectionVisible=' + AffectionVisible; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestataire/enregistrermodifuserprestataire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - users_prestataire(); - } - }); - } -} - -function afficher_users_prestataire_id(idUtilisateur) -{ - window.location.assign($("#racineWeb" ).val()+"Ficheuserprestataire/"+idUtilisateur+"/"); -} - -function afficher_users_gc_id(idUtilisateur) -{ - window.location.assign($("#racineWeb" ).val()+"Ficheusergc/"+idUtilisateur+"/"); -} - -function retour_a_users_gc() -{ - window.location.assign($("#racineWeb" ).val()+"Usersgcassureur/"); -} - -function enregistrer_modif_user_gc() -{ - idUtilisateur = $("#idUtilisateur").val(); - nom = $("#nom").val(); - prenoms = $("#prenoms").val(); - actif = $("#actif").val(); - actVisible = $("#actVisibleUser").val(); - codeLangue = $("#codeLangueUser").val(); - AffectionVisible = $("#AffectionVisibleUser").val(); - - if (nom<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#nom").focus(); - return; - } - - if (actif<=" ") - { - v_msg="Utilisateur actif oui ou non?"; - v_msgEng="Is the user active yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#actif").focus(); - return; - } - - if(codeLangue<=" ") - { - v_msg="Veuillez indiquer la langue!"; - v_msgEng="Please select the language"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLangueUser").focus(); - return; - } - - if (actVisible<=" ") - { - v_msg="Actes visbles oui ou non?"; - v_msgEng="Acts are visible yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#actVisibleUser").focus(); - return; - } - - if (AffectionVisible<=" ") - { - v_msg="Affections visbles oui ou non?"; - v_msgEng="Affections are visible yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#AffectionVisible").focus(); - return; - } - - donnees = 'idUtilisateur=' + idUtilisateur; - donnees += '&nom=' + nom; - donnees += '&prenoms=' + prenoms; - donnees += '&actif=' + actif; - donnees += '&actVisible=' + actVisible; - donnees += '&codeLangue=' + codeLangue; - donnees += '&AffectionVisible=' + AffectionVisible; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcassureur/enregistrermodifusergc/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - retour_a_users_gc(); - } - }); - } -} - -function creer_user_gc() -{ - codeGcAssureur = $("#codeGcAssureur").val(); - codeUtilisateur = $("#codeUtilisateur").val(); - codeUtilisateur = codeUtilisateur.trim(); - codeUtilisateur = supprimer_espace_string(codeUtilisateur); - codeUtilisateur = codeUtilisateur.toLowerCase(); - - nom = $("#nom").val(); - prenoms = $("#prenoms").val(); - telephone = $("#telephone").val(); - email = $("#email").val(); - - codeLangue = $("#codeLangueUser").val(); - actVisible = $("#actVisibleUser").val(); - - nvmdp = $("#nvmdp").val(); - cfnvmdp = $("#cfnvmdp").val(); - - if(nom<=" ") - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#nom").focus(); - return; - } - - if(codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(codeUtilisateur<=" ") - { - v_msg="Veuillez indiquer le login!"; - v_msgEng="Please enter the login!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeUtilisateur").focus(); - return; - } - - - if(codeLangue<=" ") - { - v_msg="Veuillez indiquer la langue!"; - v_msgEng="Please select the language"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLangueUser").focus(); - return; - } - - if (actVisible<=" ") - { - v_msg="Actes visbles oui ou non?"; - v_msgEng="Acts are visible yes or no?"; - alert_ebene(v_msg, v_msgEng); - - $("#actVisibleUser").focus(); - return; - } - - if(nvmdp<=" ") - { - v_msg="Veuillez indiquer le mot de passe!"; - v_msgEng="Please enter the password!"; - alert_ebene(v_msg, v_msgEng); - - $("#nvmdp").focus(); - return; - } - - if(nvmdp != cfnvmdp) - { - v_msg="Veuillez confirmer votre mot de passe!"; - v_msgEng="Please confirm your password!"; - alert_ebene(v_msg, v_msgEng); - - $("#cfnvmdp").focus(); - return; - } - - motPass = nvmdp; - - donnees = 'codeGcAssureur='+codeGcAssureur+'&codeUtilisateur='+codeUtilisateur; - donnees += '&nom='+nom+'&prenoms='+prenoms; - donnees += '&telephone='+telephone+'&email='+email+'&motPass='+motPass; - donnees += '&codeLangue='+codeLangue+'&actVisible='+actVisible; - - v_msg="Confirmez-vous ce nouvel utilisateur?"; - v_msgEng="Do you confirm this new user?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcassureur/creerusergc/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $('#div_unicite_login').html(data); - }, - complete: function() - { - uniciteLogin = $("#uniciteLogin").val(); - if(uniciteLogin==1) - { - v_msg="Utilisateur ( "+codeUtilisateur+" ) créé avec succès!"; - v_msgEng="User ( "+codeUtilisateur+" ) created succssfully!"; - alert_ebene(v_msg, v_msgEng); - - retour_a_users_gc(); - } - else - { - v_msg="Login " + codeUtilisateur +" déjà utilisé!"; - v_msgEng="Login " + codeUtilisateur +" already in use!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeUtilisateur").focus(); - } - } - }); - } -} -function notesfeuillemaladie() -{ - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Notesfeuillemaladie/"); -} - -function changer_avenant_incorporation() -{ - idAvenant = $("#idAvenant").val(); - - if(idAvenant<=" ") - { - v_msg="Veuillez sélectionner un avenant!"; - v_msgEng="Please select an Amendment!"; - alert_ebene(v_msg, v_msgEng); - - $("#idAvenant").focus(); - return; - } - - donnees = 'idAvenant='+idAvenant; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxavenant/getdateavenant/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_date_avenant").html(data); - $(".datepicker" ).datepicker(); - }, - complete: function() - { - prorater_prime_adherent(); - } - }); -} - - -function changer_avenant_incorporation_beneficiaire() -{ - idAvenant = $("#idAvenant").val(); - - if(idAvenant<=" ") - { - v_msg="Veuillez sélectionner un avenant!"; - v_msgEng="Please select an Amendment!"; - alert_ebene(v_msg, v_msgEng); - - $("#idAvenant").focus(); - return; - } - - donnees = 'idAvenant='+idAvenant; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxavenant/getdateavenantbeneficiaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_date_avenant").html(data); - $(".datepicker" ).datepicker(); - }, - complete: function() - { - prorater_prime_beneficiaire(); - } - }); -} - -function param_requeteperso() -{ - window.location.assign($("#racineWeb" ).val()+"Paramerequeteperso/"); -} - -function creer_requeteperso() -{ - nomRequete = $("#nomRequete").val(); - nomRequeteEng = $("#nomRequeteEng").val(); - descriptionRequete = $("#descriptionRequete").val(); - sourceDonnees = $("#sourceDonnees").val(); - ordre = $("#ordreRequete").val(); - - if(nomRequete<=" ") - { - v_msg="Veuillez indiquer le nom de la requête en Français!"; - v_msgEng="Please enter the name of the request in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomRequete").focus(); - return; - } - - if(nomRequeteEng<=" ") - { - v_msg="Veuillez indiquer le nom de la requête en Anglais!"; - v_msgEng="Please enter the name of the request in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomRequeteEng").focus(); - return; - } - - if(descriptionRequete<=" ") - { - v_msg="Veuillez entrer une description!"; - v_msgEng="Please enter a description!"; - alert_ebene(v_msg, v_msgEng); - - $("#descriptionRequete").focus(); - return; - } - - if(sourceDonnees<=" ") - { - v_msg="Veuillez sélectionner une source de données!"; - v_msgEng="Please select a data source!"; - alert_ebene(v_msg, v_msgEng); - - $("#sourceDonnees").focus(); - return; - } - - if(ordre<1) - { - v_msg="Veuillez donner un ordre à la requête!"; - v_msgEng="Please give an order to the query!"; - alert_ebene(v_msg, v_msgEng); - - $("#ordreRequete").focus(); - return; - } - - donnees = 'nomRequete='+nomRequete; - donnees += '&nomRequeteEng='+nomRequeteEng; - donnees += '&descriptionRequete='+descriptionRequete; - donnees += '&sourceDonnees='+sourceDonnees; - donnees += '&ordre='+ordre; - - v_msg="Confirmez-vous cette nouvelle requête?"; - v_msgEng="Do you confirm this new qurey?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamrequeteperso/creerrequeteperso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - param_requeteperso_liste(); - } - }); - } -} - -function param_requeteperso_liste() -{ - window.location.assign($("#racineWeb" ).val()+"Listerequeteperso/"); -} - -function afficher_requeteperso_id(idrequete) -{ - window.location.assign($("#racineWeb" ).val()+"Ficherequetesperso/"+idrequete+"/"); -} - -function desactiver_requeteperso(codeRequete) -{ - v_msg="Confirmez-vous la désactivation?"; - v_msgEng="Do you confirm the deactivation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeRequete="+codeRequete; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamrequeteperso/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); - - param_requeteperso_liste(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function activer_requeteperso(codeRequete) -{ - v_msg="Confirmez-vous l\'activation?"; - v_msgEng="Do you confirm the activation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeRequete="+codeRequete; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamrequeteperso/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); - - param_requeteperso_liste(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function afficher_sourcedonneesrequeteperso_id(idsourcerequete) -{ - window.location.assign($("#racineWeb" ).val()+"Fichesourcedonneesrequetesperso/"+idsourcerequete+"/"); -} - - -function param_sourcedonneesrequeteperso_liste() -{ - window.location.assign($("#racineWeb" ).val()+"Sourcerequetesperso/"); -} - - -function enregistrer_modif_sourcedonneesrequeteperso() -{ - idsourcerequete = $("#idsourcerequete").val(); - sourceDonnees = $("#sourceDonnees").val(); - sourceDonnees = supprimer_espace_string(sourceDonnees); - - if (sourceDonnees<=" ") - { - v_msg="Veuillez saisir la source de données!"; - v_msgEng="Please enter the data source!"; - alert_ebene(v_msg, v_msgEng); - - $("#sourceDonnees").focus(); - return; - } - - if (sourceDonnees.substring(0, 9)!="sp_perso_") - { - v_msg="Doit commencer par (sp_perso_)!"; - v_msgEng="Must start by (sp_perso_)!"; - alert_ebene(v_msg, v_msgEng); - - $("#sourceDonnees").focus(); - return; - } - - if (sourceDonnees=="sp_perso_") - { - v_msg="Veuillez saisir la source de données!"; - v_msgEng="Please enter the data source!"; - alert_ebene(v_msg, v_msgEng); - - $("#sourceDonnees").focus(); - return; - } - - donnees = 'idsourcerequete=' + idsourcerequete; - donnees += '&sourceDonnees=' + sourceDonnees; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamrequeteperso/enregistrermodifsourcedonneesrequeteperso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - param_sourcedonneesrequeteperso_liste(); - } - }); - } -} - -function desactiver_sourcedonneesrequeteperso(sourceDonnees) -{ - v_msg="Confirmez-vous la désactivation?"; - v_msgEng="Do you confirm the deactivation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "sourceDonnees="+sourceDonnees; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamrequeteperso/desactiversourcedonnees/", - 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); - - param_sourcedonneesrequeteperso_liste(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function activer_sourcedonneesrequeteperso(sourceDonnees) -{ - v_msg="Confirmez-vous l\'activation?"; - v_msgEng="Do you confirm the activation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "sourceDonnees="+sourceDonnees; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamrequeteperso/activersourcedonnees/", - 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); - - param_sourcedonneesrequeteperso_liste(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function creer_sourcedonneesrequeteperso() -{ - sourceDonnees = $("#sourceDonnees").val(); - sourceDonnees = supprimer_espace_string(sourceDonnees); - - if (sourceDonnees<=" ") - { - v_msg="Veuillez saisir la source de données!"; - v_msgEng="Please enter the data source!"; - alert_ebene(v_msg, v_msgEng); - - $("#sourceDonnees").focus(); - return; - } - - if (sourceDonnees.substring(0, 9)!="sp_perso_") - { - v_msg="Doit commencer par (sp_perso_)!"; - v_msgEng="Must start by (sp_perso_)!"; - alert_ebene(v_msg, v_msgEng); - - $("#sourceDonnees").focus(); - return; - } - - if (sourceDonnees=="sp_perso_") - { - v_msg="Veuillez saisir la source de données!"; - v_msgEng="Please enter the data source!"; - alert_ebene(v_msg, v_msgEng); - - $("#sourceDonnees").focus(); - return; - } - - donnees = 'sourceDonnees=' + sourceDonnees; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamrequeteperso/creersourcedonneesrequeteperso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - param_sourcedonneesrequeteperso_liste(); - } - }); - } -} - -function enregistrer_modif_requeteperso() -{ - idrequete = $("#idrequete").val(); - codeRequete = $("#codeRequete").val(); - - nomRequete = $("#nomRequete").val(); - nomRequeteEng = $("#nomRequeteEng").val(); - descriptionRequete = $("#descriptionRequete").val(); - sourceDonnees = $("#sourceDonnees").val(); - ordre = $("#ordreRequete").val(); - - if(nomRequete<=" ") - { - v_msg="Veuillez indiquer le nom de la requête en Français!"; - v_msgEng="Please enter the name of the request in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomRequete").focus(); - return; - } - - if(nomRequeteEng<=" ") - { - v_msg="Veuillez indiquer le nom de la requête en Anglais!"; - v_msgEng="Please enter the name of the request in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomRequeteEng").focus(); - return; - } - - if(descriptionRequete<=" ") - { - v_msg="Veuillez entrer une description!"; - v_msgEng="Please enter a description!"; - alert_ebene(v_msg, v_msgEng); - - $("#descriptionRequete").focus(); - return; - } - - if(sourceDonnees<=" ") - { - v_msg="Veuillez sélectionner une source de données!"; - v_msgEng="Please select a data source!"; - alert_ebene(v_msg, v_msgEng); - - $("#sourceDonnees").focus(); - return; - } - - if(ordre<1) - { - v_msg="Veuillez donner un ordre à la requête!"; - v_msgEng="Please give an order to the query!"; - alert_ebene(v_msg, v_msgEng); - - $("#ordreRequete").focus(); - return; - } - - donnees = 'idrequete='+idrequete; - donnees += '&codeRequete='+codeRequete; - - donnees += '&nomRequete='+nomRequete; - donnees += '&nomRequeteEng='+nomRequeteEng; - donnees += '&descriptionRequete='+descriptionRequete; - donnees += '&sourceDonnees='+sourceDonnees; - donnees += '&ordre='+ordre; - - v_msg="Confirmez-vous cette nouvelle requête?"; - v_msgEng="Do you confirm this new qurey?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamrequeteperso/enregistrermodifrequeteperso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() - { - param_requeteperso_liste(); - } - }); - } -} - -function parametres_sourcedonneesrequeteperso(idsourcerequete) -{ - window.location.assign($("#racineWeb" ).val()+"Paramsourcedonneesrequetesperso/"+idsourcerequete+"/"); -} - -function reconstruire_param_requeteperso(idsourcerequete) -{ - donnees = 'idsourcerequete=' + idsourcerequete; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamrequeteperso/reconstruireparamrequeteperso/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - parametres_sourcedonneesrequeteperso(idsourcerequete); - } - }); - } -} - -function ajaxenteteetatperso() -{ - $("#div_ente_requete").html(""); - - 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; - } - - donnees = 'codeRequete='+codeRequete; - - v_url = $("#racineWeb").val()+"Ajaxenteteetatperso/"; - - $("#div_ente_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ente_requete").html(data); - - $(".datepicker").datepicker({dateFormat: 'yy-mm-dd'}); - } - }); -} - -function executer_etat_perso() -{ - donnees_retour = ""; - - donnees = $("#frm_requete_perso").serialize(); - - $('#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()+"Ajaxetatperso/"; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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 ctrlkeypress_familleacte(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_caracteristiques_acte(); - } -} - -function afficher_caracteristiques_acte() -{ - effacer_caracteristiques_un_acte(); - - codeFamilleActe=$("#codeFamilleActe").val(); - libelleActe=$("#libelleActe").val(); - - if(libelleActe<=' ') - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleActe").focus(); - return; - } - - donnees = 'codeFamilleActe='+codeFamilleActe+'&libelleActe='+libelleActe; - - var div_detail_actes = $('#div_detail_actes'); - div_detail_actes.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxacracteristiquesacte/", - type: 'POST', - data: donnees, - success: function(data) { - div_detail_actes.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - } - }); -} - -function afficher_caracteristiques_un_acte(idActe) -{ - donnees = 'idActe='+idActe; - donnees_retour = ""; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxacracteristiquesacte/fichecracteristiquesacte/", - type: 'POST', - data: donnees, - success: function(data) - { - donnees_retour = data; - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - $('#div_fiche_acte').html(donnees_retour); - } - }); -} - -function init_import_assures() -{ - nbCollege = $("#nbCollege_C").val(); - - if (nbCollege<="0") - { - v_msg="Aucun collège!"; - v_msgEng="No college!"; - alert_ebene(v_msg, v_msgEng); - - college_police(); - - return; - } - - nbAdh = $("#nbAdh_C").val(); - codeTypeContrat = $("#codeTypeContrat_C").val(); - - if (codeTypeContrat=="P") - { - v_msg="Ce n\'est pas une police GROUPE!"; - v_msgEng="This is not a GROUP policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (codeTypeContrat=="F") - { - window.location.assign($("#racineWeb" ).val()+"Importassurefamiliale/"); - } - else - { - window.location.assign($("#racineWeb" ).val()+"Importassure/"); - } -} - -function desactiver_derogation_permanente(idBeneficiaire) -{ - observations=$("#observations").val(); - - if (observations<=" ") - { - v_msg="Veuillez saisir un motif!"; - v_msgEng="Please enter a reaon!"; - alert_ebene(v_msg, v_msgEng); - - $("#observations").focus(); - return; - } - - v_msg="Confirmez-vous la désactivation?"; - v_msgEng="Do you confirm the deactivation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "idBeneficiaire="+idBeneficiaire; - donnees += '&observations='+observations; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/desactiverderogationpermanente/", - 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); - - liste_derogation_permanente(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function activer_derogation_permanente(idBeneficiaire) -{ - observations=$("#observations").val(); - - if (observations<=" ") - { - v_msg="Veuillez saisir un motif!"; - v_msgEng="Please enter a reaon!"; - alert_ebene(v_msg, v_msgEng); - - $("#observations").focus(); - return; - } - - v_msg="Confirmez-vous l\'activation?"; - v_msgEng="Do you confirm the activation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "idBeneficiaire="+idBeneficiaire; - donnees += '&observations='+observations; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/activerderogationpermanente/", - 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); - - liste_derogation_permanente(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function liste_derogation_permanente() -{ - window.location.assign($("#racineWeb" ).val()+"Derogationpermanente/"); -} - -function raffraichier_gabarit() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgabarit/", - success: function(data) - { - $("#div_ajaxgabarit").html(data); - }, - error: function(errorData) - { - }, - complete: function() - { - $(".datepicker" ).datepicker(); - - raffraichier_messagerie(); - } - }); -} - -function connexion_cookie() -{ - msgErreur=$("#msgErreur").val(); - - donnees = 'msgErreur='+msgErreur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxconnexioncookie/", - type: 'POST', - data: donnees, - success: function(data) - { - $("#div_ajaxconnexion").html(data); - }, - error: function(errorData) - { - }, - complete: function() - { - var login = document.getElementById("login").value; - if (login>" ") - { - $("#mdp").focus(); - } - else - { - $("#login").focus(); - } - } - }); -} - -function afficher_quittances_police_periode() -{ - idPolice = $("#idPolice_C" ).val(); - debut = $("#debut" ).val(); - fin = $("#fin" ).val(); - - donnees = 'idPolice='+idPolice; - donnees += '&debut='+debut; - donnees += '&fin='+fin; - - // alert("donnees => "+donnees); - // return; - - $("#div_quittancepolice").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - if (numeroPolice>" ") - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfichepolice/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_quittancepolice").html(data); - } - }); - } -} - -function afficher_adherents_police() -{ - $("#div_liste_adherent").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteadherent/", - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_adherent").html(data); - } - }); -} - -function diagnosticsfeuillemaladie() -{ - /* - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - */ - - window.location.assign($("#racineWeb" ).val()+"Diagnosticscons/"); -} - -function afficher_diagnostics_feuille() -{ - $("#div_dianostics").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdiagnosticscons/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_dianostics").html(donnees_retour); - } - }); -} - -function afficher_ecarts_facture() -{ - $("#div_ecart_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecompte/ecartfacture/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_ecart_decompte").html(donnees_retour); - } - }); -} - -function ecarts_facture_non_saisies() -{ - $("#div_ecart_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecompte/ecartnonsaisi/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_ecart_decompte").html(donnees_retour); - } - }); -} - -function maj_observations_ecart_facture(idEcart, observations) -{ - v_msg="Veuillez saisir ou modifier les observations!"; - v_msgEng="Please enter or edit comments!"; - - observations = prompt_ebene(v_msg, v_msgEng, observations); - - if(observations==null) - { - return; - } - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = 'idEcart='+idEcart+"&observations="+observations; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecompte/majobservations/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function recapituler_ecarts_décompte() -{ - // alert("recapituler_ecarts_décompte"); - - $("#div_entete_ecart_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecompte/recapecratdecompte/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_entete_ecart_decompte").html(donnees_retour); - } - }); -} - -function init_new_ecart_decompte_non_saisi() -{ - $('#div_saisie_ecart').html(""); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecompte/initnewecart/", - type : 'post', - error: function(errorData) { - }, - success: function(data) - { - donnees_retour = data; - }, - complete: function() - { - $('#div_saisie_ecart').html(donnees_retour); - // $this->executerAction("index"); - } - }); -} - -function maj_ecart_facture(idEcart) -{ - donnees = 'idEcart='+idEcart; - - $('#div_saisie_ecart').html(""); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecompte/initmajecartnonsaisi/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - donnees_retour = data; - }, - complete: function() - { - $('#div_saisie_ecart').html(donnees_retour); - $(".datepicker" ).datepicker(); - } - }); - -} - -function ctrlkeypressbeneficiaireecart(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - $("#numeroBeneficiaire").blur(); - } -} - -function chercher_beneficiaireecart(numeroBeneficiaire) -{ - $("#div_saisie_ecart").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'numeroBeneficiaire='+numeroBeneficiaire; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecompte/rechercherbeneficiaireecart/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_saisie_ecart").html(data); - }, - error: function(data) { - }, - complete: function() { - $(".datepicker" ).datepicker(); - } - }); -} - - -function ajouter_ecartdecompte_non_saisi() -{ - idBeneficiaire = $("#idBeneficiaireEcart" ).val(); - dateFacture = $("#dateFacture" ).val(); - montantPrestataire = $("#montantPrestataire" ).val(); - observations = $("#observations" ).val(); - - if(idBeneficiaire<="0") - { - v_msg="Bénéficiaire manquant!"; - v_msgEng="Missing beneficiary!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBeneficiaire").focus(); - return; - } - - if(dateFacture<=" ") - { - v_msg="Date manquant!"; - v_msgEng="Missing date!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateFacture").focus(); - return; - } - - if(isNaN(montantPrestataire)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#montantPrestataire").val("0"); - $("#montantPrestataire").focus(); - return; - } - - if(Math.abs(montantPrestataire)=="0") - { - v_msg="Montant manquant!"; - v_msgEng="Missing amount!"; - alert_ebene(v_msg, v_msgEng); - - $("#montantPrestataire").val("0"); - $("#montantPrestataire").focus(); - return; - } - - if(observations<=" ") - { - v_msg="observations manquant!"; - v_msgEng="Missing observations!"; - alert_ebene(v_msg, v_msgEng); - - $("#observations").focus(); - return; - } - - $("#dateFactureReelle").val(dateFacture); - - if (date_inclus_mois_decompte()) - { - donnees = 'idBeneficiaire='+idBeneficiaire; - donnees += '&dateFacture='+dateFacture; - donnees += '&montantPrestataire='+montantPrestataire; - donnees += '&observations='+observations; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecompte/ajouterecartdecomptenonsaisi/", - type: 'POST', - data: donnees, - success: function(data) { - // $("#div_saisie_ecart").html(data); - }, - error: function(data) { - }, - complete: function() { - ecarts_facture_non_saisies(); - recapituler_ecarts_décompte(); - } - }); - } -} - -function supprimer_ecart_facture(idEcart) -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idEcart='+idEcart; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecompte/supprimerecart/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - ecarts_facture_non_saisies(); - recapituler_ecarts_décompte(); - } - }); - } -} - -function maj_ecartdecompte_non_saisi() -{ - idEcart = $("#idEcart" ).val(); - idBeneficiaire = $("#idBeneficiaireEcart" ).val(); - dateFacture = $("#dateFacture" ).val(); - montantPrestataire = $("#montantPrestataire" ).val(); - observations = $("#observations" ).val(); - - if(idBeneficiaire<="0") - { - v_msg="Bénéficiaire manquant!"; - v_msgEng="Missing beneficiary!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(idEcart<="0") - { - v_msg="Veuillez sélectionner la ligne à modifier!"; - v_msgEng="Please select the line to edit!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if(dateFacture<=" ") - { - v_msg="Date manquant!"; - v_msgEng="Missing date!"; - alert_ebene(v_msg, v_msgEng); - - $("#dateFacture").focus(); - return; - } - - if(isNaN(montantPrestataire)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#montantPrestataire").val("0"); - $("#montantPrestataire").focus(); - return; - } - - if(Math.abs(montantPrestataire)=="0") - { - v_msg="Montant manquant!"; - v_msgEng="Missing amount!"; - alert_ebene(v_msg, v_msgEng); - - $("#montantPrestataire").val("0"); - $("#montantPrestataire").focus(); - return; - } - - if(observations<=" ") - { - v_msg="observations manquant!"; - v_msgEng="Missing observations!"; - alert_ebene(v_msg, v_msgEng); - - $("#observations").focus(); - return; - } - - $("#dateFactureReelle").val(dateFacture); - if (date_inclus_mois_decompte()) - { - donnees = 'idEcart='+idEcart; - donnees += '&idBeneficiaire='+idBeneficiaire; - donnees += '&dateFacture='+dateFacture; - donnees += '&montantPrestataire='+montantPrestataire; - donnees += '&observations='+observations; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecompte/majecartnonsaisi/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - ecarts_facture_non_saisies(); - recapituler_ecarts_décompte(); - } - }); - } -} - -function imprimer_ecarts_decompte() -{ - var div_export = $('#div_export_ecart_decompte'); - - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_imprimer_ecart_decompte").click(); - - // alert("Ajaximprimerecartdecompte"); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerecartdecompte/", - type: 'POST', - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - // $("#btn_imprimer_ecart_decompte").click(); - } - }); - -} - -function afficher_ecarts_facture_cons() -{ - $("#div_ecart_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecomptecons/ecartfacture/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_ecart_decompte").html(donnees_retour); - } - }); -} - -function ecarts_facture_non_saisies_cons() -{ - $("#div_ecart_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxecartdecomptecons/ecartnonsaisi/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_ecart_decompte").html(donnees_retour); - } - }); -} - -function etat_prod_situation_clients() -{ - dateAnalyse = $("#dateAnalyse").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'dateAnalyse='+dateAnalyse; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - 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_situation_clients_export() -{ - dateAnalyse = $("#dateAnalyse").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'dateAnalyse='+dateAnalyse; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function etat_sin_paiementprestationcumul() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - 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_sin_paiementprestationcumul_export() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - $('#div_export_a').html(""); - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -// - -function etat_sin_paiementprestationdet() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - 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_sin_paiementprestationdet_export() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - $('#div_export_a').html(""); - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function gerer_acces_affection_prestataire(codeUtilisateur, AffectionVisible) -{ - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur+"&AffectionVisible="+AffectionVisible; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestataire/gereraccesaffection/", - 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 - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function gerer_acces_affection_assureur_hab(codeUtilisateur, AffectionVisible) -{ - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur+"&AffectionVisible="+AffectionVisible; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparamactesvisible/gereraccesaffection/", - 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); - - afficher_user_profil_ass(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function gerer_acces_affection_gc(codeUtilisateur, AffectionVisible) -{ - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codeUtilisateur="+codeUtilisateur+"&AffectionVisible="+AffectionVisible; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgcassureur/gereraccesaffection/", - 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_gc(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function desactiver_derogation_finger_prestataire(codePrestataire) -{ - v_msg="Veuillez saisir le motif de l\'activation!"; - v_msgEng="Please enter the reason for activation!"; - - motif_activation = prompt_ebene(v_msg, v_msgEng); - - if(motif_activation<=" ") - { - v_msg="Vous devez saisir un motif!"; - v_msgEng="You have to enter a reason!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous la désactivation?"; - v_msgEng="Do you confirm the deactivation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codePrestataire="+codePrestataire; - donnees += "&motif="+motif_activation; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestataire/desactiverderogationfinger/", - 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); - - retour_prestataire_id(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function activer_derogation_finger_prestataire(codePrestataire) -{ - v_msg="Veuillez saisir le motif de l\'activation!"; - v_msgEng="Please enter the reason for activation!"; - - motif_activation = prompt_ebene(v_msg, v_msgEng); - - if(motif_activation<=" ") - { - v_msg="Vous devez saisir un motif!"; - v_msgEng="You have to enter a reason!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - v_msg="Confirmez-vous l\'activation?"; - v_msgEng="Do you confirm the activation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "codePrestataire="+codePrestataire; - donnees += "&motif="+motif_activation; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestataire/activerderogationfinger/", - 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); - - retour_prestataire_id(); - } - }); - return; - } - else - { - v_msg="Opération annulée!"; - v_msgEng="Operation canceled!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - - -function exporter_liste_clients() -{ - var div_export = $('#div_export_clients'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_liste_clients").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexporterlisteclients/", - type: 'POST', - // data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - // $("#btn_liste_clients").click(); - } - }); -} - - -function etat_fact_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_fact_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_fact_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_fact_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_fact_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_fact_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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 imprimer_emission_prime() -{ - idEmission=$("#idEmission").val(); - idPolice=$("#idPolice").val(); - - donnees = "idEmission="+idEmission+"&idPolice="+idPolice; - - var div_export = $('#div_export_emissions'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_export_emissions").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexporterquittancesemission/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function imprimer_quittance(idQuittance) -{ - if (idQuittance>"0") - { - donnees = "idQuittance="+idQuittance; - - - var div_export = $('#div_export_quittance'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_export_quittance").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexporterunequittance/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } - else - { - v_msg="Rien à imprimer!"; - v_msgEng="Nothing to print!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -// etatprod_encaissement -function etat_enc_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_enc_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_enc_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_enc_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_borderau_encissements() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - 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_borderau_encissements_export() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - $('#div_export_a').html(""); - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function ctrlkeypressemission(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - $("#numeroEmission").blur(); - } -} - -function requete_chercher_emission(numeroEmission) -{ - $("#div_consulter_resultat").html(''); - - $("#div_consulter_resultat").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'numeroEmission='+numeroEmission; - - - if(isNaN(numeroEmission)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroEmission").val("0"); - $("#numeroEmission").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrechercheemission/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_consulter_resultat").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ctrlkeypressquittance(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - $("#idQuittance").blur(); - } -} - -function requete_chercher_quittance(idQuittance) -{ - $("#div_consulter_resultat").html(''); - - $("#div_consulter_resultat").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idQuittance='+idQuittance; - - if(isNaN(idQuittance)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idQuittance").val("0"); - $("#idQuittance").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrecherchequittance/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_consulter_resultat").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ctrlkeypressencaissement(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - $("#numeroEncaissement").blur(); - } -} - -function requete_chercher_encaissement(numeroEncaissement) -{ - $("#div_consulter_resultat").html(''); - - $("#div_consulter_resultat").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'numeroEncaissement='+numeroEncaissement; - - if(isNaN(numeroEncaissement)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroEncaissement").val("0"); - $("#numeroEncaissement").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrechercheencaissement/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_consulter_resultat").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function afficher_emission_retour() -{ - idEmission = $("#idEmission").val(); - - if (idEmission>"0") - { - window.location.assign($("#racineWeb" ).val()+"Emission/"+idEmission+"/"); - } -} - -function etat_enc_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('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.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_beneficiare_prime_adherent() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbeneficiaireprimeadherent/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - } - }); -} - -function afficher_beneficiare_prime_beneficiaire() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxbeneficiaireprimebeneficiaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - } - }); -} - -function maj_motif_non_paiement(idReglement, motifNonPaiement) -{ - v_msg="Veuillez saisir ou modifier le commentaire!"; - v_msgEng="Please enter or edit comments!"; - - motifNonPaiement = prompt_ebene(v_msg, v_msgEng, motifNonPaiement); - - if(motifNonPaiement==null) - { - return; - } - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - - donnees = 'idReglement='+idReglement+"&motifNonPaiement="+motifNonPaiement; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxldemandesteglementcpt/majmotifnonpaiement/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - } - }); - } -} - -function afficher_garantieadherent_exo() -{ - var div_attente = $('#div_gar_exo'); - - exercieReference=$("#exercieReference").val(); - - if (exercieReference<=" ") - { - v_msg="Veuillez sélectionner un exercice!"; - v_msgEng="Please select an exercise!"; - alert_ebene(v_msg, v_msgEng); - - $("#exercieReference").focus(); - - div_attente.html(''); - - return; - } - - donnees = 'exercieReference='+exercieReference; - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxplafondadherent/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function afficher_garantieadherent_entete_contrat() -{ - var div_attente = $('#div_gar_exo'); - - idEntetecontrat=$("#idEntetecontrat").val(); - - if (idEntetecontrat<="0") - { - v_msg="Veuillez sélectionner une période!"; - v_msgEng="Please select a period!"; - alert_ebene(v_msg, v_msgEng); - - $("#idEntetecontrat").focus(); - - div_attente.html(''); - - return; - } - - // donnees = 'exercieReference='+exercieReference; - donnees = 'idEntetecontrat='+idEntetecontrat; - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxplafondadherent/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function ajaxdelaicarencetypecontrat() -{ - codeTypeContrat=$("#codeTypeContrat").val(); - - donnees = 'codeTypeContrat='+codeTypeContrat; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdelaicarencetypecontrat/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#infodelaicarence").html(data); - }, - complete: function() { - $("#delaiCarencePolice").val( $("#delaiCarencePolice_info").val()); - } - }); -} - -function afficher_liste_medecins() -{ - donnees = ""; - donnees_retour = ""; - - - codeSpecialite = $("#codeSpecialite").val(); - nom = $("#nom").val(); - prenoms = $("#prenoms").val(); - noOrdreMedecin = $("#noOrdreMedecin").val(); - - if(codeSpecialite<=" " && nom<=" " && prenoms<=" " && noOrdreMedecin<=" ") - { - v_msg="Veuillez saisir le filtre!"; - v_msgEng="Please enter the filter!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeSpecialite").focus(); - return; - } - - donnees += 'codeSpecialite=' + codeSpecialite; - donnees += '&nom=' + nom; - donnees += '&prenoms=' + prenoms; - donnees += '&noOrdreMedecin=' + noOrdreMedecin; - - $("#div_liste_medeins").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistemedecinsparametrage/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_liste_medeins").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function ctrlkeypress_liste_medecins(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_liste_medecins(); - } -} - -function imprimer_liste_medecins() -{ - donnees = ""; - donnees_retour = ""; - - - codeSpecialite = $("#codeSpecialite").val(); - nom = $("#nom").val(); - prenoms = $("#prenoms").val(); - noOrdreMedecin = $("#noOrdreMedecin").val(); - - if(codeSpecialite<=" " && nom<=" " && prenoms<=" " && noOrdreMedecin<=" ") - { - v_msg="Veuillez saisir le filtre!"; - v_msgEng="Please enter the filter!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeSpecialite").focus(); - return; - } - - donnees += 'codeSpecialite=' + codeSpecialite; - donnees += '&nom=' + nom; - donnees += '&prenoms=' + prenoms; - donnees += '&noOrdreMedecin=' + noOrdreMedecin; - - $("#div_liste_medeins").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerlistemedecins/", - type: 'POST', - data: donnees, - success: function(data) - { - $("#div_liste_medeins").html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function exporter_liste_medecins() -{ - donnees = ""; - donnees_retour = ""; - - - codeSpecialite = $("#codeSpecialite").val(); - nom = $("#nom").val(); - prenoms = $("#prenoms").val(); - noOrdreMedecin = $("#noOrdreMedecin").val(); - - if(codeSpecialite<=" " && nom<=" " && prenoms<=" " && noOrdreMedecin<=" ") - { - v_msg="Veuillez saisir le filtre!"; - v_msgEng="Please enter the filter!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeSpecialite").focus(); - return; - } - - donnees += 'codeSpecialite=' + codeSpecialite; - donnees += '&nom=' + nom; - donnees += '&prenoms=' + prenoms; - donnees += '&noOrdreMedecin=' + noOrdreMedecin; - - $("#div_liste_medeins").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerlistemedecinsexport/", - type: 'POST', - data: donnees, - success: function(data) - { - $("#div_liste_medeins").html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function afficher_medecin_id(idMedecin) -{ - window.location.assign($("#racineWeb" ).val()+"Fichemedecin/"+idMedecin+"/"); -} - -function modifier_medecin() -{ - idMedecin = $("#idMedecin" ).val(); - - if (idMedecin>"0") - { - window.location.assign($("#racineWeb" ).val()+"Modifiermedecin/"+idMedecin+"/"); - } -} - -function creer_medecin() -{ - nom = $("#nom").val(); - prenoms = $("#prenoms").val(); - codeSpecialite = $("#codeSpecialite").val(); - noOrdreMedecin = $("#noOrdreMedecin").val(); - telephone = $("#telephone").val(); - email = $("#email").val(); - sexe = $("#sexe").val(); - - if(nom<=" ") - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#nom").focus(); - return; - } - - if(prenoms<=" ") - { - v_msg="Veuillez indiquer le prénoms!"; - v_msgEng="Please give the first names"; - alert_ebene(v_msg, v_msgEng); - - $("#prenoms").focus(); - return; - } - - if(codeSpecialite<=" ") - { - v_msg="Veuillez sélectionner la spécialité!"; - v_msgEng="Please select the specialty"; - alert_ebene(v_msg, v_msgEng); - - $("#codeSpecialite").focus(); - return; - } - - if(sexe<=" ") - { - v_msg="Veuillez indiquer le sexe!"; - v_msgEng="Please indicate sex"; - alert_ebene(v_msg, v_msgEng); - - $("#sexe").focus(); - return; - } - - donnees = 'nom='+nom+'&prenoms='+prenoms; - donnees += '&telephone='+telephone+'&email='+email; - donnees += '&codeSpecialite='+codeSpecialite+'&noOrdreMedecin='+noOrdreMedecin+'&sexe='+sexe; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ce nouveau médecin?"; - v_msgEng="Confirm this new doctor?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmedecinparam/creermedecin/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $('#div_unicite_medecin').html(data); - }, - complete: function() - { - unicitemedecin = $("#unicitemedecin").val(); - if(unicitemedecin==1) - { - v_msg="Médecin créé avec succès!"; - v_msgEng="Doctor created succssfully!"; - alert_ebene(v_msg, v_msgEng); - - retour_a_medecins(); - } - else - { - v_msg="No Ordre " + noOrdreMedecin +" déjà utilisé!"; - v_msgEng="Doctor Order No " + noOrdreMedecin +" already in use!"; - alert_ebene(v_msg, v_msgEng); - - $("#noOrdreMedecin").focus(); - } - } - }); - } -} - -function retour_a_medecins() -{ - window.location.assign($("#racineWeb" ).val()+"Medecins/"); -} - -function retour_medecin_id() -{ - idMedecin = $("#idMedecin").val(); - afficher_medecin_id(idMedecin); -} - -function enregistrer_modif_medecin() -{ - idMedecin = $("#idMedecin").val(); - nom = $("#nom").val(); - prenoms = $("#prenoms").val(); - codeSpecialite = $("#codeSpecialite").val(); - noOrdreMedecin = $("#noOrdreMedecin").val(); - telephone = $("#telephone").val(); - email = $("#email").val(); - sexe = $("#sexe").val(); - - if(nom<=" ") - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#nom").focus(); - return; - } - - if(prenoms<=" ") - { - v_msg="Veuillez indiquer le prénoms!"; - v_msgEng="Please give the first names"; - alert_ebene(v_msg, v_msgEng); - - $("#prenoms").focus(); - return; - } - - if(codeSpecialite<=" ") - { - v_msg="Veuillez sélectionner la spécialité!"; - v_msgEng="Please select the specialty"; - alert_ebene(v_msg, v_msgEng); - - $("#codeSpecialite").focus(); - return; - } - - if(sexe<=" ") - { - v_msg="Veuillez indiquer le sexe!"; - v_msgEng="Please indicate sex"; - alert_ebene(v_msg, v_msgEng); - - $("#sexe").focus(); - return; - } - - donnees = 'idMedecin='+idMedecin+'&nom='+nom; - donnees += '&prenoms='+prenoms; - donnees += '&telephone='+telephone+'&email='+email; - donnees += '&codeSpecialite='+codeSpecialite+'&noOrdreMedecin='+noOrdreMedecin+'&sexe='+sexe; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmedecinparam/enregistrermodifmedecin/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - retour_medecin_id(); - } - }); - } -} - -function reposmedical() -{ - actVisible=$("#actVisible").val(); - - if (actVisible!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Reposmedical/"); -} - -function afficher_repos_medical() -{ - $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxreposmedical/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_notes").html(donnees_retour); - } - }); -} - -function initier_repos_medical() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxreposmedical/nouveaureposmedical/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_note_new").html(data); - }, - complete: function() { - $("#btn_pop_note_new").click(); - } - }); -} - -function enregistrer_new_repos_medical() -{ - notesNew = $("#notesNew").val(); - notesNew = notesNew.trim(); - - if (notesNew<=" ") - { - v_msg="Veuillez saisir la note!"; - v_msgEng="Please enter the note!"; - alert_ebene(v_msg, v_msgEng); - - $("#notesNew").focus(); - return; - } - - nbJour = $("#nbJour").val(); - - if(isNaN(nbJour)) - { - v_msg="Veuillez revoir la duréee!"; - v_msgEng="Please review the duration!"; - alert_ebene(v_msg, v_msgEng); - - $("#nbJour").focus(); - return; - } - - if (nbJour<="0") - { - v_msg="Veuillez revoir la duréee!"; - v_msgEng="Please review the duration!"; - alert_ebene(v_msg, v_msgEng); - - $("#nbJour").focus(); - return; - } - - donnees = 'notesNew='+notesNew+"&nbJour="+nbJour; - - v_msg="Confirmez-vous ce repos médical?"; - v_msgEng="Do you confirm this medical rest?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxreposmedical/creerreposmedical/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#btn_pop_note_new_quit").click(); - }, - complete: function() { - afficher_repos_medical(); - } - }); - } -} - -function charger_detail_stat_police_anomalies() -{ - $('#div_export_b').html(""); - idPolice = $("#idPolice").val(); - donnees = "idPolice="+idPolice; - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailrapportspanomalie/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_export_b').html(donnees_retour); - } - }); -} - -function imprimer_quittance_client(idQuittance) -{ - if (idQuittance>"0") - { - donnees = "idQuittance="+idQuittance; - - - var div_export = $('#div_export_quittance'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_export_quittance").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexporterunequittanceclient/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); - } - else - { - v_msg="Rien à imprimer!"; - v_msgEng="Nothing to print!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function imprimer_livraison_bon_differe(idgenerartionbon) -{ - donnees = "idgenerartionbon="+idgenerartionbon; - - $('#btn_accuse_reception').click(); - - var div_accuse_reception = $('#div_accuse_reception'); - div_accuse_reception.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerlivraisonbonsdiffere/", - type: 'POST', - data: donnees, - success: function(data) - { - div_accuse_reception.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function imprimer_livraison_bon_menu() -{ - idGenerationbon = $("#idGenerationbon").val(); - imprimer_livraison_bon_differe(idGenerationbon); -} - -function anteceentsmedicaux() -{ - estMedecin=$("#estMedecin").val(); - - if (estMedecin!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Anteceentsmedicaux/"); -} - -function diagnosticsbeneficiaire() -{ - estMedecin=$("#estMedecin").val(); - - if (estMedecin!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Diagnosticsconsbeneficiaire/"); -} - -function notesbeneficiaire() -{ - estMedecin=$("#estMedecin").val(); - - if (estMedecin!="1") - { - v_msg="Non autorisé!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - window.location.assign($("#racineWeb" ).val()+"Notesbeneficiaire/"); -} - -function afficher_diagnostics_beneficiaire() -{ - $("#div_dianostics").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdiagnosticsbeneficiaire/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_dianostics").html(donnees_retour); - } - }); -} - -function afficher_notes_beneficiaire() -{ - $("#div_notes").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnotesbeneficiaire/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_notes").html(donnees_retour); - } - }); -} - -function etat_sin_paiementprestationcumul_graph() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - $('#div_export_a').html(""); - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"graph/"; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - // alert("error =>"+errorData); - }, - success: function(data) { - donnees_retour = data; - // alert("success =>"+data); - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -// 27/11/2019 - -function etat_prod_par_mois_eclate() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - 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_eclate_export() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - $('#div_export_a').html(""); - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function effacer_caracteristiques_un_acte() -{ - $('#div_fiche_acte').html(""); -} - -function enregistrer_modif_caracteristiques_un_acte() -{ - idActe = $("#idActe").val(); - codeActe = $("#codeActe").val(); - - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - - // codeFamilleActe = $("#codeFamilleActe").val(); - codeFamilleActe = $("#codeFamilleActeMaj").val(); - codeGarantie = $("#codeGarantie").val(); - codeTarifActe = $("#codeTarifActe").val(); - codeTypePrestation = $("#codeTypePrestation").val(); - - ententePrealable = $("#ententePrealable").val(); - exclu = $("#exclu").val(); - actif = $("#actif").val(); - alerte = $("#alerte").val(); - delaiCarenceActe = $("#delaiCarenceActe").val(); - - if(libelle<=" ") - { - v_msg="Veuillez saisir le libellé en Français!"; - v_msgEng="Please enter the name in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez saisir le libellé en Anglais!"; - v_msgEng="Please enter the name in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - if(codeFamilleActe<=" ") - { - v_msg="Veuillez sélectionner la famille!"; - v_msgEng="Please select the family!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeFamilleActe").focus(); - return; - } - - if(codeGarantie<=" ") - { - v_msg="Veuillez sélectionner une garantie!"; - v_msgEng="Please select a benefit!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGarantie").focus(); - return; - } - - if(codeTarifActe<=" ") - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - if(codeTypePrestation<=" ") - { - v_msg="Veuillez sélectionner un type!"; - v_msgEng="Please select a type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypePrestation").focus(); - return; - } - - donnees = 'idActe='+idActe; - donnees += '&codeActe='+codeActe; - - donnees += '&libelle='+libelle; - donnees += '&libelleEng='+libelleEng; - donnees += '&codeFamilleActe='+codeFamilleActe; - donnees += '&codeGarantie='+codeGarantie; - donnees += '&codeTarifActe='+codeTarifActe; - donnees += '&codeTypePrestation='+codeTypePrestation; - - donnees += '&ententePrealable='+ententePrealable; - donnees += '&exclu='+exclu; - donnees += '&actif='+actif; - donnees += '&alerte='+alerte; - donnees += '&delaiCarenceActe='+delaiCarenceActe; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxacracteristiquesacte/enregistrermodifcaracteristiquesacte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - $('#div_fiche_acte').html(""); - }, - complete: function() - { - afficher_caracteristiques_acte(); - } - }); - } -} - -function retour_tarifs_actes() -{ - window.location.assign($("#racineWeb" ).val()+"Tarifsactes/"); -} - -function retour_tarifs_optiques() -{ - window.location.assign($("#racineWeb" ).val()+"Tarifsoptiques/"); -} - -function creer_tarif_actes() -{ - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le nom en Français!"; - v_msgEng="Please enter the name in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez indiquer le nom en Anglais!"; - v_msgEng="Please enter the name in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - donnees = 'libelle='+libelle+'&libelleEng='+libelleEng; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ce nouveau tarif?"; - v_msgEng="Do you confirm this new rate?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveautarifacte/creertarifactes/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_tarifs_actes(); - } - }); - } -} - -function modifier_tarif_actes(idTarif) -{ - window.location.assign($("#racineWeb" ).val()+"Modifiertarifacte/"+idTarif+"/"); -} - -function enregistrer_modif_tarif_actes() -{ - idTarif = $("#idTarif").val(); - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le nom en Français!"; - v_msgEng="Please enter the name in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez indiquer le nom en Anglais!"; - v_msgEng="Please enter the name in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - donnees = 'idTarif='+idTarif+'&libelle='+libelle+'&libelleEng='+libelleEng; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveautarifacte/enregistrermodif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - lister_tarif_actes(); - } - }); - } -} - -function lister_tarif_actes() -{ - window.location.assign($("#racineWeb" ).val()+"Listetarifacte/"); -} - -function importer_tarif_actes(idTarif) -{ - v_msg="En cours!"; - v_msgEng="In progress!"; - alert_ebene(v_msg, v_msgEng); - - // return; - - // window.location.assign($("#racineWeb" ).val()+"Importertarifacte/"+idTarif+"/"); -} - -function supprimer_tarif_actes(idTarif) -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveautarifacte/supprimer/", - type : 'post', - data: "idTarif="+idTarif, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - lister_tarif_actes(); - } - }); - } -} - -function creer_tarif_optiques() -{ - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le nom en Français!"; - v_msgEng="Please enter the name in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez indiquer le nom en Anglais!"; - v_msgEng="Please enter the name in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - donnees = 'libelle='+libelle+'&libelleEng='+libelleEng; - - v_msg="Confirmez-vous ce nouveau tarif?"; - v_msgEng="Do you confirm this new rate?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveautarifoptique/creertarifoptiques/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_tarifs_optiques(); - } - }); - } -} - -function modifier_tarif_optiques(idTarif) -{ - window.location.assign($("#racineWeb" ).val()+"Modifiertarifoptique/"+idTarif+"/"); -} - -function importer_tarif_optiques(idTarif) -{ - v_msg="En cours!"; - v_msgEng="In progress!"; - alert_ebene(v_msg, v_msgEng); - - // return; - - // window.location.assign($("#racineWeb" ).val()+"Importertarifoptique/"+idTarif+"/"); -} - -function supprimer_tarif_optiques(idTarif) -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveautarifoptique/supprimer/", - type : 'post', - data: "idTarif="+idTarif, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - lister_tarif_optiques(); - } - }); - } -} - -function lister_tarif_optiques() -{ - window.location.assign($("#racineWeb" ).val()+"Listetarifoptique/"); -} - -function enregistrer_modif_tarif_optiques() -{ - idTarif = $("#idTarif").val(); - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le nom en Français!"; - v_msgEng="Please enter the name in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez indiquer le nom en Anglais!"; - v_msgEng="Please enter the name in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - donnees = 'idTarif='+idTarif+'&libelle='+libelle+'&libelleEng='+libelleEng; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveautarifoptique/enregistrermodif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - lister_tarif_optiques(); - } - }); - } -} - -function modifier_familles_actes(idFamilleacte) -{ - window.location.assign($("#racineWeb" ).val()+"Modifierfamilleacte/"+idFamilleacte+"/"); -} - -function supprimer_familles_actes(idFamilleacte) -{ - v_msg="Confirmez-vous cette suppression?"; - v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistefamilleactetarif/supprimer/", - type : 'post', - data: "idFamilleacte="+idFamilleacte, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - afficher_famille_actes_tarif() - } - }); - } -} - -function afficher_famille_actes_tarif() -{ - codeTarifActe=$("#codeTarifActe").val(); - - if (codeTarifActe<=" ") - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - donnees = 'codeTarifActe='+codeTarifActe; - - var div_attente = $('#div_liste_famille_acte'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistefamilleactetarif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function lister_famille_actes() -{ - window.location.assign($("#racineWeb" ).val()+"Listefamilleacte/"); -} - -function creer_famille_actes() -{ - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - - codeGarantie = $("#codeGarantie").val(); - codeTypePrestation = $("#codeTypePrestation").val(); - - codeTarifActe = $("#codeTarifActe").val(); - hospitalisation = $("#hospitalisation").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le nom en Français!"; - v_msgEng="Please enter the name in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez indiquer le nom en Anglais!"; - v_msgEng="Please enter the name in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - donnees = 'libelle='+libelle+'&libelleEng='+libelleEng; - donnees += '&codeGarantie='+codeGarantie+'&codeTypePrestation='+codeTypePrestation; - donnees += '&codeTarifActe='+codeTarifActe+'&hospitalisation='+hospitalisation; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ce nouvelle famille?"; - v_msgEng="Do you confirm this new family?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistefamilleactetarif/creerfamillectes/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - lister_famille_actes(); - } - }); - } -} - -function afficher_factures_feuille() -{ - $("#div_detail_factures").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturesfeuille/", - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_factures").html(donnees_retour); - } - }); -} - -function consulter_un_dossier() -{ - window.location.assign($("#racineWeb" ).val()+"Dossiercons/"); -} - -function afficher_factures_consultation(numeroBonConsultation) -{ - if (numeroBonConsultation<="0") - { - v_msg="Revoir le numéro!"; - v_msgEng="Review the number!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroBonConsultation").focus(); - - return; - } - - donnees = "numeroBonConsultation="+numeroBonConsultation; - - $("#div_detail_factures").html('
  ' + 'Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdossiercons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_factures").html(donnees_retour); - } - }); -} - -function ctrlkeypressconsultation(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - $("#numeroBonConsultation").blur(); - } -} - -function enregistrer_modif_famille_actes() -{ - idFamilleacte = $("#idFamilleacte").val(); - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - - codeGarantie = $("#codeGarantie").val(); - codeTypePrestation = $("#codeTypePrestation").val(); - - codeTarifActe = $("#codeTarifActe").val(); - hospitalisation = $("#hospitalisation").val(); - - if(libelle<=" ") - { - v_msg="Veuillez indiquer le nom en Français!"; - v_msgEng="Please enter the name in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez indiquer le nom en Anglais!"; - v_msgEng="Please enter the name in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - donnees = 'idFamilleacte='+idFamilleacte+'&libelle='+libelle+'&libelleEng='+libelleEng; - donnees += '&codeGarantie='+codeGarantie+'&codeTypePrestation='+codeTypePrestation; - donnees += '&codeTarifActe='+codeTarifActe+'&hospitalisation='+hospitalisation; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistefamilleactetarif/enregistrermodiffamilleactes/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - lister_famille_actes(); - } - }); - } -} - -function exporter_tarif_medicament() -{ - codeTarifMedicament=$("#codeTarifMedicament").val(); - - if(codeTarifMedicament<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - donnees = "codeTarifMedicament="+codeTarifMedicament; - - // alert(donnees); - // return; - - var div_export = $('#div_export_tarif'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_exporter_tarif").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexportertarifmedicament/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function rechercher_actes_famille_param() -{ - var div_detail = $('#div_detail_actes'); - - codeTarifActe=$("#codeTarifActe").val(); - codeFamilleActe=$("#codeFamilleActe").val(); - libelleActe=$("#libelleActe").val(); - - if(codeTarifActe<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - if(codeFamilleActe<=' ') - { - v_msg="Veuillez sélectionne une famille!"; - v_msgEng="Please select a family!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeFamilleActe").focus(); - return; - } - - donnees = 'codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe+'&libelleActe='+libelleActe; - - div_detail.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactefamilleparam/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_detail.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - } - }); -} - -function ajaxfiltrefamilleactetarif() -{ - donnees = "codeTarifActe="+$("#codeTarifActe").val(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfiltrefamilletarif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - $("#listefamille").html(data); - } - }); -} - -function rechercher_actes_famille_param_tous() -{ - var div_detail = $('#div_detail_actes'); - - codeTarifActe=$("#codeTarifActe").val(); - codeFamilleActe=$("#codeFamilleActe").val(); - libelleActe=$("#libelleActe").val(); - - if(codeTarifActe<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - if(libelleActe<=' ') - { - v_msg="Veuillez saisir une désignation!"; - v_msgEng="Please enter a designation!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleActe").focus(); - return; - } - - donnees = 'codeTarifActe='+codeTarifActe+'&libelleActe='+libelleActe; - - div_detail.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxactefamilleparam/tous/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_detail.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - } - }); -} - -function enregistrer_nouvel_acte() -{ - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - codeFamilleActe = $("#codeFamilleActe").val(); - codeGarantie = $("#codeGarantie").val(); - codeTarifActe = $("#codeTarifActe").val(); - codeTypePrestation = $("#codeTypePrestation").val(); - - ententePrealable = $("#ententePrealable").val(); - exclu = $("#exclu").val(); - actif = $("#actif").val(); - alerte = $("#alerte").val(); - delaiCarenceActe = $("#delaiCarenceActe").val(); - - if(libelle<=" ") - { - v_msg="Veuillez saisir le libellé en Français!"; - v_msgEng="Please enter the name in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez saisir le libellé en Anglais!"; - v_msgEng="Please enter the name in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - if(codeFamilleActe<=" ") - { - v_msg="Veuillez sélectionner la famille!"; - v_msgEng="Please select the family!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeFamilleActe").focus(); - return; - } - - if(codeGarantie<=" ") - { - v_msg="Veuillez sélectionner une garantie!"; - v_msgEng="Please select a benefit!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGarantie").focus(); - return; - } - - if(codeTarifActe<=" ") - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - if(codeTypePrestation<=" ") - { - v_msg="Veuillez sélectionner un type!"; - v_msgEng="Please select a type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypePrestation").focus(); - return; - } - - donnees = 'libelle='+libelle; - donnees += '&libelleEng='+libelleEng; - donnees += '&codeFamilleActe='+codeFamilleActe; - donnees += '&codeGarantie='+codeGarantie; - donnees += '&codeTarifActe='+codeTarifActe; - donnees += '&codeTypePrestation='+codeTypePrestation; - - donnees += '&ententePrealable='+ententePrealable; - donnees += '&exclu='+exclu; - donnees += '&actif='+actif; - donnees += '&alerte='+alerte; - donnees += '&delaiCarenceActe='+delaiCarenceActe; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouvelacte/enregistrernouvelacte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_liste_actes(); - } - }); - } -} - -function retour_liste_actes() -{ - window.location.assign($("#racineWeb" ).val()+"Listeactes/"); -} - - -function modifier_un_acte(idActe) -{ - window.location.assign($("#racineWeb" ).val()+"Modifieracte/"+idActe+"/"); -} - -function enregistrer_modif_un_acte() -{ - idActe = $("#idActe").val(); - codeActe = $("#codeActe").val(); - - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - codeFamilleActe = $("#codeFamilleActe").val(); - codeGarantie = $("#codeGarantie").val(); - codeTarifActe = $("#codeTarifActe").val(); - codeTypePrestation = $("#codeTypePrestation").val(); - - ententePrealable = $("#ententePrealable").val(); - exclu = $("#exclu").val(); - actif = $("#actif").val(); - alerte = $("#alerte").val(); - delaiCarenceActe = $("#delaiCarenceActe").val(); - - if(libelle<=" ") - { - v_msg="Veuillez saisir le libellé en Français!"; - v_msgEng="Please enter the name in French!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez saisir le libellé en Anglais!"; - v_msgEng="Please enter the name in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - if(codeFamilleActe<=" ") - { - v_msg="Veuillez sélectionner la famille!"; - v_msgEng="Please select the family!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeFamilleActe").focus(); - return; - } - - if(codeGarantie<=" ") - { - v_msg="Veuillez sélectionner une garantie!"; - v_msgEng="Please select a benefit!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGarantie").focus(); - return; - } - - if(codeTarifActe<=" ") - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - if(codeTypePrestation<=" ") - { - v_msg="Veuillez sélectionner un type!"; - v_msgEng="Please select a type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypePrestation").focus(); - return; - } - - donnees = 'idActe='+idActe; - donnees += '&codeActe='+codeActe; - - donnees += '&libelle='+libelle; - donnees += '&libelleEng='+libelleEng; - donnees += '&codeFamilleActe='+codeFamilleActe; - donnees += '&codeGarantie='+codeGarantie; - donnees += '&codeTarifActe='+codeTarifActe; - donnees += '&codeTypePrestation='+codeTypePrestation; - - donnees += '&ententePrealable='+ententePrealable; - donnees += '&exclu='+exclu; - donnees += '&actif='+actif; - donnees += '&alerte='+alerte; - donnees += '&delaiCarenceActe='+delaiCarenceActe; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouvelacte/enregistrermodifacte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_liste_actes(); - } - }); - } -} - -function ctrlkeypress_rechercher_actes_famille_param(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - rechercher_actes_famille_param(); - } -} - -function ajax_composante_tarif() -{ - adminSin=$("#adminSin").val(); - - if (adminSin!="1") - { - v_msg="Non autorisée!"; - v_msgEng="Not allowed!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - codeTarifActe=$("#codeTarifActe").val(); - codeFamilleActe=$("#codeFamilleActe").val(); - - if(codeTarifActe<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - if(codeFamilleActe<=' ') - { - v_msg="Veuillez saisir une famille!"; - v_msgEng="Please select a family!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeFamilleActe").focus(); - return; - } - - donnees = 'codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe; - - var div_attente = $('#div_compsante_tarif'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarif/affichercomposantetarif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function ajouter_tous_actes_fam_au_tarif() -{ - codeTarifActe=$("#codeTarifActe").val(); - codeFamilleActe=$("#codeFamilleActe").val(); - - if(codeTarifActe<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - if(codeFamilleActe<=' ') - { - v_msg="Veuillez saisir une famille!"; - v_msgEng="Please select a family!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeFamilleActe").focus(); - return; - } - - donnees = 'codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarif/ajoutertousactsautarif/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - ajax_composante_tarif(); - } - }); - } -} - -function ajouter_un_acte_au_tarif(idActe) -{ - codeTarifActe=$("#codeTarifActe").val(); - codeFamilleActe=$("#codeFamilleActe").val(); - - if(codeTarifActe<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - if(codeFamilleActe<=' ') - { - v_msg="Veuillez saisir une famille!"; - v_msgEng="Please select a family!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeFamilleActe").focus(); - return; - } - - donnees = 'idActe='+idActe+'&codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarif/ajouterunacteautarif/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - ajax_composante_tarif(); - } - }); -} - -function retirer_un_acte_du_tarif(idDetailtarifacte) -{ - donnees = 'idDetailtarifacte='+idDetailtarifacte; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarif/retirerunactedutarif/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - ajax_composante_tarif(); - } - }); -} - -function retirer_tous_actes_fam_du_tarif() -{ - codeTarifActe=$("#codeTarifActe").val(); - codeFamilleActe=$("#codeFamilleActe").val(); - - if(codeTarifActe<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - if(codeFamilleActe<=' ') - { - v_msg="Veuillez saisir une famille!"; - v_msgEng="Please select a family!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeFamilleActe").focus(); - return; - } - - donnees = 'codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarif/retirertousactsautarif/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - ajax_composante_tarif(); - } - }); - } -} - -function maj_composante_tarif_acte(idActe, prix) -{ - donnees = 'idActe='+idActe+"&prix="+prix; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarif/majprix/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function(data) - { - } - }); -} - -function ajaxfiltrefamilleactecomposantetarif() -{ - $("#div_compsante_tarif").html(""); - - donnees = "codeTarifActe="+$("#codeTarifActe").val(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfiltrefamillecomposantetarif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#listefamille").html(data); - } - }); -} - -function test_online() -{ - if(navigator.onLine) - { - $("#test_connexion").css('background-color', 'green'); - v_msg="Connexion OK!"; - v_msgEng="Connection OK"; - alert_ebene(v_msg, v_msgEng); - - } - else - { - $("#test_connexion").css('background-color', 'red'); - v_msg="Problème de Connexion!"; - v_msgEng="Connection Problem!"; - alert_ebene(v_msg, v_msgEng); - } - return; -} - -function raffraichier_messagerie() -{ - if(navigator.onLine) - { - $("#test_connexion").css('background-color', 'green'); - c_html = ""; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxmessagerie/", - success: function(data) { - c_html = data; - }, - error: function(errorData) { - }, - complete: function() { - $("#nbMessagesNonLus").html(c_html); - } - }); - } - else - { - $("#test_connexion").css('background-color', 'red'); - return; - } -} - -function ajax_composante_tarif_cons() -{ - codeTarifActe=$("#codeTarifActe").val(); - codeFamilleActe=$("#codeFamilleActe").val(); - - if(codeTarifActe<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - if(codeFamilleActe<=' ') - { - v_msg="Veuillez saisir une famille!"; - v_msgEng="Please select a family!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeFamilleActe").focus(); - return; - } - - donnees = 'codeTarifActe='+codeTarifActe+'&codeFamilleActe='+codeFamilleActe; - - var div_attente = $('#div_compsante_tarif'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarif/affichercomposantetarifcons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function archiver_tarif_actes(idTarif) -{ - // alert("archiver_tarif_actes"); - // return; - - // v_msg="Confirmez-vous cette suppression?"; - // v_msgEng="Do you confirm this deletion?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxnouveautarifacte/supprimer/", - type : 'post', - data: "idTarif="+idTarif, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - lister_tarif_actes(); - } - }); - } -} - -function exporter_composante_tarif_actes() -{ - codeTarifActe=$("#codeTarifActe").val(); - - if(codeTarifActe<=' ' || codeTarifActe=='ST') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - donnees = "codeTarifActe="+codeTarifActe; - - var div_export = $('#div_export_tarif'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_exporter_tarif").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexportertarif/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function ajax_init_destinataires_sms() -{ - codeTypeDestinataire=$("#codeTypeDestinataire").val(); - if(codeTypeDestinataire<=' ') - { - v_msg="Veuillez sélectionner un type de destinataire!"; - v_msgEng="Please select a recipient type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeDestinataire").focus(); - return; - } - - donnees = 'codeTypeDestinataire='+codeTypeDestinataire; - - if(codeTypeDestinataire=='LB') // Libre - { - ajax_init_destinataires_sms_libre(); - return; - } - else - if(codeTypeDestinataire=='AD') // adhérents - { - ajax_init_destinataires_sms_adherent(); - return; - } - else - { - $("#div_destinataire_final").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/init/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#div_destinataire").html(data); - }, - complete: function() - { - } - }); - } -} - -function ajax_init_destinataires_sms_libre() -{ - // $("#div_adherent_destinataire").html(''); - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/libre/", - type : 'post', - error: function(errorData) { - }, - success: function(data) - { - // $("#div_destinataire_final").html(data); - $("#div_destinataire").html(data); - }, - complete: function() - { - $("#noDestination").focus(); - } - }); -} - -function ajax_init_destinataires_sms_adherent() -{ - $("#div_destinataire_final").html(''); - // $("#div_adherent_destinataire").html(''); - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/adherent/", - error: function(errorData) { - }, - success: function(data) - { - // $("#div_adherent_destinataire").html(data); - $("#div_destinataire").html(data); - }, - complete: function() - { - } - }); -} - -function ajax_afficher_destinataires_sms() -{ - codeTypeDestinataire=$("#codeTypeDestinataire").val(); - if(codeTypeDestinataire<=' ') - { - v_msg="Veuillez sélectionner un type de destinataire!"; - v_msgEng="Please select a recipient type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeDestinataire").focus(); - return; - } - - donnees = 'codeTypeDestinataire='+codeTypeDestinataire; - - - // $("#div_adherent_destinataire").html(''); - - $("#div_destinataire_final").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - $("#div_destinataire_final").html(data); - }, - complete: function() { - } - }); -} - -function mettre_sms_commun_attente() -{ - nbDestinataires = $("#nbDestinataires").val(); - if (nbDestinataires=="0") - { - v_msg="Aucun destinataire!"; - v_msgEng="No recipient!"; - alert_ebene(v_msg, v_msgEng); - return; - } - - textMessage = $("#textMessageCommun").val(); - textMessage = textMessage.trim(); - - if (textMessage<=" ") - { - v_msg="Veuillez saisir le message!"; - v_msgEng="Please enter the message!"; - alert_ebene(v_msg, v_msgEng); - - $("#textMessageCommun").focus(); - return; - } - - donnees = "textMessage="+textMessage; - - $("#div_destinataire_final").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/mettresmscommeunattente/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // div_wait.html(data); - }, - complete: function() { - v_msg="Messages mis dans la queue des envois!"; - v_msgEng="Messages in the queue!"; - alert_ebene(v_msg, v_msgEng); - ajax_afficher_destinataires_sms(); - } - }); -} - -function annuler_envoi_sms() -{ - v_msg="Confirmez-vous cette annulation?"; - v_msgEng="Do you confirm this cancellation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - gerer_messagerie(); - } -} - -function ajouter_tous_destinataires_sms() -{ - codeTypeDestinataire=$("#codeTypeDestinataire").val(); - if(codeTypeDestinataire<=' ') - { - v_msg="Veuillez sélectionner un type de destinataire!"; - v_msgEng="Please select a recipient type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeDestinataire").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/ajouterdestinatairesmstous/", - // type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - ajax_afficher_destinataires_sms(); - } - }); -} - -function retirer_tous_destinataires_sms() -{ - codeTypeDestinataire=$("#codeTypeDestinataire").val(); - if(codeTypeDestinataire<=' ') - { - v_msg="Veuillez sélectionner un type de destinataire!"; - v_msgEng="Please select a recipient type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeDestinataire").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/retirerdestinatairesmstous/", - // type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - ajax_afficher_destinataires_sms(); - } - }); -} - -function ajouter_un_destinataire_sms(idDestinataire) -{ - donnees = 'idDestinataire='+idDestinataire; - - $("#div_destinataire_final").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/ajouterundestinatairesms/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - ajax_afficher_destinataires_sms(); - } - }); -} - -function retirer_un_destinataire_sms(idDestinataire) -{ - donnees = 'idDestinataire='+idDestinataire; - - $("#div_destinataire_final").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/retirerundestinatairesms/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - ajax_afficher_destinataires_sms(); - } - }); -} - -function mettre_sms_commun_attente_libre() -{ - noDestination = $("#noDestination").val(); - if(noDestination.length<5) - { - v_msg="Aucun destinataire!"; - v_msgEng="No recipient!"; - alert_ebene(v_msg, v_msgEng); - - $("#noDestination").focus(); - return; - } - - textMessage = $("#textMessageCommun").val(); - textMessage = textMessage.trim(); - - if (textMessage<=" ") - { - v_msg="Veuillez saisir le message!"; - v_msgEng="Please enter the message!"; - alert_ebene(v_msg, v_msgEng); - - $("#textMessageCommun").focus(); - return; - } - - donnees = "noDestination="+noDestination+"&textMessage="+textMessage; - - // alert(donnees); - // return; - - $("#div_destinataire_final").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/mettresmscommeunattentelibre/", - type: 'POST', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // div_wait.html(data); - }, - complete: function() { - v_msg="Messages mis dans la queue des envois!"; - v_msgEng="Messages in the queue!"; - alert_ebene(v_msg, v_msgEng); - - ajax_init_destinataires_sms_libre(); - } - }); -} - -function consulter_envois_sms() -{ - donnees = ""; - donnees_retour = ""; - - date1 = $("#date1").val(); - date2 = $("#date2").val(); - - donnees += 'date1=' + date1; - donnees += '&date2=' + date2; - - $("#div_sms").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/consulter/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_sms").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function ajax_init_destinataires_sms_adherent_suite() -{ - codeTypeDestinataireAdherent=$("#codeTypeDestinataireAdherent").val(); - if(codeTypeDestinataireAdherent<=' ') - { - v_msg="Veuillez sélectionner un type de recherche!"; - v_msgEng="Please select a search type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeDestinataireAdherent").focus(); - return; - } - - donnees = 'codeTypeDestinataireAdherent='+codeTypeDestinataireAdherent; - - $("#div_destinataire_adherent_final").html(''); - $("#div_destinataire_adherent_client_liste").html(''); - $("#div_destinataire_adherent_client").html(''); - - if(codeTypeDestinataireAdherent=='CL') // Client - { - ajax_init_destinataires_sms_adherent_suite_client(); - return; - } - else - if(codeTypeDestinataireAdherent=='CLOC') // Client et Localité - { - ajax_init_destinataires_sms_adherent_suite_client_localite(); - return; - } - else - if(codeTypeDestinataireAdherent=='LOC') // Localité - { - ajax_init_destinataires_sms_adherent_suite_localite(); - return; - } -} - -function sms_recherche_adherent_client() -{ - nomClientAdherent=$("#nomClientAdherent").val(); - if(nomClientAdherent<=' ') - { - v_msg="Veuillez entrer un nom!"; - v_msgEng="Please enter a name!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomClientAdherent").focus(); - return; - } - - donnees = 'nomClientAdherent='+nomClientAdherent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/adherentclienliste/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - $('#div_destinataire_adherent_client_liste').html(data); - }, - complete: function() - { - } - }); -} - -function ajax_init_destinataires_sms_adherent_suite_client() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/adherentclient/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_destinataire_adherent_client").html(data); - }, - complete: function() - { - $("#nomClientAdherent").focus(); - } - }); -} - -function ajax_afficher_destinataires_sms_adherent() -{ - $("#div_destinataire_adherent_final").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - $("#div_destinataire_final").html(data); - }, - complete: function() { - } - }); -} - -function ajax_init_destinataires_sms_adherent_client() -{ - numeroClientAdherent=$("#numeroClientAdherent").val(); - if(numeroClientAdherent<=' ') - { - v_msg="Veuillez sélectionner un client!"; - v_msgEng="Please select a customer type!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroClientAdherent").focus(); - return; - } - - donnees = 'numeroClientAdherent='+numeroClientAdherent; - - $("#div_destinataire_adherent_final").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/initenvoismsadherentclient/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - ajax_afficher_destinataires_sms_adherent(); - }, - complete: function() - { - } - }); -} - -function ajax_init_destinataires_sms_adherent_suite_localite() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/adherentlocalite/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_destinataire_adherent_client").html(data); - }, - complete: function() - { - $("#codeVille").focus(); - } - }); -} - -function ajax_init_destinataires_sms_adherent_localite() -{ - codePays = $("#codePays").val(); - codeVille = $("#codeVille").val(); - codeLocalite = $("#codeLocalite").val(); - - donnees = 'codePays=' + codePays; - donnees += '&codeVille=' + codeVille; - donnees += '&codeLocalite=' + codeLocalite; - - // alert(donnees); - // return; - - $("#div_destinataire_adherent_final").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/initenvoismsadherentlocalite/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - ajax_afficher_destinataires_sms_adherent(); - }, - complete: function() - { - } - }); -} - -function ajax_init_destinataires_sms_adherent_suite_client_localite() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/adherentclientlocalite/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_destinataire_adherent_client").html(data); - }, - complete: function() - { - $("#nomClientAdherent").focus(); - } - }); -} - -function sms_recherche_adherent_client_localite() -{ - nomClientAdherent=$("#nomClientAdherent").val(); - if(nomClientAdherent<=' ') - { - v_msg="Veuillez entrer un nom!"; - v_msgEng="Please enter a name!"; - alert_ebene(v_msg, v_msgEng); - - $("#nomClientAdherent").focus(); - return; - } - - donnees = 'nomClientAdherent='+nomClientAdherent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/adherentclientlocaliteliste/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - $('#div_destinataire_adherent_client_liste').html(data); - }, - complete: function() - { - } - }); -} - -function ajax_init_destinataires_sms_adherent_client_localite() -{ - numeroClientAdherent=$("#numeroClientAdherent").val(); - if(numeroClientAdherent<=' ') - { - v_msg="Veuillez sélectionner un client!"; - v_msgEng="Please select a customer type!"; - alert_ebene(v_msg, v_msgEng); - - $("#numeroClientAdherent").focus(); - return; - } - - donnees = 'numeroClientAdherent='+numeroClientAdherent; - - codePays = $("#codePays").val(); - codeVille = $("#codeVille").val(); - codeLocalite = $("#codeLocalite").val(); - - donnees += '&codePays=' + codePays; - donnees += '&codeVille=' + codeVille; - donnees += '&codeLocalite=' + codeLocalite; - - // alert(donnees); - // return; - - $("#div_destinataire_adherent_final").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdestinatairesms/initenvoismsadherentclientlocalite/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - ajax_afficher_destinataires_sms_adherent(); - }, - complete: function() - { - } - }); -} - -function re_init_envoi_sms() -{ - window.location.assign($("#racineWeb" ).val()+"Envoisms/"); -} - -function afficher_adherents_localite() -{ - donnees_retour = ""; - donnees = ""; - - codeLocalite = $("#codeLocalite").val(); - - if(codeLocalite<=' ') - { - v_msg="Veuillez revoir la sélection!"; - v_msgEng="Please review the selection!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeVille").focus(); - return; - } - - donnees = 'codeLocalite=' + codeLocalite; - - $("#div_adherent").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlocaliseradherent/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_adherent").html(donnees_retour); - } - }); -} - -function ajaxListerLocaliteAdherent() -{ - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlocalite/filtreadherentlocalite/", - type : 'post', - data: "codePays="+$("#codePays").val()+"&codeVille="+$("#codeVille").val(), - error: function(errorData) { - }, - success: function(data) { - $("#listelocalite").html(data); - } - }); -} - -function ajouter_tous_adherents_localte() -{ - codeLocalite=$("#codeLocalite").val(); - if(codeLocalite<=' ') - { - v_msg="Veuillez sélectionner une localité!"; - v_msgEng="Please select a location!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeLocalite").focus(); - return; - } - - donnees = 'codeLocalite=' + codeLocalite; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlocaliseradherent/ajouteradherentlocalitetous/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - afficher_adherents_localite(); - } - }); -} - -function ajouter_un_adherent_localte(idAherent) -{ - donnees = 'codeLocalite=' + codeLocalite; - donnees += '&idAherent='+idAherent; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlocaliseradherent/ajouterunadherentlocalite/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - afficher_adherents_localite(); - } - }); -} - -function exporter_adherents_localite() -{ - var div_export = $('#div_exporter'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_exporter").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexporterlocaliseradherent/", - // type: 'POST', - // data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - - -function ajax_init_composante_tarif_medicamant_cons() -{ - $('#div_compsante_tarif').html(""); - $("#libelleActe").focus(); -} - -function ajax_composante_tarif_medicaments_cons() -{ - codeTarifMedicament=$("#codeTarifMedicament").val(); - libelleMedicament=$("#libelleMedicament").val(); - - if(codeTarifMedicament<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifMedicament").focus(); - return; - } - - if(libelleMedicament<=' ') - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleMedicament").focus(); - return; - } - - donnees = 'codeTarifMedicament='+codeTarifMedicament+'&libelleMedicament='+libelleMedicament; - - var div_attente = $('#div_compsante_tarif'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/affichercomposantetarifcons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function rechercher_medicaments_param() -{ - libelleMedicament=$("#libelleMedicament").val(); - - if(libelleMedicament<=' ') - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleMedicament").focus(); - return; - } - - donnees = 'libelleMedicament='+libelleMedicament; - - // alert(donnees); - // return; - - var div_attente = $('#div_detail_medicaments'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/listemedicaments/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function ctrlkeypress_composante_tarif_medicaments_cons(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - ajax_composante_tarif_medicaments_cons(); - } -} - -function ctrlkeypress_rechercher_medicaments_param(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - rechercher_medicaments_param(); - } -} - -function modifier_un_medicament(idMedicament) -{ - window.location.assign($("#racineWeb" ).val()+"Modifiermedicament/"+idMedicament+"/"); -} - -function retour_liste_medicaments() -{ - window.location.assign($("#racineWeb" ).val()+"Listemedicaments/"); -} - -function enregistrer_modif_un_medicament() -{ - idMedicament = $("#idMedicament").val(); - codeMedicament = $("#codeMedicament").val(); - - libelle = $("#libelle").val(); - unite = $("#unite").val(); - - ententePrealable = $("#ententePrealable").val(); - exclu = $("#exclu").val(); - actif = $("#actif").val(); - instructions = $("#instructions").val(); - - if(libelle<=" ") - { - v_msg="Veuillez saisir la désignation!"; - v_msgEng="Please enter the designation!!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(unite<=" ") - { - v_msg="Veuillez saisir l\'unité!"; - v_msgEng="Please enter the unit!"; - alert_ebene(v_msg, v_msgEng); - - $("#unite").focus(); - return; - } - - donnees = 'idMedicament='+idMedicament; - donnees += '&codeMedicament='+codeMedicament; - - donnees += '&libelle='+libelle; - donnees += '&unite='+unite; - - donnees += '&ententePrealable='+ententePrealable; - donnees += '&exclu='+exclu; - donnees += '&actif='+actif; - donnees += '&instructions='+instructions; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/enregistrermodifmedicament/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_liste_medicaments(); - } - }); - } -} - -function exporter_liste_actes() -{ - codeTarifActe=$("#codeTarifActe").val(); - - if(codeTarifActe<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - donnees = "codeTarifActe="+codeTarifActe; - - // alert(donnees); - // return; - - var div_export = $('#div_export_acte'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_exporter").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexportertarif/listeacte/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function exporter_liste_medicaments() -{ - var div_export = $('#div_export_medicament'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_exporter").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexportertarifmedicament/listemedicament/", - // type: 'POST', - // data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function enregistrer_nouvel_medicament() -{ - libelle = $("#libelle").val(); - unite = $("#unite").val(); - - ententePrealable = $("#ententePrealable").val(); - exclu = $("#exclu").val(); - actif = $("#actif").val(); - instructions = $("#instructions").val(); - - if(libelle<=" ") - { - v_msg="Veuillez saisir la désignation!"; - v_msgEng="Please enter the designation!!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(unite<=" ") - { - v_msg="Veuillez saisir l\'unité!"; - v_msgEng="Please enter the unit!"; - alert_ebene(v_msg, v_msgEng); - - $("#unite").focus(); - return; - } - - donnees = 'libelle='+libelle; - donnees += '&unite='+unite; - - donnees += '&ententePrealable='+ententePrealable; - donnees += '&exclu='+exclu; - donnees += '&actif='+actif; - donnees += '&instructions='+instructions; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/enregistrernouveaumedicament/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_liste_medicaments(); - } - }); - } -} - -function ctrlkeypress_composante_tarif_medicaments(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - ajax_composante_tarif_medicaments(); - } -} - -function ajax_composante_tarif_medicaments() -{ - codeTarifMedicament=$("#codeTarifMedicament").val(); - libelleMedicament=$("#libelleMedicament").val(); - - if(codeTarifMedicament<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifMedicament").focus(); - return; - } - - if(libelleMedicament<=' ') - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleMedicament").focus(); - return; - } - - donnees = 'codeTarifMedicament='+codeTarifMedicament+'&libelleMedicament='+libelleMedicament; - - // alert(donnees); - // return; - - var div_attente = $('#div_compsante_tarif'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/affichercomposantetarif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function ajouter_tous_medicaments_libelle_au_tarif() -{ - codeTarifMedicament=$("#codeTarifMedicament").val(); - libelleMedicament=$("#libelleMedicament").val(); - - if(codeTarifMedicament<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifMedicament").focus(); - return; - } - - if(libelleMedicament<=' ') - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleMedicament").focus(); - return; - } - - donnees = 'codeTarifMedicament='+codeTarifMedicament+'&libelleMedicament='+libelleMedicament; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/ajoutertousmedicamentsautarif/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - ajax_composante_tarif_medicaments(); - } - }); - } -} - -function retirer_tous_medicaments_libelle_au_tarif() -{ - codeTarifMedicament=$("#codeTarifMedicament").val(); - libelleMedicament=$("#libelleMedicament").val(); - - if(codeTarifMedicament<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifMedicament").focus(); - return; - } - - if(libelleMedicament<=' ') - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleMedicament").focus(); - return; - } - - donnees = 'codeTarifMedicament='+codeTarifMedicament+'&libelleMedicament='+libelleMedicament; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/retirertousmedicamentsautarif/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - ajax_composante_tarif_medicaments(); - } - }); - } -} - -function ajouter_un_medicament_au_tarif(idMedicament) -{ - codeTarifMedicament=$("#codeTarifMedicament").val(); - - if(codeTarifMedicament<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifMedicament").focus(); - return; - } - - donnees = 'idMedicament='+idMedicament+'&codeTarifMedicament='+codeTarifMedicament; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/ajouterunamedicamentautarif/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - ajax_composante_tarif_medicaments(); - } - }); -} - -function retirer_un_medicament_du_tarif(idDetailtarifMedicament) -{ - donnees = 'idDetailtarifMedicament='+idDetailtarifMedicament; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/retirerunamedicamentutarif/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - ajax_composante_tarif_medicaments(); - } - }); -} - -function maj_composante_tarif_medicament(idDetailtarifMedicament, prix) -{ - donnees = 'idDetailtarifMedicament='+idDetailtarifMedicament+"&prix="+prix; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifmedicament/majprix/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function(data) - { - } - }); -} - -function exporter_tarif_verre() -{ - codeTarifOptique=$("#codeTarifOptique").val(); - - if(codeTarifOptique<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - donnees = "codeTarifOptique="+codeTarifOptique; - - alert(donnees); - return; - - var div_export = $('#div_export_tarif'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_exporter_tarif").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexportertarifmedicament/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function consulterfactureverres() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturecons/verres/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function consulterfactureverres_pop() -{ - idFacture = $("#idFacture").val(); - - $("#div_facture_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idFacture='+idFacture; - - if(isNaN(idFacture)) - { - v_msg="Valeur numérique exigée!"; - v_msgEng="Numeric value required!"; - alert_ebene(v_msg, v_msgEng); - - $("#idFacture").val("0"); - $("#idFacture").focus(); - return; - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfactureconspop/verres/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_facture_detail").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function exporter_tarif_verre() -{ - codeTarifOptique=$("#codeTarifOptique").val(); - - if(codeTarifOptique<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifActe").focus(); - return; - } - - donnees = "codeTarifOptique="+codeTarifOptique; - - // alert(donnees); - // return; - - var div_export = $('#div_export_tarif'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_exporter_tarif").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexportertarifverres/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - // $('#div_test_gabarit').html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function ctrlkeypress_rechercher_verres_param(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - rechercher_verres_param(); - } -} - -function rechercher_verres_param() -{ - libelleVerre=$("#libelleVerre").val(); - - if(libelleVerre<=' ') - { - v_msg="Veuillez indiquer la désigantion!"; - v_msgEng="Please enter the designation!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleVerre").focus(); - return; - } - - donnees = 'libelleVerre='+libelleVerre; - - // alert(donnees); - // return; - - var div_attente = $('#div_detail_verres'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/listeverres/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function modifier_un_verre(idVerre) -{ - window.location.assign($("#racineWeb" ).val()+"Modifierverre/"+idVerre+"/"); -} - -function retour_liste_verres() -{ - window.location.assign($("#racineWeb" ).val()+"Listeverres/"); -} - -function enregistrer_modif_un_verre() -{ - idVerre = $("#idVerre").val(); - codeOptique = $("#codeOptique").val(); - - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - - actif = $("#actif").val(); - - if(libelle<=" ") - { - v_msg="Veuillez saisir la désignation en français!"; - v_msgEng="Please enter the designation in french!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez saisir la désignation en Anglais!"; - v_msgEng="Please enter the designation in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - donnees = 'idVerre='+idVerre; - donnees += '&codeOptique='+codeOptique; - - donnees += '&libelle='+libelle; - donnees += '&libelleEng='+libelleEng; - - donnees += '&actif='+actif; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/enregistrermodifverre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_liste_verres(); - } - }); - } -} - -function exporter_liste_verres() -{ - var div_export = $('#div_export_verres'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_exporter").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexportertarifverres/listeverres/", - // type: 'POST', - // data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function enregistrer_nouveau_verre() -{ - libelle = $("#libelle").val(); - libelleEng = $("#libelleEng").val(); - actif = $("#actif").val(); - - if(libelle<=" ") - { - v_msg="Veuillez saisir la désignation!"; - v_msgEng="Please enter the designation!!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - if(libelleEng<=" ") - { - v_msg="Veuillez saisir la désignation en Anglais!"; - v_msgEng="Please enter the designation in English!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleEng").focus(); - return; - } - - - donnees = 'libelle='+libelle; - donnees += '&libelleEng='+libelleEng; - - donnees += '&actif='+actif; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/enregistrernouveauverre/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_liste_verres(); - } - }); - } -} - -function ajax_init_composante_tarif_verre_cons() -{ - $('#div_compsante_tarif').html(""); - $("#libelleVerre").focus(); -} - -function ctrlkeypress_composante_tarif_verre_cons(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - ajax_composante_tarif_verre_cons(); - } -} - -function ajax_composante_tarif_verre_cons() -{ - codeTarifOptique=$("#codeTarifOptique").val(); - libelleVerre=$("#libelleVerre").val(); - - if(codeTarifOptique<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifOptique").focus(); - return; - } - - /* - if(libelleVerre<=' ') - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleVerre").focus(); - return; - } - */ - - donnees = 'codeTarifOptique='+codeTarifOptique+'&libelleVerre='+libelleVerre; - - // alert(donnees); - // return; - - var div_attente = $('#div_compsante_tarif'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/affichercomposantetarifcons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function ctrlkeypress_composante_tarif_verres(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - ajax_composante_tarif_verres(); - } -} - -function ajax_composante_tarif_verres() -{ - codeTarifOptique=$("#codeTarifOptique").val(); - libelleVerre=$("#libelleVerre").val(); - - if(codeTarifOptique<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifOptique").focus(); - return; - } - - if(libelleVerre<=' ') - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleVerre").focus(); - return; - } - - donnees = 'codeTarifOptique='+codeTarifOptique+'&libelleVerre='+libelleVerre; - - // alert(donnees); - // return; - - var div_attente = $('#div_compsante_tarif'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/affichercomposantetarif/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_attente.html(data); - }, - complete: function() { - } - }); -} - - -function afficher_dernieres_factures_optique(idBeneficiaire) -{ - idFacture = $("#idFacture").val(); - - $("#div_dernieres_factures_optique").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'idBeneficiaire='+idBeneficiaire; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdernieresfacturesoptique/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_dernieres_factures_optique").html(data); - }, - error: function(data) { - }, - complete: function() { - } - }); -} - -function ajouter_tous_verres_libelle_au_tarif() -{ - codeTarifOptique=$("#codeTarifOptique").val(); - libelleVerre=$("#libelleVerre").val(); - - if(codeTarifOptique<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifOptique").focus(); - return; - } - - if(libelleVerre<=' ') - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleVerre").focus(); - return; - } - - donnees = 'codeTarifOptique='+codeTarifOptique+'&libelleVerre='+libelleVerre; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/ajoutertousverressautarif/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - ajax_composante_tarif_verres(); - } - }); - } -} - -function retirer_tous_verres_libelle_du_tarif() -{ - codeTarifOptique=$("#codeTarifOptique").val(); - libelleVerre=$("#libelleVerre").val(); - - if(codeTarifOptique<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifOptique").focus(); - return; - } - - if(libelleVerre<=' ') - { - v_msg="Veuillez indiquer le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelleVerre").focus(); - return; - } - - donnees = 'codeTarifOptique='+codeTarifOptique+'&libelleVerre='+libelleVerre; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/retirertousverressautarif/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - ajax_composante_tarif_verres(); - } - }); - } -} - -function ajouter_un_verre_au_tarif(idVerre) -{ - codeTarifOptique=$("#codeTarifOptique").val(); - - if(codeTarifOptique<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifOptique").focus(); - return; - } - - donnees = 'idVerre='+idVerre+'&codeTarifOptique='+codeTarifOptique; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/ajouterunverreautarif/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - ajax_composante_tarif_verres(); - } - }); -} - -function retirer_un_verre_au_tarif(idDetailtarifOptique) -{ - codeTarifOptique=$("#codeTarifOptique").val(); - - if(codeTarifOptique<=' ') - { - v_msg="Veuillez sélectionner un tarif!"; - v_msgEng="Please select a rate!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTarifOptique").focus(); - return; - } - - donnees = 'idDetailtarifOptique='+idDetailtarifOptique+'&codeTarifOptique='+codeTarifOptique; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/retirerunverredutarif/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - ajax_composante_tarif_verres(); - } - }); -} - -function maj_composante_tarif_verres(idDetailtarifOptique, prix) -{ - donnees = 'idDetailtarifOptique='+idDetailtarifOptique+"&prix="+prix; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxcomposantetarifoptique/majprix/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function(data) - { - } - }); -} - -function exporterbons() -{ - codePrestataire=$("#codePrestataire").val(); - - codeTypeBon=$("#codeTypeBon").val(); - codeEtatBon=$("#codeEtatBon").val(); - - noDepart=$("#noDepart").val(); - noFin=$("#noFin").val(); - - if (noDepart=="") - { - noDepart="0"; - } - - if (noFin=="") - { - noFin="0"; - } - - noDepart = parseInt(noDepart); - noFin = parseInt(noFin); - - if (codePrestataire<=" ") - { - v_msg="Veuillez sélectionner un prestataire!"; - v_msgEng="Please select a provider!"; - alert_ebene(v_msg, v_msgEng); - - $("#codePrestataire").focus(); - return; - } - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeBon").focus(); - return; - } - - if (noFin  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexporterbons/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function consulter_remplacer_medicament() -{ - $("#div_liste_medicaments_remplaces").html('
  ' + 'Veuillez patienter...' + '
'); - - $('#btn_medicaments_remplaces').click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/consulterremplacement/", - type: 'POST', - success: function(data) { - $("#div_liste_medicaments_remplaces").html(data); - }, - error: function(data) { - }, - complete: function() - { - // $('#btn_medicaments_remplaces').click(); - } - }); -} - -function etat_prod_par_mois_eclate_client() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - 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_eclate_client_export() -{ - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - $('#div_export_a').html(""); - - donnees_retour = ""; - donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode; - - $('#div_export_a').html(""); - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function exporter_modele_destinataire_sms() -{ - $('#div_form_upload').hide(); - - var div_export = $('#div_exporter_destinataires_sms'); - - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterdestinatairesms/exportermodele/", - type: 'POST', - // data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function charger_fichier_modele_destinataire_sms() -{ - $('#div_exporter_destinataires_sms').html(""); - - $('#div_form_upload').show(); - - // return; -} - -function importer_destinataire_sms() -{ - etape2=$("#etape2").val(); - - if (etape2 != "1") - { - v_msg="Etape 2 incomplète!"; - v_msgEng="Incomplete step 2!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $('#div_form_upload').hide(); - - var div_export = $('#div_exporter_destinataires_sms'); - - div_export.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - cheminFichier=$("#cheminFichier").val(); - - donnees = 'cheminFichier='+cheminFichier; - - $("#div_erreur_excel").html(""); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterdestinatairesms/importermodele/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(''); - $("#div_erreur_excel").html(data); - - v_msg="Opération terminée avec succès!"; - v_msgEng="Operation completed successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - alert("Actualisation..."); - reinitiliser_envois_sms_hors_systeme(); - } - }); -} - -function ajax_init_destinataires_sms_hos_systeme() -{ - etape3=$("#etape3").val(); - - if (etape3 != "1") - { - v_msg="Etape 3 incomplète!"; - v_msgEng="Incomplete step 3!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $("#div_envois_sms").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterdestinatairesms/init/", - error: function(errorData) { - }, - success: function(data) - { - $("#div_envois_sms").html(data); - }, - complete: function() - { - } - }); -} - -function reinitiliser_envois_sms_hors_systeme() -{ - window.location.assign($("#racineWeb" ).val()+"Importdestinatairesms/"); -} - -function histo_enrollement_empreinte() -{ - $("#div_detail_suppr_empreinte").html(""); - - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'debut='+debut+'&fin='+fin; - donnees_retour = ""; - - $("#div_detail_suppr_empreinte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxhistsupprempreinteexport/historiqueenrollement/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_suppr_empreinte").html(donnees_retour); - } - }); -} - -function imprimer_limites_adherent_entete_contrat() -{ - idEntetecontrat=$("#idEntetecontrat").val(); - - if (idEntetecontrat<="0") - { - v_msg="Veuillez sélectionner une période!"; - v_msgEng="Please select a period!"; - alert_ebene(v_msg, v_msgEng); - - $("#idEntetecontrat").focus(); - - div_attente.html(''); - - return; - } - - donnees = 'idEntetecontrat='+idEntetecontrat; - - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimerlimite/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function afficher_garantiebeneficiaire_entete_contrat() -{ - var div_attente = $('#div_gar_exo'); - - idEntetecontrat=$("#idEntetecontrat").val(); - - if (idEntetecontrat<="0") - { - v_msg="Veuillez sélectionner une période!"; - v_msgEng="Please select a period!"; - alert_ebene(v_msg, v_msgEng); - - $("#idEntetecontrat").focus(); - - div_attente.html(''); - - return; - } - - donnees = 'idEntetecontrat='+idEntetecontrat; - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxplafondbeneficiaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function ajaxchanger_type_bon() -{ - $("#msgErreur").html(""); -} - -function changer_type_bon() -{ - $("#nbligne_info").val("0"); - afficherbon_vide(); -} - -function afficherbon_vide() -{ - $("#div_bonpecs").html(""); - - codeLangue = $("#codeLangue").val(); - if(codeLangue=="en_US") - { - $("#nbligne").val("Number of lines displayed : 0"); - } - else - { - $("#nbligne").val("Nombre de bons affichés : 0"); - } - - /* - codeTypeBon=$("#codeTypeBon").val(); - - if (codeTypeBon<=" ") - { - v_msg="Veuillez sélectionner un type de bon!"; - v_msgEng="Please select a form type!"; - alert_ebene(v_msg, v_msgEng); - $("#codeTypeBon").focus(); - return; - } - */ - - $("#div_bonpecs").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/vide/", - error: function(errorData) - { - }, - success: function(data) - { - $("#div_bonpecs").html(data); - }, - complete: function() - { - } - }); -} - -function date_inclus_mois_decompte() -{ - datejour = $("#datejour_C").val(); - dateFacture = $("#dateFacture").val(); - dateFactureReelle = dateFacture; - - libelledebutMoisDecompte = $("#debutMoisDecompte").val(); - debutMoisDecompte = $("#debutMoisDecompte").datepicker("getDate"); - var tddebut = new Date(debutMoisDecompte); - dddebut = Math.round(Date.parse(tddebut)/(1000*3600*24)); - - CalculerFinMoisDecompte(); - - libellefinMoisDecompte = $("#finMoisDecompte").val(); - finMoisDecompte = $("#finMoisDecompte").datepicker("getDate"); - var tfin = new Date(finMoisDecompte); - ddfin = Math.round(Date.parse(tfin)/(1000*3600*24)); - - var td1 = $("#dateFacture").datepicker("getDate"); - var tdj = new Date(datejour); - - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); - dtj=Math.round(Date.parse(tdj)/(1000*3600*24)); - - if ( (dt1ddfin) ) - { - v_msg="Attention! date hors du mois! => "+libelledebutMoisDecompte+" - "+libellefinMoisDecompte; - v_msgEng="Warning! date out of the month!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - - if (dt1>dtj) - { - v_msg="Attention! Revoir la date!"; - v_msgEng="Warning! Review the date!"; - alert_ebene(v_msg, v_msgEng); - - return false; - } - return true; -} - -function CalculerFinMoisDecompte() -{ - var typdate = $("#debutMoisDecompte").datepicker("getDate"); - typdate.addMonths(1); - $("#finMoisDecompte").datepicker( "setDate", typdate ); -} - -function supprimer_lien_parent_client(idClient) -{ - v_msg="Confirmez-vous la suppression de cette liaison?"; - v_msgEng="Do you confirm the deletion of this link?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxclientliaison/supprimerliaisonclient/", - type : 'post', - data: "idClient="+idClient, - error: function(errorData) { - }, - success: function(data) - { - v_msg="Suppression terminée avec succès terminé!"; - v_msgEng="Deletion completed successfully completed!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() - { - afficher_client_liaison(); - } - }); - } -} - -function afficher_client_liaison() -{ - window.location.assign($("#racineWeb" ).val()+"Liaisonclients/"); -} - -function client_lier_a_un_parent(idClientP) -{ - idClient = $("#idClient").val(); - - // alert("idClient => "+idClient+" ; idClientP => "+idClientP); - // return; - - if (idClient<=" " || idClientP<=" ") - { - v_msg="Veuillez sélectionner le parent!"; - v_msgEng="Please select the parent!"; - alert_ebene(v_msg, v_msgEng); - $("#nomsearch").focus(); - return; - } - - v_msg="Confirmez-vous cette liaison?"; - v_msgEng="Do you confirm this link?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "idClient="+idClient+"&idClientP="+idClientP; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxclientliaison/clientlieraunparent/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - v_msg="Liaison effectuée avec succès!"; - v_msgEng="Link successfully completed!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() - { - afficher_client_liaison(); - } - }); - } -} - -function client_ajouter_un_enfant(idClientE) -{ - idClient = $("#idClient").val(); - - if (idClient<=" " || idClientE<=" ") - { - v_msg="Veuillez sélectionner le parent!"; - v_msgEng="Please select the parent!"; - alert_ebene(v_msg, v_msgEng); - $("#nomsearch_e").focus(); - return; - } - - v_msg="Confirmez-vous cette liaison?"; - v_msgEng="Do you confirm this link?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = "idClient="+idClientE+"&idClientP="+idClient; - - // alert(donnees) - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxclientliaison/clientlieraunparent/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - v_msg="Liaison effectuée avec succès!"; - v_msgEng="Link successfully completed!"; - alert_ebene(v_msg, v_msgEng); - }, - complete: function() - { - afficher_client_liaison(); - } - }); - } -} - -function ctrlkeypress_parent_client(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_parent_client(); - } -} - -function afficher_pop_recherche_parent_client() -{ - idClient = $("#idClient").val(); - numeroclientsearch = $("#numeroclientsearch").val(); - nomsearch = $("#nomsearch").val(); - - numeroclientsearch = convertir_en_entier(numeroclientsearch); - - if(numeroclientsearch+nomsearch<="0") - { - v_msg="Critères de recherche manquant!"; - v_msgEng="Missing search criteria!"; - alert_ebene(v_msg, v_msgEng); - $("#nomsearch").focus(); - return; - } - - donnees = "numeroclientsearch="+numeroclientsearch+"&nomsearch="+nomsearch+"&idClient="+idClient; - - // alert(donnees); - // return; - - $("#div_liste_clients_parents").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteclientsparents/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_clients_parents").html(data); - } - }); -} - -function afficher_pop_recherche_enfants_client() -{ - idClient = $("#idClient").val(); - numeroclientsearch = $("#numeroclientsearch_e").val(); - nomsearch = $("#nomsearch_e").val(); - - numeroclientsearch = convertir_en_entier(numeroclientsearch); - - if(numeroclientsearch+nomsearch<="0") - { - v_msg="Critères de recherche manquant!"; - v_msgEng="Missing search criteria!"; - alert_ebene(v_msg, v_msgEng); - $("#nomsearch_e").focus(); - return; - } - - donnees = "numeroclientsearch="+numeroclientsearch+"&nomsearch="+nomsearch+"&idClient="+idClient; - - // alert(donnees); - // return; - - $("#div_liste_clients_enfants").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteclientsenfants/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_clients_enfants").html(data); - } - }); -} - -function ctrlkeypress_enfant_client(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_enfants_client(); - } -} - -function afficherbon_vide_sans_wait() -{ - $("#div_bonpecs").html(""); - - codeLangue = $("#codeLangue").val(); - if(codeLangue=="en_US") - { - $("#nbligne").val("Number of lines displayed : 0"); - } - else - { - $("#nbligne").val("Nombre de bons affichés : 0"); - } - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxafficherbons/vide/", - error: function(errorData) - { - }, - success: function(data) - { - $("#div_bonpecs").html(data); - }, - complete: function() - { - } - }); -} - -function listerderogations_vide() -{ - $("#div_derogations").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogations/vide/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_derogations").html(data); - }, - complete: function() { - } - }); -} - -function listerderogationbeneficiaire_vide() -{ - $("#div_derogations").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/vide/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_derogations").html(data); - }, - complete: function() { - } - }); -} - -function listeententeprealables_vide() -{ - $("#div_ententeprealable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealables/vide/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_ententeprealable").html(data); - }, - complete: function() { - } - }); -} - -function listerententeprealablebeneficiaire_vide() -{ - $("#div_ententeprealable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/vide/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_ententeprealable").html(data); - }, - complete: function() { - } - }); -} - -function listeententeprealablespha_vide() -{ - $("#div_ententeprealable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablespha/vide/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_ententeprealable").html(data); - }, - complete: function() { - } - }); -} - -function listeententeprealablesopt_vide() -{ - $("#div_ententeprealable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesopt/vide/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_ententeprealable").html(data); - }, - complete: function() { - } - }); -} - -function listeententeprealablesmont_vide() -{ - $("#div_ententeprealable").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxententeprealablesmont/vide/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - $("#div_ententeprealable").html(data); - }, - complete: function() { - } - }); -} - -function maj_plafond_adherent_additionnelle(idCollegeTemp, plafond, controle) -{ - if(controle_numerique(controle)) - { - donnees = 'idCollegeTemp='+idCollegeTemp+"&plafond="+plafond; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollegeadd/majplafondadherentadd/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_plafond_global").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function maj_prime_adherent_additionnelle(idCollegeTemp, prime, controle) -{ - if(controle_numerique(controle)) - { - donnees = 'idCollegeTemp='+idCollegeTemp+"&prime="+prime; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollegeadd/majprimeadherentadd/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_plafond_global").html(data); - }, - error: function(data) { - }, - complete: function() { - recapituler_limite_college(); - controle.focus(); - } - }); - } -} - -function maj_plafond_beneficiaire_additionnelle(idCollegeTemp, plafond, controle) -{ - if(controle_numerique(controle)) - { - donnees = 'idCollegeTemp='+idCollegeTemp+"&plafond="+plafond; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollegeadd/majplafondbeneficiaireadd/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_plafond_global").html(data); - }, - error: function(data) { - }, - complete: function() { - controle.focus(); - } - }); - } -} - -function maj_prime_beneficiaire_additionnelle(idCollegeTemp, prime, controle) -{ - if(controle_numerique(controle)) - { - donnees = 'idCollegeTemp='+idCollegeTemp+"&prime="+prime; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxgarantiescollegeadd/majprimebeneficiaireadd/", - type: 'POST', - data: donnees, - success: function(data) { - $("#div_plafond_global").html(data); - }, - error: function(data) { - }, - complete: function() { - recapituler_limite_college(); - controle.focus(); - } - }); - } -} - -function afficher_attribution_gestion_bon() -{ - codeGestionBon=$("#codeGestionBon").val(); - - var div_attente = $('#div_gestion_bon'); - - if (codeGestionBon<=" ") - { - v_msg="Veuillez sélectionner un mode de gestion!"; - v_msgEng="Please select a management mode!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGestionBon").focus(); - div_attente.html(""); - return; - } - - donnees = 'codeGestionBon='+codeGestionBon; - - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestatairegestionbon/afficherattributiongestionbon/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - div_attente.html(data); - }, - complete: function() { - } - }); -} - -function ajouter_tous_prestataires_gestion_bon() -{ - codeGestionBon=$("#codeGestionBon").val(); - - if (codeGestionBon<=" ") - { - v_msg="Veuillez sélectionner un mode de gestion!"; - v_msgEng="Please select a management mode!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGestionBon").focus(); - return; - } - - donnees = 'codeGestionBon='+codeGestionBon; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm this operation?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestatairegestionbon/ajoutertousprestatairesgestionbon/", - type: 'POST', - data: donnees, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() { - afficher_attribution_gestion_bon(); - } - }); - } -} - -function ajouter_un_prestataire_gestion_bon(codePrestataire) -{ - codeGestionBon=$("#codeGestionBon").val(); - - if (codeGestionBon<=" ") - { - v_msg="Veuillez sélectionner un mode de gestion!"; - v_msgEng="Please select a management mode!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGestionBon").focus(); - return; - } - - donnees = 'codeGestionBon='+codeGestionBon+'&codePrestataire='+codePrestataire; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxprestatairegestionbon/ajouterunprestatairegestionbon/", - type: 'POST', - data: donnees, - success: function(data) { - }, - error: function(data) { - }, - complete: function() { - afficher_attribution_gestion_bon(); - } - }); -} - - -function requetes_factures_gc_export_gar() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeGcAssureur = $("#codeGcAssureur").val(); - if(codeGcAssureur<=" ") - { - v_msg="Veuillez sélectionner un assureur!"; - v_msgEng="Please select an insurer!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeGcAssureur").focus(); - return; - } - - dateFacture1 = $("#dateFacture1").val(); - dateFacture2 = $("#dateFacture2").val(); - - donnees += 'codeGcAssureur=' + codeGcAssureur; - donnees += '&dateFacture1=' + dateFacture1; - donnees += '&dateFacture2=' + dateFacture2; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - v_url = $("#racineWeb").val()+"Ajaxrequetefacturegcexport/avecgaranties/"; - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - - -function charger_detail_facture_gc_xls_gar() -{ - donnees_retour = ""; - - var div_export = $('#div_export_b'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailfacturegcxls/avecgaranties/", - type : 'post', - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - div_export.html(donnees_retour); - } - }); -} - - - -function exporter_paiement_decompte() -{ - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'debut='+debut+'&fin='+fin; - - $("#div_detail_paiement_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexporterpaiementdecompte/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail_paiement_decompte").html(data); - }, - complete: function() { - } - }); -} - - -function exporter_decompte_non_payes() -{ - debut=$("#debut").val(); - fin=$("#fin").val(); - - donnees = 'debut='+debut+'&fin='+fin; - - - $("#div_detail_paiement_decompte").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxexporterpaiementdecompte/impayes/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_detail_paiement_decompte").html(data); - }, - complete: function() { - } - }); -} - - -function etat_moy_categ_med_prestataire() -{ - var td0 = $("#debutExercice").datepicker("getDate"); - var td1 = $("#dateAnalyse").datepicker("getDate"); - var td2 = $("#debutStat").datepicker("getDate"); - var td3 = $("#finStat").datepicker("getDate"); - - dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // debutExercice - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutStat - dt3=Math.round(Date.parse(td3)/(1000*3600*24)); // finStat - - if (dt2dt1) - { - v_msg="Période a extraire hors de la période d\'analyse!"; - v_msgEng="Period to extract out of the analysis period!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (dt3dt1) - { - v_msg="Période a extraire hors de la période d\'analyse!"; - v_msgEng="Period to extract out of the analysis period!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (dt3  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - 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_moy_categ_med_prestataire_export() -{ - // alert("etat_moy_moy_categ_med_prestataire_export"); - // return; - - var td0 = $("#debutExercice").datepicker("getDate"); - var td1 = $("#dateAnalyse").datepicker("getDate"); - var td2 = $("#debutStat").datepicker("getDate"); - var td3 = $("#finStat").datepicker("getDate"); - - dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // debutExercice - dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse - dt2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutStat - dt3=Math.round(Date.parse(td3)/(1000*3600*24)); // finStat - - if (dt2dt1) - { - v_msg="Période a extraire hors de la période d\'analyse!"; - v_msgEng="Period to extract out of the analysis period!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (dt3dt1) - { - v_msg="Période a extraire hors de la période d\'analyse!"; - v_msgEng="Period to extract out of the analysis period!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (dt3  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -// assurance maladie individuelle => 01/11/2020 -function rechercher_commercail_type_param() -{ - var div_detail = $('#div_detail_apporteur'); - - codeTypeApporteur=$("#codeTypeApporteur").val(); - libelleApporteur=$("#libelleApporteur").val(); - - /* - if(codeTypeApporteur<=' ') - { - v_msg="Veuillez sélectionner un type apporteur!"; - v_msgEng="Please select a type of trader!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeApporteur").focus(); - return; - } - */ - - donnees = 'codeTypeApporteur='+codeTypeApporteur+'&libelleApporteur='+libelleApporteur; - - div_detail.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxacommercialparam/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_detail.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - } - }); -} - - -function rechercher_commercail_type_param_tous() -{ - var div_detail = $('#div_detail_apporteur'); - libelleApporteur=$("#libelleApporteur").val(); - - donnees = 'libelleApporteur='+libelleApporteur; - - div_detail.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxacommercialparam/tous/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_detail.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - } - }); -} - -function ctrlkeypress_rechercher_commercail_type_param(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - rechercher_commercail_type_param(); - } -} - -function modifier_un_commercial(idApporteur) -{ - window.location.assign($("#racineWeb" ).val()+"Modifiercommercial/"+idApporteur+"/"); -} - -function retour_liste_commerciaux() -{ - window.location.assign($("#racineWeb" ).val()+"Commercial/"); -} - -function enregistrer_nouveau_commercial() -{ - codeTypeApporteur = $("#codeTypeApporteur").val(); - libelle = $("#libelle").val(); - telephone = $("#telephone").val(); - email = $("#email").val(); - adresseGeo = $("#adresseGeo").val(); - adressePost = $("#adressePost").val(); - - if(codeTypeApporteur<=" ") - { - v_msg="Veuillez sélectionner le type!"; - v_msgEng="Please select the type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeApporteur").focus(); - return; - } - - if(libelle<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - donnees = 'codeTypeApporteur='+codeTypeApporteur; - donnees += '&libelle='+libelle; - donnees += '&telephone='+telephone; - donnees += '&email='+email; - donnees += '&adresseGeo='+adresseGeo; - donnees += '&adressePost='+adressePost; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxacommercialparam/enregistrernouveaucommercial/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_liste_commerciaux(); - } - }); - } -} - -function enregistrer_modif_un_commercial() -{ - idApporteur = $("#idApporteur").val(); - codeApporteur = $("#codeApporteur").val(); - - codeTypeApporteur = $("#codeTypeApporteur").val(); - libelle = $("#libelle").val(); - telephone = $("#telephone").val(); - email = $("#email").val(); - adresseGeo = $("#adresseGeo").val(); - adressePost = $("#adressePost").val(); - - if(codeTypeApporteur<=" ") - { - v_msg="Veuillez sélectionner le type!"; - v_msgEng="Please select the type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeApporteur").focus(); - return; - } - - if(libelle<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - donnees = 'idApporteur='+idApporteur; - donnees += '&codeApporteur='+codeApporteur; - donnees += '&codeTypeApporteur='+codeTypeApporteur; - donnees += '&libelle='+libelle; - donnees += '&telephone='+telephone; - donnees += '&email='+email; - donnees += '&adresseGeo='+adresseGeo; - donnees += '&adressePost='+adressePost; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxacommercialparam/enregistrermodifcommercial/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_liste_commerciaux(); - } - }); - } -} - -function exporter_liste_commercial() -{ - var div_export = $('#div_export_apporteur'); - - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_exporter").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxacommercialparam/exporterlistecommercail/", - type: 'POST', - // data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -// Apporteurs / Courtiers -function rechercher_apporteur_param() -{ - var div_detail = $('#div_detail_apporteur'); - - libelleApporteur=$("#libelleApporteur").val(); - - donnees = 'libelleApporteur='+libelleApporteur; - - div_detail.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxapporteurparam/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_detail.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - } - }); -} - -function ctrlkeypress_rechercher_apporteur_param(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - rechercher_apporteur_param(); - } -} - -function enregistrer_nouvel_apporteur() -{ - // codeTypeApporteur = $("#codeTypeApporteur").val(); - libelle = $("#libelle").val(); - telephone = $("#telephone").val(); - email = $("#email").val(); - adresseGeo = $("#adresseGeo").val(); - adressePost = $("#adressePost").val(); - - if(libelle<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - // donnees = 'codeTypeApporteur='+codeTypeApporteur; - donnees = 'libelle='+libelle; - donnees += '&telephone='+telephone; - donnees += '&email='+email; - donnees += '&adresseGeo='+adresseGeo; - donnees += '&adressePost='+adressePost; - - // alert("enregistrer_nouvel_apporteur => "+donnees); - // return; - - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxapporteurparam/enregistrernouvelapporteur/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_liste_apporteurs(); - } - }); - } -} - - -function modifier_un_apporteur(idApporteur) -{ - window.location.assign($("#racineWeb" ).val()+"Modifierapporteur/"+idApporteur+"/"); -} - -function enregistrer_modif_un_apporteur() -{ - - idApporteur = $("#idApporteur").val(); - codeApporteur = $("#codeApporteur").val(); - - // codeTypeApporteur = $("#codeTypeApporteur").val(); - libelle = $("#libelle").val(); - telephone = $("#telephone").val(); - email = $("#email").val(); - adresseGeo = $("#adresseGeo").val(); - adressePost = $("#adressePost").val(); - - if(libelle<=" ") - { - v_msg="Veuillez saisir le nom!"; - v_msgEng="Please enter the name!"; - alert_ebene(v_msg, v_msgEng); - - $("#libelle").focus(); - return; - } - - donnees = 'idApporteur='+idApporteur; - donnees += '&codeApporteur='+codeApporteur; - // donnees += '&codeTypeApporteur='+codeTypeApporteur; - donnees += '&libelle='+libelle; - donnees += '&telephone='+telephone; - donnees += '&email='+email; - donnees += '&adresseGeo='+adresseGeo; - donnees += '&adressePost='+adressePost; - - // alert(donnees); - // return; - - v_msg="Confirmez-vous ces modifications?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - $.ajax({ - url: $("#racineWeb").val()+"Ajaxapporteurparam/enregistrermodifapporteur/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - // $('#div_test_gabarit').html(data); - }, - complete: function() - { - retour_liste_apporteurs(); - } - }); - } -} - -function retour_liste_apporteurs() -{ - window.location.assign($("#racineWeb" ).val()+"Courtier/"); -} - -function exporter_liste_courtier() -{ - var div_export = $('#div_export_apporteur'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_exporter").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxapporteurparam/exporterlisteapporteur/", - type: 'POST', - // data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - - -function assurance_familiale() -{ - codeTypeContrat = $("#codeTypeContrat_C").val(); - - if (codeTypeContrat!="F") - { - v_msg="Ce n\'est pas une police FAMILIALE!"; - v_msgEng="This is not a FAMILIY policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Assuranceindividuelle/"); -} - -function ajax_init_parametres_echancier_temp() -{ - $("#div_echeancier_detail").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxfacturerpolice/getparametrestypeecheancier/", - type : 'post', - data: "codeTypeEcheancier="+$("#codeTypeEcheancier").val(), - error: function(errorData) { - }, - success: function(data) { - $("#infonbEcheance").html(data); - $('#div_test_gabarit').html(data); - }, - complete: function() { - $("#nbEcheance").val( $("#nbEcheance_info").val()); - $("#tauxInteret").val( $("#tauxInteretEcheancier_info").val()); - - ajax_maj_echancier_temp(); - } - }); -} - -function facturer_police_familiale() -{ - etat=$("#codeEtatPolice_C").val(); - - if (etat=="RE") - { - v_msg="Attention! Police résiliée!"; - v_msgEng="Warning! Terminated policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="AN") - { - v_msg="Attention! Police annulée!"; - v_msgEng="Warning! Canceled policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if ($("#idPolice_C" ).val()>"") - { - window.location.assign($("#racineWeb" ).val()+"Facturerpolicefamiliale/"); - } -} - -function creer_adherents_familiale() -{ - etat=$("#codeEtatPolice_C").val(); - - if (etat=="RE") - { - v_msg="Attention! Police résiliée!"; - v_msgEng="Warning! Terminated policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="SU") - { - v_msg="Attention! Police suspendue!"; - v_msgEng="Warning! Suspended policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="AN") - { - v_msg="Attention! Police annulée!"; - v_msgEng="Warning! Canceled policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Creeradherentfamiliale/"); -} - -function ctrlkeypress_rechercher_commercail_type_familiale(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - rechercher_commercail_type_familiale(); - } -} - -function rechercher_commercail_type_familiale() -{ - var div_detail = $('#div_detail_apporteur'); - - codeTypeApporteur=$("#codeTypeApporteur").val(); - libelleApporteur=$("#libelleApporteur").val(); - - donnees = 'codeTypeApporteur='+codeTypeApporteur+'&libelleApporteur='+libelleApporteur; - - div_detail.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxacommercialfamiliale/", - type: 'POST', - data: donnees, - success: function(data) - { - // $('#div_test_gabarit').html(data); - div_detail.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - } - }); -} - -function rechercher_commercail_type_familiale_tous() -{ - var div_detail = $('#div_detail_apporteur'); - libelleApporteur=$("#libelleApporteur").val(); - - donnees = 'libelleApporteur='+libelleApporteur; - - div_detail.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxacommercialfamiliale/tous/", - type: 'POST', - data: donnees, - success: function(data) - { - div_detail.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function() - { - } - }); -} - -function agent_commercial(idApporteur) -{ - if (idApporteur>" ") - { - window.location.assign($("#racineWeb" ).val()+"Agentcommercial/"+idApporteur+"/"); - } - else - { - v_msg="Aucun commercial!"; - v_msgEng="commercial!"; - alert_ebene(v_msg, v_msgEng); - } -} - -function retour_agent_commercial() -{ - idApporteur=$("#idApporteur").val(); - - // alert("idApporteur "+idApporteur); - - if (idApporteur>" ") - { - window.location.assign($("#racineWeb" ).val()+"Agentcommercial/"+idApporteur+"/"); - } - else - { - window.location.assign($("#racineWeb" ).val()+"Assuranceindividuelle/"); - } -} - -function facturer_famille() -{ - if(est_ce_police_famille()) - { - if (codeTypeContrat!="F") - { - v_msg="Ce n\'est pas une police FAMILIALE!"; - v_msgEng="This is not a FAMILIY policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - etat=$("#codeEtatPolice_C").val(); - - if (etat=="RE") - { - v_msg="Attention! Police résiliée!"; - v_msgEng="Warning! Terminated policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="AN") - { - v_msg="Attention! Police annulée!"; - v_msgEng="Warning! Canceled policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idAdherent = $("#idAdherent_C" ).val(); - // if ($("#idPolice_C" ).val()>"") - if (idAdherent>"0") - { - window.location.assign($("#racineWeb" ).val()+"Facturerfamille/"); - } - } - else - { - v_msg="Ce n\'est pas une police FAMILIALE!"; - v_msgEng="This is not a FAMILIY policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function aller_a_gestion_famille() -{ - codeTypeContrat = $("#codeTypeContrat_C").val(); - if (codeTypeContrat=="F") - { - window.location.assign($("#racineWeb" ).val()+"Assuranceindividuelle/"); - return; - } -} - -function est_ce_police_famille() -{ - codeTypeContrat = $("#codeTypeContrat_C").val(); - return (codeTypeContrat=="F"); -} - -function recap_prime_adherent_temp() -{ - idCollege = $("#idCollege").val(); - dateEntree = $("#dateEntree").val(); - primeBase = $("#primeBase").val(); - codeTypeEcheancier = $("#codeTypeEcheancier").val(); - - if (idCollege<=" ") - { - v_msg="Veuillez sélectionner un collège!"; - v_msgEng="Please select a college!"; - alert_ebene(v_msg, v_msgEng); - - $("#idCollege").focus(); - return; - } - - if (codeTypeEcheancier<=" ") - { - v_msg="Veuillez sélectionner un type échéancier!"; - v_msgEng="Please select a Sshedule type!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeTypeEcheancier").focus(); - return; - } - - donnees = 'idCollege='+idCollege; - donnees += '&dateEntree='+dateEntree; - donnees += '&primeBase='+primeBase; - donnees += '&codeTypeEcheancier='+codeTypeEcheancier; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrecapprimeadherentfamiliale/", - - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_prime").html(data); - }, - complete: function() { - } - }); -} - -function controle_bornes_primes_familiale() -{ - primeBase = $("#primeBase").val(); - primeMin = $("#primeMin").val(); - - - primeBase = parseInt(primeBase); - primeMin = parseInt(primeMin); - - if((primeMin>0) && (primeBase  ' + 'Veuillez patienter... / Please wait...' + ''); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteadherentfamiliale/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_adherent").html(data); - } - }); -} - -function afficher_adherents_police_familiale_export() -{ - debut = $("#debut").val(); - fin = $("#fin").val(); - - donnees = 'debut='+debut+'&fin='+fin; - - $("#div_deatil_pop").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $("#btn_pop").click(); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlisteadherentfamiliale/exporter/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_deatil_pop").html(data); - } - }); -} - -function afficher_adherent_familiale_id() -{ - idAdherent = $("#idAdherent_C" ).val(); - - if (idAdherent>"0") - { - window.location.assign($("#racineWeb" ).val()+"Ficheadherentfamiliale/"+idAdherent+"/"); - } -} - -function afficher_beneficiaire_familiale_() -{ - idBeneficiaire = $("#idBeneficiaire_C" ).val(); - if (idBeneficiaire>"") - { - window.location.assign($("#racineWeb" ).val()+"Fichebeneficiairefamiliale/"+idBeneficiaire+"/"); - } -} - -function facturer_beneficiaire() -{ - if(est_ce_police_famille()) - { - etat=$("#codeEtatPolice_C").val(); - - if (etat=="RE") - { - v_msg="Attention! Police résiliée!"; - v_msgEng="Warning! Terminated policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="AN") - { - v_msg="Attention! Police annulée!"; - v_msgEng="Warning! Canceled policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - idAdherent = $("#idAdherent_C" ).val(); - // if ($("#idPolice_C" ).val()>"") - if (idAdherent>"0") - { - window.location.assign($("#racineWeb" ).val()+"Facturerbeneficiaire/"); - } - } - else - { - v_msg="Ce n\'est pas une police FAMILIALE!"; - v_msgEng="This is not a FAMILIY policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } -} - -function creer_beneficiaires_familiale() -{ - etat=$("#codeEtatPolice_C").val(); - - if (etat=="RE") - { - v_msg="Attention! Police résiliée!"; - v_msgEng="Warning! Terminated policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="SU") - { - v_msg="Attention! Police suspendue!"; - v_msgEng="Warning! Suspended policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - if (etat=="AN") - { - v_msg="Attention! Police annulée!"; - v_msgEng="Warning! Canceled policy!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - etatadh=$("#codeEtatAdherent_C").val(); - - if (etatadh != "V") - { - v_msg="Attention! cette famille n\'est pas en vigueur!"; - v_msgEng="Warning! this family is not in force!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - window.location.assign($("#racineWeb" ).val()+"Creerbeneficiairefamiliale/"); -} - - -function recap_prime_beneficiaire_temp() -{ - $("#btn_submit").disable(); - - $("#primeTtc").val("0"); - - primeTtc2 = $("#primeTtc").val(); - - $("#div_prime").empty(); - - idAvenant = $("#idAvenant").val(); - - if(idAvenant<=" ") - { - v_msg="Veuillez sélectionner un avenant!"; - v_msgEng="Please select an Amendment!"; - alert_ebene(v_msg, v_msgEng); - - $("#idAvenant").focus(); - return; - } - - codeLienParente=$("#codeLienParente").val(); - if (codeLienParente=="A" || codeLienParente<=" ") - { - v_msg="Veuillez revoir le lien de parenté!"; - v_msgEng="Please review the relationship"; - alert_ebene(v_msg, v_msgEng); - $("#codeLienParente").focus(); - return; - } - - dateEntree=$("#dateEntree").val(); - - codeProduit=$("#codeProduit").val(); - - donnees = 'idAvenant='+idAvenant; - donnees += '&codeLienParente='+codeLienParente; - donnees += '&dateEntree='+dateEntree; - donnees += '&codeProduit='+codeProduit; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxrecapprimebeneficiairefamiliale/", - - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_prime").html(data); - }, - complete: function() { - primeTtc_info = $("#primeTtc_info").val(); - $("#primeTtc").val(primeTtc_info); - - if(primeTtc_info>"0") - { - $("#btn_submit").enable(); - } - } - }); -} - -function changer_avenant_incorporation_beneficiaire_familiale() -{ - idAvenant = $("#idAvenant").val(); - - if(idAvenant<=" ") - { - v_msg="Veuillez sélectionner un avenant!"; - v_msgEng="Please select an Amendment!"; - alert_ebene(v_msg, v_msgEng); - - $("#idAvenant").focus(); - return; - } - - donnees = 'idAvenant='+idAvenant; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxavenant/getdateavenantbeneficiaire/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_date_avenant").html(data); - $(".datepicker" ).datepicker(); - }, - complete: function() - { - // prorater_prime_beneficiaire(); - } - }); -} - - -// Début Entrée Familiale -function stat_familiale_entree_detail() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert("stat_familiale_entree_detail =>"+donnees); - // return; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_entree_detail_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert("stat_familiale_entree_detail_export =>"+donnees); - // return; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function afficher_pop_recherche_commercial() -{ - codesearch = $("#codesearch").val(); - nomsearch = $("#nomsearch").val(); - - if(codesearch+nomsearch<=" ") - return; - - donnees = "valid=1&codeApporteur="+codesearch+"&nomsearch="+nomsearch; - - $("#div_liste_commerciaux").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistecommercial/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_liste_commerciaux").html(data); - } - }); -} - -function reinitialiser_commercial() -{ - $("#codeApporteur").val(""); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistecommercial/reinitialiser/", - type : 'post', - // data: donnees, - error: function(errorData) { - }, - success: function(data) { - }, - complete: function() { - $("#close_pop").click(); - - codeLangue = $("#codeLangue").val(); - - if(codeLangue=="en_US") - { - $("#libelleApporteur").html("All / Search Trader..."); - - } - else - { - $("#libelleApporteur").html("Tous / Rechercher Commercial..."); - } - } - }); -} - -function ctrlkeypress_commercial(ev) -{ - var keycode = (ev.keyCode ? ev.keyCode : ev.which); - if(keycode == '13') - { - afficher_pop_recherche_commercial(); - } -} - -function selectionner_commercial(codeApporteur, libelleApporteur) -{ - $("#codeApporteur").val(codeApporteur); - $("#libelleApporteur").html(libelleApporteur); - - donnees = 'codeApporteur=' + codeApporteur; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxlistecommercial/mettreensession/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - // $('#div_test_gabarit').html(data); - }, - complete: function() { - $("#close_pop").click(); - } - }); - -} - -function stat_familiale_entree_grp_fam() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert("stat_familiale_entree_grp_fam =>"+donnees); - // return; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_entree_grp_fam_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert("stat_familiale_entree_grp_fam_export =>"+donnees); - // return; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function stat_familiale_entree_grp_com_ech() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_entree_grp_com_ech_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function stat_familiale_entree_grp_com() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_entree_grp_com_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function stat_familiale_entree_grp_per_ech() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_entree_grp_per_ech_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function stat_familiale_entree_grp_per() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_entree_grp_per_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - - -function stat_familiale_entree_grp_exe_ech() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_entree_grp_exe_ech_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -// - -function stat_familiale_entree_grp_exe() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_entree_grp_exe_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -// - -function stat_familiale_entree_grp_ech() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_entree_grp_ech_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} -// Fin Entree Familiale - -// - - -// Début Sortie Familiale -function stat_familiale_sortie_detail() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert("stat_familiale_sortie_detail =>"+donnees); - // return; - - alert(v_url); - return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_sortie_detail_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert("stat_familiale_entree_detail_export =>"+donnees); - // return; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function stat_familiale_sortie_grp_fam() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - alert("stat_familiale_entree_grp_fam =>"+donnees); - return; - - alert(v_url); - return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_sortie_grp_fam_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert("stat_familiale_entree_grp_fam_export =>"+donnees); - // return; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function stat_familiale_sortie_grp_com_ech() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_sortie_grp_com_ech_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function stat_familiale_sortie_grp_com() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_sortie_grp_com_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function stat_familiale_sortie_grp_per_ech() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_sortie_grp_per_ech_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function stat_familiale_sortie_grp_per() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_sortie_grp_per_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - - -function stat_familiale_sortie_grp_exe_ech() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_sortie_grp_exe_ech_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -// - -function stat_familiale_sortie_grp_exe() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_sortie_grp_exe_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -// - -function stat_familiale_sortie_grp_ech() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $("#div_detail_requete").html(donnees_retour); - $("#nbligne").val("Lignes : "+$("#nbligne_info").val()); - } - }); -} - -function stat_familiale_sortie_grp_ech_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner une requête!"; - v_msgEng="Please select a query!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/"; - - codeApporteur = $("#codeApporteur").val(); - debutPeriode = $("#debutPeriode").val(); - finPeriode = $("#finPeriode").val(); - - donnees += 'codeApporteur=' + codeApporteur; - donnees += '&debutPeriode=' + debutPeriode; - donnees += '&finPeriode=' + finPeriode; - - // alert(v_url); - // return; - - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} -// Fin Sortie Familiale - -// 22/11/2020 -function ajaxenteteetatprod() -{ - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - donnees = 'codeEtat='+codeEtat; - - v_url = $("#racineWeb").val()+"Ajaxentete"+codeEtat+"/"; - - $("#div_ente_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_ente_requete").html(data); - $(".datepicker" ).datepicker(); - } - }); -} - -function ajaxenteteetatassurancefamiliale() -{ - $("#div_ente_requete").html(""); - - codeEnteteEtat=$("#codeEnteteEtat").val(); - - if (codeEnteteEtat<=" ") - { - v_msg="Veuillez sélectionner un entête!"; - v_msgEng="Please select a header!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEnteteEtat").focus(); - return; - } - - donnees = 'codeEnteteEtat='+codeEnteteEtat; - - v_url = $("#racineWeb").val()+"Etatsassuranceindividuelle/enteteetatsassuranceindividuelle/"; - - $("#div_sous_etat").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - $("#div_sous_etat").html(data); - } - }); -} - -function afficher_liste_assures_a_importer() -{ - codeTypeContrat = $("#codeTypeContrat_C").val(); - - if (codeTypeContrat=="F") - { - window.location.assign($("#racineWeb" ).val()+"Listeimportassurefamiliale/"); - } - else - { - window.location.assign($("#racineWeb" ).val()+"Listeimportassure/"); - } -} - -function exporter_modele_assure_familiale() -{ - $('#div_form_upload').hide(); - - var div_export = $('#div_exporter_liste_assures'); - - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassurefamiliale/exportermodele/", - type: 'POST', - // data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -// - -function importer_modele_assure_familiale(idAvenant, dateEffet) -{ - etape2=$("#etape2").val(); - - if (etape2 != "1") - { - v_msg="Etape 2 incomplète!"; - v_msgEng="Incomplete step 2!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $('#div_form_upload').hide(); - - var div_export = $('#div_exporter_liste_assures'); - - div_export.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - cheminFichier=$("#cheminFichier").val(); - - donnees = 'idAvenant='+idAvenant+'&cheminFichier='+cheminFichier; - donnees += '&dateEffet='+dateEffet; - - // alert(donnees); - // return; - - $("#div_erreur_excel").html(""); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassurefamiliale/importermodele/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(''); - $("#div_erreur_excel").html(data); - - v_msg="Opération terminée avec succès!"; - v_msgEng="Operation completed successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - div_export.html(''); - - succes_impot_execl=$("#succes_impot_execl").val(); - - if (succes_impot_execl == "1") - { - maj_etape_3_import_assures(); - } - } - }); -} - -function init_importer_modele_assure_familiale() -{ - etape2=$("#etape2").val(); - - if (etape2 != "1") - { - v_msg="Etape 2 incomplète!"; - v_msgEng="Incomplete step 2!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - $('#div_form_upload').hide(); - - var div_export = $('#div_exporter_liste_assures'); - - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassurefamiliale/initimportermodele/", - type: 'POST', - // data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function incorporer_assures_inmportes_familiale() -{ - nb_adh=$("#nb_adh").val(); - - if (nb_adh>"0") - { - v_msg="Veuillez revoir les collèges et relancer le calcul des primes!"; - v_msgEng="Please review the colleges and restart the premium calculation!!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - nb_ligne_ass=$("#nb_ligne_ass").val(); - - if (nb_ligne_ass=="0") - { - v_msg="Rien à importer!"; - v_msgEng="Nothing to import!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - /* - v_msg="Avez-vous fait l\'étape 2 => calcul des primes?"; - v_msgEng="Did you do step 2 => premium calculation?"; - - if(!confirm_ebene(v_msg, v_msgEng)) - { - return; - } - */ - - primeTtcTotal=$("#primeTtcTotal").val(); - - if (primeTtcTotal=="0") - { - v_msg="Pas de primes! souhaitez-vous recalculer les primes?"; - v_msgEng="No premiums! do you want to recalculate the premiums?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - return; - } - - v_msg="Notez que vous avez accepté l\'incorporation sans primes!"; - v_msgEng="Note that you accepted the incorporation without premium!"; - alert_ebene(v_msg, v_msgEng); - } - - v_msg="Confirmez-vous l\'incorporation de cette liste?"; - v_msgEng="Do you confirm the incorporation of this list?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - var div_attente = $('#div_liste_assure_importe'); - - div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximporterlisteassurefamiliale/incorpoerassuresimportesfamiliale/", - type: 'POST', - // data: donnees, - success: function(data) { - v_msg="Incorporation terminée avec succès!"; - v_msgEng="Incorporation completed successfully!"; - alert_ebene(v_msg, v_msgEng); - }, - error: function(data) { - }, - complete: function() { - afficher_police_id(); - } - }); - } -} - - -function liberer_medicament(idDetailprescription) -{ - v_msg="Confirmez-vous cette opération?"; - v_msgEng="Do you confirm these modifications?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - donnees = 'idDetailprescription='+idDetailprescription; - - // alert(donnees); - // return; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxdetailprescription/liberermedicament/", - type: 'POST', - data: donnees, - success: function(data) { - v_msg="Opération terminée avec succès!"; - v_msgEng="Operation completed successfully!"; - alert_ebene(v_msg, v_msgEng); - // $('#div_test_gabarit').html(data); - }, - error: function(data) { - }, - complete: function() - { - window.location.assign($("#racineWeb" ).val()+"Prescriptioncons/"); - } - }); - } -} - -// ajout du 07/01/2024 -function etat_rapport_sp_exercice_cat() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/"; - - $("#div_detail_requete").html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - 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_exercice_cat_export() -{ - $('#div_export_a').html(""); - donnees = ""; - donnees_retour = ""; - - codeEtat=$("#codeEtat").val(); - - if (codeEtat<=" ") - { - v_msg="Veuillez sélectionner un état!"; - v_msgEng="Please select a state!"; - alert_ebene(v_msg, v_msgEng); - - $("#codeEtat").focus(); - return; - } - - v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"export/"; - - var div_export = $('#div_detail_requete'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - $.ajax({ - url: v_url, - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) { - donnees_retour = data; - }, - complete: function() { - $('#div_detail_requete').html(""); - $('#div_export_a').html(donnees_retour); - } - }); -} - -function imprimer_cp_fc(lienEtat) -{ - var div_export = $('#div_export_a'); - div_export.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); - - donnees = 'lienEtat='+lienEtat; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaximprimercp/", - type: 'POST', - data: donnees, - success: function(data) - { - div_export.html(data); - }, - error : function(resultat, statut, erreur) - { - }, - complete: function(data) - { - } - }); -} - -function supprimer_ged(idGed) -{ - v_msg="Confirmez-vous la suppression de ce document?"; - v_msgEng="Do you confirm the deletion of this document?"; - - if(confirm_ebene(v_msg, v_msgEng)) - { - motifSuppression = ""; - - v_msg="Supprimé pour quel motif?"; - v_msgEng="Deleted for what reason?"; - - motifSuppression = prompt_ebene(v_msg, v_msgEng, motifSuppression); - if (motifSuppression<=" ") - { - v_msg="Vous devez saisir un motif!"; - v_msgEng="You have to enter a reason!"; - alert_ebene(v_msg, v_msgEng); - - return; - } - - donnees = 'idGed='+idGed+'&motifSuppression='+motifSuppression; - - $.ajax({ - url: $("#racineWeb").val()+"Ajaxged/supprimerged/", - type: 'POST', - data: donnees, - success: function(data) { - v_msg="Document supprimé avec succès!"; - v_msgEng="Document successfully removed!"; - alert_ebene(v_msg, v_msgEng); - }, - error: function(data) { - }, - complete: function() { - window.location.assign($("#racineWeb" ).val()+"Fichepolice/"); - } - }); - } -} diff --git a/Vue/Historiqueremboursement/index.php b/Vue/Historiqueremboursement/index.php new file mode 100755 index 0000000..805d686 --- /dev/null +++ b/Vue/Historiqueremboursement/index.php @@ -0,0 +1,93 @@ +titre = "Intersanté - Historique Remboursement"; +?> + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + nettoyer($v['id']); + $numeroDemandeRemboursement = $this->nettoyer($v['numeroDemandeRemboursement']); + $dateSysteme = $this->nettoyer($v['dateSysteme']); + + $codeEtatDemandeRemboursement = $v['codeEtatDemandeRemboursement']; + + $vip = $this->nettoyer($v['vip']); + ?> + + + + + + + + + + + + + +
Date
+ + + " href='javascript:afficheBeneficiaire("nettoyer($v['numeroBeneficiaire']) ?>");'> + + nettoyer($v['numeroBeneficiaire']) ?> + + nettoyer($v['numeroBeneficiaire']) ?> + + + nettoyer($v['beneficiaire']) ?> + + + + + + + + nettoyer($v['motifReponseDemandeRemboursement']) ?>
+
+ + \ No newline at end of file