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