diff --git a/Js/fonctions.js b/Js/fonctions.js
index e5d84337..d3f8b850 100755
--- a/Js/fonctions.js
+++ b/Js/fonctions.js
@@ -63015,4 +63015,3538 @@ function validiteDateEffetActeBareme(){
dtm = Math.round(Date.parse(tdm)/(1000*3600*24));
if(dte < dtm){
-
\ No newline at end of file
+ $("#dateEffetActe").focus();
+ v_msg="Date d'effet invalide!";
+ v_msgEng="Invalid effective date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateEffetActe").val('');
+ // $("#dateEffetActe").focus();
+ return;
+ }else{
+ inserer_bareme_acte();
+ }
+ }else{
+
+ inserer_bareme_acte();
+ }
+
+ },
+ complete: function() {
+
+
+ }
+ });
+
+}
+
+
+function validiteDateEffetActeBaremeLienParente(){
+
+ var codeGarantie = $("#codeGarantie").val();
+ var idBaremePriseEnCharge = $("#idBaremePriseEnCharge").val();
+ var codeActeLienParente = $("#codeActeLienParente").val();
+
+ var dateEffetActeLienParente = $("#dateEffetActeLienParente").val();
+ var codeLienParenteActeLienParente = $("#codeLienParenteActeLienParente").val();
+
+ var datejour = $("#datejour_C").val();
+
+ var str = dateEffetActeLienParente.split('/');
+ var effet = str[2]+'-'+str[1]+'-'+str[0];
+
+ donnees = 'codeGarantie='+codeGarantie;
+ donnees += '&idBaremePriseEnCharge='+idBaremePriseEnCharge;
+ donnees += '&codeActeLienParente='+codeActeLienParente;
+ donnees += '&codeLienParenteActeLienParente='+codeLienParenteActeLienParente;
+
+ //alert(donnees);
+ //return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxinsererbaremeactelienparente/controle/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData){
+ //alert("Erreur : "+errorData);
+ },
+ success: function(data) {
+ //alert("Success : "+data);
+ $('#div_maxdateeffetactebaremelienparente').html(data);
+
+ var tdj = new Date(datejour);
+ var tde = new Date(effet);
+
+ maxDateEffetActeBaremeLienParente = $("#maxDateEffetActeBaremeLienParente").val();
+
+
+ dte=Math.round(Date.parse(tde)/(1000*3600*24));
+ dtj=Math.round(Date.parse(tdj)/(1000*3600*24));
+
+ if((dte < dtj) && (maxDateEffetActeBaremeLienParente!=undefined || maxDateEffetActeBaremeLienParente!='')){
+ var tdm = new Date(maxDateEffetActeBaremeLienParente);
+ dtm = Math.round(Date.parse(tdm)/(1000*3600*24));
+
+ if(dte < dtm){
+
+ v_msg="Date d'effet invalide!";
+ v_msgEng="Invalid effective date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateEffetActeLienParente").val('');
+ $("#dateEffetActeLienParente").focus();
+ return;
+ }else{
+ inserer_bareme_acte_lienparente();
+ }
+ }else{
+
+ inserer_bareme_acte_lienparente();
+ }
+
+ },
+ complete: function() {
+
+
+ }
+ });
+
+}
+
+//30-03-2023
+function limiteadherent(){
+
+ var idAdherent = $('#idAdherent').val();
+
+ $("#div_patienter").html('
' + '
');
+
+ //Ajaxlimiteaddadherent
+ donnees = 'idAdherent='+idAdherent;
+
+ //alert(donnees);
+ //return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlimiteadherent/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData){
+ alert("Erreur : "+errorData);
+ },
+ success: function(data) {
+ //alert("Success : "+data);
+ $("#div_patienter").html('');
+ $('#div_limite_adherent').html(data);
+ //appliquerDataTable();
+ $('#div_limite_adherent').modal("show");
+
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+function ajax_maj_plafond_aherent(idLimite, plafond)
+{
+ plafond = plafond.replace(/ /g,"");
+
+ donnees = 'idLimite='+idLimite+'&plafond='+plafond;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlimiteadherent/majplafond/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData){
+ alert("Erreur : "+errorData);
+ },
+ success: function(data) {
+ //alert("Success : "+data);
+ },
+ complete: function() {
+
+ }
+ });
+
+}
+
+function limitebeneficiaire(){
+
+ var idBeneficiaire = $('#idBeneficiaire').val();
+
+ $("#div_patienter").html('' + '
');
+
+ donnees = 'idBeneficiaire='+idBeneficiaire;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlimitebeneficiaire/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData){
+ alert("Erreur : "+errorData);
+ },
+ success: function(data) {
+ //alert("Success : "+data);
+ $("#div_patienter").html('');
+ $('#div_limite_beneficiaire').html(data);
+ //appliquerDataTable();
+ $('#div_limite_beneficiaire').modal("show");
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+function ajax_maj_plafond_beneficiaire(idLimite, plafond)
+{
+ plafond = plafond.replace(/ /g,"");
+
+ donnees = 'idLimite='+idLimite+'&plafond='+plafond;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxlimitebeneficiaire/majplafond/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData){
+ alert("Erreur : "+errorData);
+ },
+ success: function(data) {
+ //alert("Success : "+data);
+ },
+ complete: function() {
+
+ }
+ });
+
+}
+
+//10-04-2023
+function ajax_maj_plafond_affection(idAffection, appliquerPlafond, controle)
+{
+ if(appliquerPlafond<=' ')
+ {
+ v_msg="Le plafond s'applique Oui ou Non ?";
+ v_msgEng="Does the cap apply or not?";
+ alert_ebene(v_msg, v_msgEng);
+
+ controle.focus();
+ return;
+ }
+
+ donnees = 'idAffection='+idAffection+"&appliquerPlafond="+appliquerPlafond;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxaffectioncollegetm/majplafond/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ //$("#div_complet").html(data);
+ //afficher_prestataire_tm();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+
+}
+
+//19-04-2023
+function supprimer_baremegarantie(adminProd,idGarantie)
+{
+
+ if (adminProd != "1"){
+ v_msg="Vous n'\u00eates pas autoris\u00e9!";
+ v_msgEng="You are not authorized!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous cette suppression?";
+ v_msgEng="Do you confirm this deletion?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxinsererbaremegarantie/supprimer/",
+ type : 'post',
+ data: "idGarantie="+idGarantie,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ actualiser_bareme_garantie();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function supprimer_baremegarantielienparente(adminProd, idGarantie)
+{
+
+ if (adminProd != "1"){
+ v_msg="Vous n'\u00eates pas autoris\u00e9!";
+ v_msgEng="You are not authorized!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous cette suppression?";
+ v_msgEng="Do you confirm this deletion?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxinsererbaremegarantielienparente/supprimer/",
+ type : 'post',
+ data: "idGarantie="+idGarantie,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ actualiser_bareme_garantie_lienparente();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+
+function supprimer_baremeacte(adminProd, idActe)
+{
+ if (adminProd != "1"){
+ v_msg="Vous n'\u00eates pas autoris\u00e9!";
+ v_msgEng="You are not authorized!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous cette suppression?";
+ v_msgEng="Do you confirm this deletion?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxinsererbaremeacte/supprimer/",
+ type : 'post',
+ data: "idActe="+idActe,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ actualiser_bareme_acte();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function supprimer_baremeactelienparente(adminProd, idActe)
+{
+ if (adminProd != "1"){
+ v_msg="Vous n'\u00eates pas autoris\u00e9!";
+ v_msgEng="You are not authorized!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous cette suppression?";
+ v_msgEng="Do you confirm this deletion?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxinsererbaremeactelienparente/supprimer/",
+ type : 'post',
+ data: "idActe="+idActe,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ actualiser_bareme_acte_lienparente();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+//28-04-2023
+function afficheNombreLigneBareme(table)
+{
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnbrelignebareme/"+table+"/",
+ type : 'post',
+ data: "table="+table,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ if(table=="garantiesbaremepriseencharge"){
+ $("#garantiesbaremepriseencharge").html(data);
+ }else if(table=="garantiesbaremepriseenchargelienparente"){
+ $("#garantiesbaremepriseenchargelienparente").html(data);
+ }else if(table=="actesbaremepriseencharge"){
+ $("#actesbaremepriseencharge").html(data);
+ }else if(table=="actesbaremepriseenchargelienparente"){
+ $("#actesbaremepriseenchargelienparente").html(data);
+ }else if(table=="detailbareme"){
+ $("#detailbareme").html(data);
+ }
+ },
+ complete: function() {
+
+ }
+ });
+
+
+}
+
+//02-05-2023
+function archivage_bareme(idBaremePriseEnCharge, archiver)
+{
+ if(archiver=="0"){
+
+ v_msg="Valider l'entête du barème avant de voir son détail, confirmez-vous la validation?";
+ v_msgEng="Validate the header of the scale before seeing its details, do you confirm the validation?";
+ }else{
+ v_msg="Invalider l'entête du barème avant de le modifier, confirmez-vous la invalidation?";
+ v_msgEng="Invalidate the header of the scale before changing it, do you confirm the invalidation?";
+ }
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxbaremepriseencharge/archiver/",
+ type: 'POST',
+ data: 'idBaremePriseEnCharge='+idBaremePriseEnCharge+'&archiver='+archiver,
+ success: function(data)
+ {
+ if(archiver=="0"){
+ v_msg="Le barème est validé avec succès!";
+ v_msgEng="The schedule is successfully validated!";
+ }else{
+ v_msg="Le barème est invalidé avec succès!";
+ v_msgEng="The scale is successfully invalidated!";
+ }
+
+ alert_ebene(v_msg, v_msgEng);
+
+ },
+ complete: function(data)
+ {
+ retour_liste_bareme();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ retour_liste_bareme();
+ }
+ });
+
+}
+
+//
+function plafondFamilleProduit(){
+ var codeProduit = $('#codeProduit').val();
+ var codeGcAssureur = $('#codeGcAssureur').val();
+
+ donnees ='codeProduit='+codeProduit;
+ donnees +='&codeGcAssureur='+codeGcAssureur;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxplafondfamilleproduit/",
+ type: 'post',
+ data: donnees,
+ error: function(errorData){
+ //alert("Erreur : "+errorData);
+
+ },
+ success: function(data) {
+ $('#div_plafond').html(data);
+ //affiche_particularite_statut();
+ },
+ complete: function(){
+ }
+ });
+
+}
+
+function libelleBaremeCollege(controle){
+
+ tab["bareme"] = controle.options[controle.selectedIndex].text;
+
+ nomcollege();
+
+}
+
+function libelleTypeCollege(controle){
+
+ tab["type"] = controle.options[controle.selectedIndex].text;
+
+
+
+ nomcollege();
+}
+
+function nomcollege(){
+ if(tab["type"]==undefined)
+ {
+ tab["type"] = '';
+ }
+
+ if(tab["bareme"]==undefined)
+ {
+ tab["bareme"] = '';
+ }
+
+ $('#libelleCollege').val(tab["type"]+' '+tab["bareme"]);
+}
+
+//09-05-2023
+function affichelisteactes(libelle, zone)
+{
+ if(libelle!='' && libelle.length >="3")
+ {
+ var donnees = 'libelle='+ libelle+'&zone='+zone;
+
+ //alert(donnees);
+ vLink = "Ajaxchargeractesexamenhospitalisation/";
+ $.ajax({
+ type: "POST",
+ url: $("#racineWeb").val()+vLink,
+ data:donnees,
+ beforeSend: function(){
+ if(zone=="acte" || zone=="decompte" || zone=="proforma"){
+ $("#searchInputActe").css("background","#FFF url(Bootstrap/images/LoaderIcon.gif) no-repeat 165px");
+ }else if (zone=="lienparente"){
+ $("#searchInputLienparente").css("background","#FFF url(Bootstrap/images/LoaderIcon.gif) no-repeat 165px");
+ }
+ },
+ success: function(data){
+ if(zone=="acte" || zone=="decompte" || zone=="proforma"){
+ $("#div_selection_acte").show();
+ $("#div_selection_acte").html(data);
+ $("#searchInputActe").css("background","#FFF");
+ }else if (zone=="lienparente"){
+ $("#div_selection_lienparente").show();
+ $("#div_selection_lienparente").html(data);
+ $("#searchInputLienparente").css("background","#FFF");
+ }
+ }
+ });
+ }else{
+ if(zone=="acte" || zone=="decompte" || zone=="proforma"){
+ $("#div_selection_acte").hide();
+ }else if (zone=="lienparente"){
+ $("#div_selection_lienparente").hide();
+ }
+ return false;
+ }
+}
+
+function selectElement(code, libelle, zone){
+ nomForm = $("#nomForm").val();
+
+ if(zone=="acte" || zone=="decompte" || zone=="proforma"){
+ $("#searchInputActe").val(libelle);
+ $("#div_selection_acte").hide();
+ $("#codeActe").val(code);
+
+ if(nomForm=="tMadherentacte"){
+ afficheMaxdateEffetAdherentacte();
+ }else if(nomForm=="tMbeneficiaireActe"){
+ afficheMaxdateEffetBeneficiaireacte();
+ }else if(nomForm=="tMcollegeActe"){
+ afficheMaxdateEffetcollegeacte();
+ }else if(nomForm=="tMpoliceActe"){
+ afficheMaxdateEffetpoliceacte();
+ }else if(nomForm=="tMclientActe"){
+ afficheMaxdateEffetclientacte();
+ }else if(nomForm=="frmFactureclassique" || nomForm=="frmFactureclassiquepolice"){
+ ajouter_un_acte_factureclassique(code);
+ }else if(nomForm=="traitementProforma"){
+ ajouter_un_acte_proforma(code);
+ }
+
+
+
+ if(zone=="decompte"){
+ //var str = libelle.split(' <==> ');
+
+ //var prixTarif = extraitNombre(str[1]);
+
+ ajouter_un_acte_selection_dec(code);
+ }
+
+ }else if (zone=="lienparente"){
+ $("#searchInputLienparente").val(libelle);
+ $("#div_selection_lienparente").hide();
+ $("#codeActeLienParente").val(code);
+ }
+}
+
+function afficherDetailBareme()
+{
+ masquerBareme = $("#masquerBareme").val();
+
+ if(masquerBareme == undefined){
+ masquerBareme = "1";
+ }
+
+ //alert(masquerGarantie);
+
+ if(masquerBareme=="1"){
+ $('#div_bareme').hide();
+ $("#masquerBareme").val("0");
+ $("#span_bareme").text("[+]");
+
+ }else{
+ $('#div_bareme').show();
+ $("#masquerBareme").val("1");
+ //$("#dateEffetGarantie").focus();
+ $("#span_bareme").text("[-]");
+
+ init_saisie_detailbareme();
+ actualiser_detailbareme();
+ }
+
+ afficheNombreLigneBareme('detailbareme');
+}
+
+
+function init_saisie_detailbareme()
+{
+ $("#dateEffetBareme").val("");
+ $("#actif").val("");
+}
+
+function controleDateEffetBareme(){
+
+ var datejour = $("#datejour_C").val();
+ var maxDateEffetBareme = $("#maxDateEffetBareme").val();
+ var dateEffetBareme = $("#dateEffetBareme").val();
+
+ var str = dateEffetBareme.split('/');
+
+ var effet = str[2]+'-'+str[1]+'-'+str[0];
+
+ var tdj = new Date(datejour);
+ var tde = new Date(effet);
+
+ dte=Math.round(Date.parse(tde)/(1000*3600*24));
+ dtj=Math.round(Date.parse(tdj)/(1000*3600*24));
+
+ //alert(maxDateEffetBareme);
+ //return;
+
+ if((dte < dtj) && (maxDateEffetBareme!=undefined)){
+ var tdm = new Date(maxDateEffetBareme);
+
+ dtm = Math.round(Date.parse(tdm)/(1000*3600*24));
+
+ //alert(dte+' '+dtm);
+ //return;
+
+ if(dte < dtm){
+
+ v_msg="Date d'effet invalide!";
+ v_msgEng="Invalid effective date!";
+ alert_ebene(v_msg, v_msgEng);
+ $("#dateEffetBareme").val('');
+ $("#dateEffetBareme").focus();
+ return;
+ }
+ }
+
+
+}
+
+function actualiser_detailbareme()
+{
+ idBaremePriseEnCharge = $("#idBaremePriseEnCharge").val();
+
+ donnees = 'idBaremePriseEnCharge='+idBaremePriseEnCharge;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxinsererdetailbareme/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData){
+ //alert("Erreur : "+errorData);
+ },
+ success: function(data) {
+ //alert("Success : "+data);
+ $('#div_bareme').html(data);
+
+
+ },
+ complete: function() {
+
+ }
+ });
+
+}
+
+function supprimer_detailbareme(adminProd, idDetail)
+{
+
+ if (adminProd != "1"){
+ v_msg="Vous n'\u00eates pas autoris\u00e9!";
+ v_msgEng="You are not authorized!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous cette suppression?";
+ v_msgEng="Do you confirm this deletion?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxinsererdetailbareme/supprimer/",
+ type : 'post',
+ data: "idDetail="+idDetail,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ actualiser_detailbareme();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function inserer_bareme()
+{
+ idBaremePriseEnCharge = $("#idBaremePriseEnCharge").val();
+ dateEffetBareme = $("#dateEffetBareme").val();
+ ticketModerateurBareme = $("#ticketModerateurBareme").val();
+ //actif = $("#actif").val();
+
+ if(dateEffetBareme <= " "){
+
+ v_msg="Veuillez entrer une date d'effet!";
+ v_msgEng="Please enter an effective date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateEffetBareme").focus();
+ return;
+
+ }
+
+ if(ticketModerateurBareme <= " "){
+
+ v_msg="Veuillez entrer un ticket modérateur!";
+ v_msgEng="Please enter a co-payment!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#ticketModerateurBareme").focus();
+ return;
+
+ }
+
+ $("#div_bareme").html('' + '
');
+
+ donnees = 'idBaremePriseEnCharge='+idBaremePriseEnCharge;
+ donnees += '&dateEffetBareme='+dateEffetBareme;
+ donnees += '&ticketModerateurBareme='+ticketModerateurBareme;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxinsererdetailbareme/ajouter/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData){
+ //alert("Erreur : "+errorData);
+ },
+ success: function(data) {
+ //alert("Success : "+data);
+ init_saisie_detailbareme();
+ actualiser_detailbareme();
+ },
+ complete: function() {
+ afficheNombreLigneBareme('detailbareme');
+ $("#masquerBareme").val("0");
+ afficherDetailBareme();
+ }
+ });
+}
+
+//15-05-2023
+function consosadherent(){
+
+ var idAdherent = $('#idAdherent').val();
+
+ $("#div_patienter").html('' + '
');
+
+ //Ajaxlimiteaddadherent
+ donnees = 'idAdherent='+idAdherent;
+
+ //alert(donnees);
+ //return;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxconsosadherent/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData){
+ alert("Erreur : "+errorData);
+ },
+ success: function(data) {
+ //alert("Success : "+data);
+ $("#div_patienter").html('');
+ $('#div_consos_adherent').html(data);
+ $('#div_consos_adherent').modal("show");
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+
+function consosbeneficiaire(){
+ //\u00ea, \u00e9
+
+ var idBeneficiaire = $('#idBeneficiaire').val();
+
+ $("#div_patienter").html('' + '
');
+
+ //Ajaxlimiteaddadherent
+ donnees = 'idBeneficiaire='+idBeneficiaire;
+
+ //alert(donnees);
+ //return;
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxconsosbeneficiaire/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData){
+ alert("Erreur : "+errorData);
+ },
+ success: function(data) {
+ //alert("Success : "+data);
+ $("#div_patienter").html('');
+ $('#div_consos_beneficiaire').html(data);
+ $('#div_consos_beneficiaire').modal("show");
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+function recherchecodeproduit()
+{
+ var codeProduit = $("#codeProduit").val();
+
+ var donnee_a_affciher = "";
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxnouveauproduit/rechercher",
+ type : 'post',
+ data: 'codeProduit='+codeProduit,
+ error: function(errorData){
+ alert("Erreur : "+errorData);
+ },
+ success: function(data) {
+ //alert("Success : "+data);
+ donnee_a_affciher = data;
+ },
+ complete: function() {
+ //alert(donnee_a_affciher);
+ if(donnee_a_affciher=="true")
+ {
+ v_msg="Ce code produit existe déjà! Veuillez le remplacer.";
+ v_msgEng="This product code already exists! Please replace it.";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeProduit").val("");
+ $("#codeProduit").focus();
+ }
+ }
+ });
+
+}
+
+function extraitNombre(str){
+ return Number(str.replace(/[^\d]/g, ""))
+}
+
+
+function ajax_maj_qte_acte_dec(idPrestationactes, quantite, controle)
+{
+ donnee_a_affciher = "";
+
+ quantite=quantite.replace(",",".");
+ controle.value=quantite;
+
+ if(controle_numerique(controle))
+ {
+ if(quantite==0)
+ {
+ controle.focus();
+ v_msg="Veuillez saisir la quantit\u00e9!";
+ v_msgEng="Please enter the quantity!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ donnees = 'idPrestationactes='+idPrestationactes+"&quantite="+quantite;
+
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxafficherajoutactesdec/majquantite/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ donnee_a_affciher = data;
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ $("#div_prestations").html(donnee_a_affciher);
+ }
+ });
+ }
+}
+
+//20-05-2023
+function maj_composante_effettarif_acte(idActe, dateEffet, maxDateEffetActe, ligne){
+
+ var datejour = $("#datejour_C").val();
+
+ var str = dateEffet.split('/');
+
+ var effet = str[2]+'-'+str[1]+'-'+str[0];
+
+ var tdj = new Date(datejour);
+ var tde = new Date(effet);
+
+ donnees = "idActe="+idActe+"&dateEffet="+dateEffet;
+
+ v_msg="Confirmez-vous cette date d'effet?";
+ v_msgEng="Do you confirm this effective date?";
+
+ dte=Math.round(Date.parse(tde)/(1000*3600*24));
+ dtj=Math.round(Date.parse(tdj)/(1000*3600*24));
+
+ //alert(donnees);
+ //return;
+
+ if((dte < dtj) && (maxDateEffetActe!="")){
+ var tdm = new Date(maxDateEffetActe);
+
+ dtm = Math.round(Date.parse(tdm)/(1000*3600*24));
+
+ if(dte < dtm){
+
+ v_msg="Date d'effet invalide!";
+ v_msgEng="Invalid effective date!";
+ alert_ebene(v_msg, v_msgEng);
+ $("#dateEffet"+ligne).val('');
+ $("#dateEffet"+ligne).focus();
+ return;
+ }else{
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarif/majeffet/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ //actualiserActesTarifes();
+ },
+ complete: function(data)
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ $("#dateEffet"+ligne).val('');
+ $("#dateEffet"+ligne).focus();
+ }
+ });
+ }
+ }else{
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarif/majeffet/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ //actualiserActesTarifes();
+ },
+ complete: function(data)
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ $("#dateEffet"+ligne).val('');
+ $("#dateEffet"+ligne).focus();
+ }
+ });
+ }
+}
+
+
+function actualiserActesTarifes()
+{
+ donnees='';
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxactestarifes/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $('#div_acte_2').html(data);
+ appliquerDataTable();
+ },
+ complete: function(data)
+ {
+ }
+ });
+
+}
+
+//21-05-2023
+function valider_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="Validez-vous cette composition de tarif?";
+ v_msgEng="Do you validate this price composition?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarif/validertarif/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ ajax_composante_tarif("1");
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function ajouter_tous_prestataires_tarifclient()
+{
+ idClient = $("#idClient").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idClient<=' ')
+ {
+ v_msg="Veuillez sélectionner un client!";
+ v_msgEng="Please select a customer!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idClient").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;
+ }
+
+
+ donnees = "idClient="+idClient+"&codeTarifActe="+codeTarifActe;
+
+ v_msg="Attention, cela va associer tous les prestataires au tarif sélectionné! Confirmez-vous cette action?";
+ v_msgEng="Be careful, this will associate all providers with the selected rate! Do you confirm this action?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $("#div_compsante_tarif").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifclientprestataire/ajoutertousprestataires/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function ajouter_un_prestataire_tarifclient(codePrestataire)
+{
+ idClient = $("#idClient").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idClient<=' ')
+ {
+ v_msg="Veuillez sélectionner un client!";
+ v_msgEng="Please select a customer!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idClient").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;
+ }
+
+
+ donnees = "idClient="+idClient+"&codeTarifActe="+codeTarifActe+'&codePrestataire='+codePrestataire;
+
+
+ $("#div_compsante_tarif").html('' + '
');
+
+ v_msg="Voulez-vous associer ce prestataire au tarif sélectionné?";
+ v_msgEng="Do you want to associate this service provider with the selected rate?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifclientprestataire/ajouterunprestataire/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function retirer_tous_prestataires_tarifclient()
+{
+ idClient = $("#idClient").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idClient<=' ')
+ {
+ v_msg="Veuillez sélectionner un client!";
+ v_msgEng="Please select a customer!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idClient").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;
+ }
+
+
+ donnees = "idClient="+idClient+"&codeTarifActe="+codeTarifActe;
+
+ $("#div_compsante_tarif").html('' + '
');
+
+ v_msg="Confirmez-vous le retrait du tarif de tous les prestataires ajoutés?";
+ v_msgEng="Do you confirm the withdrawal of the tariff of all the providers added?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifclientprestataire/retirertousprestataires/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data)
+ {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function retirer_un_prestataire_tarifclient(codePrestataire)
+{
+
+ idClient = $("#idClient").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idClient<=' ')
+ {
+ v_msg="Veuillez sélectionner un client!";
+ v_msgEng="Please select a customer!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idClient").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;
+ }
+
+
+ donnees = "idClient="+idClient+"&codeTarifActe="+codeTarifActe+'&codePrestataire='+codePrestataire;
+
+
+ $("#div_compsante_tarif").html('' + '
');
+
+ v_msg="Attention! Confirmez-vous le retrait de ce prestataire?";
+ v_msgEng="Attention! Do you confirm the withdrawal of this service provider?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifclientprestataire/retirerunprestataire/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+//25-05-2023
+function ajax_composante_tarif_police_prestataire()
+{
+ adminSin=$("#adminSin").val();
+
+ if (adminSin!="1")
+ {
+ v_msg="Non autorisée!";
+ v_msgEng="Not allowed!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ idPolice = $("#idPolice").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idPolice<=' ')
+ {
+ v_msg="Veuillez sélectionner une police!";
+ v_msgEng="Please select a insurance policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idPolice").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;
+ }
+
+
+ donnees = "idPolice="+idPolice+"&codeTarifActe="+codeTarifActe;
+
+ var div_attente = $('#div_compsante_tarif');
+
+ div_attente.html('' + '
');
+
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifpoliceprestataire/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_attente.html(data);
+ appliquerDataTable();
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajouter_tous_prestataires_tarifpolice()
+{
+ idPolice = $("#idPolice").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idPolice<=' ')
+ {
+ v_msg="Veuillez sélectionner une police!";
+ v_msgEng="Please select a insurance policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idPolice").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;
+ }
+
+
+ donnees = "idPolice="+idPolice+"&codeTarifActe="+codeTarifActe;
+
+ $("#div_compsante_tarif").html('' + '
');
+
+
+ v_msg="Attention, cela va associer tous les prestataires au tarif sélectionné! Confirmez-vous cette action?";
+ v_msgEng="Be careful, this will associate all providers with the selected rate! Do you confirm this action?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifpoliceprestataire/ajoutertousprestataires/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function ajouter_un_prestataire_tarifpolice(codePrestataire)
+{
+ idPolice = $("#idPolice").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idPolice<=' ')
+ {
+ v_msg="Veuillez sélectionner une police!";
+ v_msgEng="Please select a insurance policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idPolice").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;
+ }
+
+
+ donnees = "idPolice="+idPolice+"&codeTarifActe="+codeTarifActe+'&codePrestataire='+codePrestataire;
+
+
+ $("#div_compsante_tarif").html('' + '
');
+
+ v_msg="Voulez-vous associer ce prestataire au tarif sélectionné?";
+ v_msgEng="Do you want to associate this service provider with the selected rate?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifpoliceprestataire/ajouterunprestataire/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ ajax_composante_tarif_police_prestataire();
+ }
+ });
+
+}
+
+function retirer_tous_prestataires_tarifpolice()
+{
+ idPolice = $("#idPolice").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idPolice<=' ')
+ {
+ v_msg="Veuillez sélectionner une police!";
+ v_msgEng="Please select a insurance policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idPolice").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;
+ }
+
+
+ donnees = "idPolice="+idPolice+"&codeTarifActe="+codeTarifActe;
+
+ $("#div_compsante_tarif").html('' + '
');
+
+
+ v_msg="Confirmez-vous le retrait du tarif de tous les prestataires ajoutés?";
+ v_msgEng="Do you confirm the withdrawal of the tariff of all the providers added?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifpoliceprestataire/retirertousprestataires/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data)
+ {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function retirer_un_prestataire_tarifpolice(codePrestataire)
+{
+
+ idPolice = $("#idPolice").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idPolice<=' ')
+ {
+ v_msg="Veuillez sélectionner une police!";
+ v_msgEng="Please select a insurance policy!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#idPolice").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;
+ }
+
+
+ donnees = "idPolice="+idPolice+"&codeTarifActe="+codeTarifActe+'&codePrestataire='+codePrestataire;
+
+
+ $("#div_compsante_tarif").html('' + '
');
+
+ v_msg="Attention! Confirmez-vous le retrait de ce prestataire?";
+ v_msgEng="Attention! Do you confirm the withdrawal of this service provider?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifpoliceprestataire/retirerunprestataire/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function ajax_composante_tarif_college_prestataire()
+{
+ adminSin=$("#adminSin").val();
+
+ if (adminSin!="1")
+ {
+ v_msg="Non autorisée!";
+ v_msgEng="Not allowed!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ idCollege = $("#idCollege").val();
+ codeTarifActe = $("#codeTarifActe").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(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ idPolice = $("#idPolice").val();
+
+ donnees = "idCollege="+idCollege+"&codeTarifActe="+codeTarifActe;
+ donnees += "&idPolice="+idPolice;
+
+ var div_attente = $('#div_compsante_tarif');
+
+ div_attente.html('' + '
');
+
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifcollegeprestataire/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_attente.html(data);
+ appliquerDataTable();
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajouter_tous_prestataires_tarifcollege()
+{
+ idCollege = $("#idCollege").val();
+ codeTarifActe = $("#codeTarifActe").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(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ donnees = "idCollege="+idCollege+"&codeTarifActe="+codeTarifActe;
+
+ $("#div_compsante_tarif").html('' + '
');
+
+
+ v_msg="Attention, cela va associer tous les prestataires au tarif sélectionné! Confirmez-vous cette action?";
+ v_msgEng="Be careful, this will associate all providers with the selected rate! Do you confirm this action?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifcollegeprestataire/ajoutertousprestataires/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function ajouter_un_prestataire_tarifcollege(codePrestataire)
+{
+ idCollege = $("#idCollege").val();
+ codeTarifActe = $("#codeTarifActe").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(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+
+ donnees = "idCollege="+idCollege+"&codeTarifActe="+codeTarifActe+'&codePrestataire='+codePrestataire;
+
+ $("#div_compsante_tarif").html('' + '
');
+
+ v_msg="Voulez-vous associer ce prestataire au tarif sélectionné?";
+ v_msgEng="Do you want to associate this service provider with the selected rate?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifcollegeprestataire/ajouterunprestataire/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function retirer_tous_prestataires_tarifcollege()
+{
+ idCollege = $("#idCollege").val();
+ codeTarifActe = $("#codeTarifActe").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(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ donnees = "idCollege="+idCollege+"&codeTarifActe="+codeTarifActe;
+
+ $("#div_compsante_tarif").html('' + '
');
+
+
+ v_msg="Confirmez-vous le retrait du tarif de tous les prestataires ajoutés?";
+ v_msgEng="Do you confirm the withdrawal of the tariff of all the providers added?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifcollegeprestataire/retirertousprestataires/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data)
+ {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function retirer_un_prestataire_tarifcollege(codePrestataire)
+{
+
+ idCollege = $("#idCollege").val();
+ codeTarifActe = $("#codeTarifActe").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(codeTarifActe<=' ')
+ {
+ v_msg="Veuillez sélectionner un tarif!";
+ v_msgEng="Please select a rate!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#codeTarifActe").focus();
+ return;
+ }
+
+ donnees = "idCollege="+idCollege+"&codeTarifActe="+codeTarifActe+'&codePrestataire='+codePrestataire;
+
+ $("#div_compsante_tarif").html('' + '
');
+
+ v_msg="Attention! Confirmez-vous le retrait de ce prestataire?";
+ v_msgEng="Attention! Do you confirm the withdrawal of this service provider?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifcollegeprestataire/retirerunprestataire/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function chargernumero(numero)
+{
+ var nomForm = $('#nomForm').val();
+ var donnees = 'numero='+ numero;
+ //alert(donnees); return;
+
+ if(nomForm=="adherentprestataire" || nomForm=="tMadherent" || nomForm=="tMadherentacte"
+ || nomForm=="tMadherentacteprestataire" || nomForm=="tMadherentgarantie" || nomForm =="tMadherentgarantieprestataire"
+ || nomForm =="tMadherentprestataire")
+ {
+ vLink = "Ajaxchargernumeroadherent/";
+ }else
+ if(nomForm=="beneficiaireprestataire" || nomForm=="tMbeneficiaire" || nomForm=="tMbeneficiaireActe"
+ || nomForm=="tMbeneficiaireActePrestataire" || nomForm=="tMbeneficiaireGarantie" || nomForm=="tMbeneficiaireGarantiePrestataire"
+ || nomForm=="tMbeneficiairePrestataire" || nomForm=="tarifappliquebeneficiaire" || nomForm=="remboursementClassic")
+ {
+ vLink = "Ajaxchargernumerobeneficiaire/";
+ }
+
+ $.ajax({
+ type: "POST",
+ url: $("#racineWeb").val()+vLink,
+ data:donnees,
+ beforeSend: function(){
+ $("#searchInput").css("background","#FFF url(Bootstrap/images/LoaderIcon.gif) no-repeat 165px");
+ },
+ success: function(data){
+ $("#div_selection").show();
+ $("#div_selection").html(data);
+ $("#searchInput").css("background","#FFF");
+ }
+ });
+}
+
+//adhérent - prestataire
+function selectAssure(id, numero, nom, nomPolice, nomCollege, codeLienParente){
+
+ $("#searchInput").val(numero);
+ $("#div_selection").hide();
+ $("#nomAssure").val(nom);
+ $("#idAssure").val(id);
+
+ $("#nomPolice").val(nomPolice);
+ $("#nomCollege").val(nomCollege);
+ $("#codeLienParente").val(codeLienParente);
+
+ if($("#nomForm").val()=="tMadherent")
+ {
+ afficheMaxdateEffetAdherent();
+ }
+}
+
+function ajax_composante_tarif_adherent_prestataire()
+{
+ adminSin=$("#adminSin").val();
+
+ if (adminSin!="1")
+ {
+ v_msg="Non autorisée!";
+ v_msgEng="Not allowed!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ idAssure = $("#idAssure").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idAssure=='0')
+ {
+ v_msg="Veuillez entrer un numéro d'adhérent!";
+ v_msgEng="Please enter a membership number!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").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;
+ }
+
+ nomAssure = $("#nomAssure").val();
+ numeroAdherent = $("#searchInput").val();
+
+ nomPolice = $("#nomPolice").val();
+ nomCollege = $("#nomCollege").val();
+ codeLienParente = $("#codeLienParente").val();
+
+ donnees = "idAssure="+idAssure+"&codeTarifActe="+codeTarifActe;
+ donnees += "&numeroAdherent="+numeroAdherent+"&nomAssure="+nomAssure;
+ donnees += "&nomPolice="+nomPolice+"&nomCollege="+nomCollege;
+ donnees += "&codeLienParente="+codeLienParente;
+
+ var div_attente = $('#div_compsante_tarif');
+
+ div_attente.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifadherentprestataire/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_attente.html(data);
+ appliquerDataTable();
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajouter_tous_prestataires_tarifadherent()
+{
+ idAssure = $("#idAssure").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idAssure=='0')
+ {
+ v_msg="Veuillez entrer un numéro d'adhérent!";
+ v_msgEng="Please enter a membership number!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").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;
+ }
+
+ donnees = "idAssure="+idAssure+"&codeTarifActe="+codeTarifActe;
+
+
+ $("#div_compsante_tarif").html('' + '
');
+
+
+ v_msg="Attention, cela va associer tous les prestataires au tarif sélectionné! Confirmez-vous cette action?";
+ v_msgEng="Be careful, this will associate all providers with the selected rate! Do you confirm this action?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifadherentprestataire/ajoutertousprestataires/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function ajouter_un_prestataire_tarifadherent(codePrestataire)
+{
+ idAssure = $("#idAssure").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idAssure=='0')
+ {
+ v_msg="Veuillez entrer un numéro d'adhérent!";
+ v_msgEng="Please enter a membership number!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").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;
+ }
+
+
+ donnees = "idAssure="+idAssure+"&codeTarifActe="+codeTarifActe+'&codePrestataire='+codePrestataire;
+
+ $("#div_compsante_tarif").html('' + '
');
+
+ v_msg="Voulez-vous associer ce prestataire au tarif sélectionné?";
+ v_msgEng="Do you want to associate this service provider with the selected rate?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifadherentprestataire/ajouterunprestataire/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function retirer_tous_prestataires_tarifadherent()
+{
+ idAssure = $("#idAssure").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idAssure=='0')
+ {
+ v_msg="Veuillez entrer un numéro d'adhérent!";
+ v_msgEng="Please enter a membership number!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").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;
+ }
+
+
+ donnees = "idAssure="+idAssure+"&codeTarifActe="+codeTarifActe;
+
+
+ $("#div_compsante_tarif").html('' + '
');
+
+
+ v_msg="Confirmez-vous le retrait du tarif de tous les prestataires ajoutés?";
+ v_msgEng="Do you confirm the withdrawal of the tariff of all the providers added?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifadherentprestataire/retirertousprestataires/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data)
+ {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function retirer_un_prestataire_tarifadherent(codePrestataire)
+{
+
+ idAssure = $("#idAssure").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idAssure=='0')
+ {
+ v_msg="Veuillez entrer un numéro d'adhérent!";
+ v_msgEng="Please enter a membership number!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").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;
+ }
+
+
+ donnees = "idAssure="+idAssure+"&codeTarifActe="+codeTarifActe+'&codePrestataire='+codePrestataire;
+
+
+ $("#div_compsante_tarif").html('' + '
');
+
+ v_msg="Attention! Confirmez-vous le retrait de ce prestataire?";
+ v_msgEng="Attention! Do you confirm the withdrawal of this service provider?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarifadherentprestataire/retirerunprestataire/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+}
+
+
+//beneficiaire - prestataire
+function selectBeneficiaire(id, numero, nom, nomPolice, nomCollege, codeLienParente, numeroAdherent, adherent){
+ $("#searchInput").val(numero);
+ $("#div_selection").hide();
+ $("#nomAssure").val(nom);
+ $("#idAssure").val(id);
+
+ $("#codeLienParente").val(codeLienParente);
+
+ $("#noAdherent").val(numeroAdherent);
+ $("#nomAdherent").val(adherent);
+
+ if($("#nomForm").val()=="remboursementClassic"){
+ $("#idBeneficiaire").val(id);
+ ajax_context_adherent(id);
+ }else{
+ $("#nomPolice").val(nomPolice);
+ $("#nomCollege").val(nomCollege);
+ }
+
+
+
+ if($("#nomForm").val()=="tMbeneficiaire")
+ {
+ afficheMaxdateEffetBeneficiaire();
+ }
+}
+
+function ajax_composante_tarif_beneficiaire_prestataire()
+{
+ adminSin=$("#adminSin").val();
+
+ if (adminSin!="1")
+ {
+ v_msg="Non autorisée!";
+ v_msgEng="Not allowed!";
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ idAssure = $("#idAssure").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idAssure=='0')
+ {
+ v_msg="Veuillez entrer un numéro d'adhérent!";
+ v_msgEng="Please enter a membership number!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").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;
+ }
+
+ nomAssure = $("#nomAssure").val();
+ numeroBeneficiaire = $("#searchInput").val();
+
+ nomPolice = $("#nomPolice").val();
+ nomCollege = $("#nomCollege").val();
+ codeLienParente = $("#codeLienParente").val();
+
+ noAdherent = $("#noAdherent").val();
+ nomAdherent = $("#nomAdherent").val();
+
+ donnees = "idAssure="+idAssure+"&codeTarifActe="+codeTarifActe;
+ donnees += "&numeroBeneficiaire="+numeroBeneficiaire+"&nomAssure="+nomAssure;
+ donnees += "&nomPolice="+nomPolice+"&nomCollege="+nomCollege;
+ donnees += "&codeLienParente="+codeLienParente;
+ donnees += "&noAdherent="+noAdherent+"&nomAdherent="+nomAdherent;
+
+ var div_attente = $('#div_compsante_tarif');
+
+ div_attente.html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtarifbeneficiaireprestataire/",
+ type : 'post',
+ data: donnees,
+ error: function(errorData) {
+ },
+ success: function(data)
+ {
+ // $('#div_test_gabarit').html(data);
+ div_attente.html(data);
+ appliquerDataTable();
+ },
+ complete: function() {
+ }
+ });
+}
+
+function ajouter_tous_prestataires_tarifbeneficiaire()
+{
+ idAssure = $("#idAssure").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idAssure=='0')
+ {
+ v_msg="Veuillez entrer un numéro du bénéficiaire!";
+ v_msgEng="Please enter a beneficiary number!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").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;
+ }
+
+ donnees = "idAssure="+idAssure+"&codeTarifActe="+codeTarifActe;
+
+
+ $("#div_compsante_tarif").html('' + '
');
+
+
+ v_msg="Attention, cela va associer tous les prestataires au tarif sélectionné! Confirmez-vous cette action?";
+ v_msgEng="Be careful, this will associate all providers with the selected rate! Do you confirm this action?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtarifbeneficiaireprestataire/ajoutertousprestataires/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function ajouter_un_prestataire_tarifbeneficiaire(codePrestataire)
+{
+ idAssure = $("#idAssure").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idAssure=='0')
+ {
+ v_msg="Veuillez entrer un numéro d'adhérent!";
+ v_msgEng="Please enter a membership number!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").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;
+ }
+
+
+ donnees = "idAssure="+idAssure+"&codeTarifActe="+codeTarifActe+'&codePrestataire='+codePrestataire;
+
+ $("#div_compsante_tarif").html('' + '
');
+
+ v_msg="Voulez-vous associer ce prestataire au tarif sélectionné?";
+ v_msgEng="Do you want to associate this service provider with the selected rate?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtarifbeneficiaireprestataire/ajouterunprestataire/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function retirer_tous_prestataires_tarifbeneficiaire()
+{
+ idAssure = $("#idAssure").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idAssure=='0')
+ {
+ v_msg="Veuillez entrer un numéro d'adhérent!";
+ v_msgEng="Please enter a membership number!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").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;
+ }
+
+
+ donnees = "idAssure="+idAssure+"&codeTarifActe="+codeTarifActe;
+
+
+ $("#div_compsante_tarif").html('' + '
');
+
+
+ v_msg="Confirmez-vous le retrait du tarif de tous les prestataires ajoutés?";
+ v_msgEng="Do you confirm the withdrawal of the tariff of all the providers added?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtarifbeneficiaireprestataire/retirertousprestataires/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data)
+ {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function retirer_un_prestataire_tarifbeneficiaire(codePrestataire)
+{
+
+ idAssure = $("#idAssure").val();
+ codeTarifActe = $("#codeTarifActe").val();
+
+ if(idAssure=='0')
+ {
+ v_msg="Veuillez entrer un numéro d'adhérent!";
+ v_msgEng="Please enter a membership number!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").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;
+ }
+
+ donnees = "idAssure="+idAssure+"&codeTarifActe="+codeTarifActe+'&codePrestataire='+codePrestataire;
+
+ $("#div_compsante_tarif").html('' + '
');
+
+ v_msg="Attention! Confirmez-vous le retrait de ce prestataire?";
+ v_msgEng="Attention! Do you confirm the withdrawal of this service provider?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtarifbeneficiaireprestataire/retirerunprestataire/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_compsante_tarif').html(data);
+ appliquerDataTable();
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+//27-05-2023
+
+function recupererValeur()
+{
+
+ nomForm = $("#nomForm").val();
+
+
+ if(nomForm=="frmadherent")
+ {
+ nom = $("#nom").val();
+ prenoms = $("#prenoms").val();
+ sexe = $("#sexe").val();
+ dateNaissance = $("#dateNaissance").val();
+ idCollege = $("#idCollege").val();
+
+ myVal = 0;
+
+ donnees = "nom="+nom+"&prenoms="+prenoms+"&idCollege="+idCollege;
+ donnees += "&sexe="+sexe+"&dateNaissance="+dateNaissance;
+
+ myVal_nom = (nom<=" ") ? 0 : 1;
+ myVal_prenoms = (prenoms<=" ") ? 0 : 1;
+ myVal_sexe = (sexe<=" ") ? 0 : 1;
+ myVal_dateNaissance = (dateNaissance<=" ") ? 0 : 1;
+
+ myVal = parseInt(myVal_nom+myVal_prenoms+myVal_sexe+myVal_dateNaissance);
+
+ if(myVal==4)
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexistanceassure/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_existance').html(data);
+ var existe = $("#existe").val();
+
+ if(existe=="1")
+ {
+ v_msg="Les informations que vous avez saisi seront dupliquées dans la base de données si vous les enregistrez!";
+ v_msgEng="The information you entered will be duplicated in the database if you save it!";
+
+ alert_ebene(v_msg, v_msgEng);
+ }
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ }
+ }else if(nomForm=="frmbeneficiaire")
+ {
+ nomBeneficiaire = $("#nomBeneficiaire").val();
+ prenomsBeneficiaire = $("#prenomsBeneficiaire").val();
+ codeLienParente = $("#codeLienParente").val();
+ sexe = $("#sexe").val();
+ dateNaissance = $("#dateNaissance").val();
+ idAdherent = $("#idAdherent").val();
+
+ myVal = 0;
+
+ donnees = "nomBeneficiaire="+nomBeneficiaire+"&prenomsBeneficiaire="+prenomsBeneficiaire;
+ donnees += "&codeLienParente="+codeLienParente+"&sexe="+sexe+"&dateNaissance="+dateNaissance;
+ donnees += "&idAdherent="+idAdherent;
+
+ //alert(donnees);
+
+
+ myVal_nom = (nomBeneficiaire<=" ") ? 0 : 1;
+ myVal_prenoms = (prenomsBeneficiaire<=" ") ? 0 : 1;
+ myVal_codeLienParente = (codeLienParente<=" ") ? 0 : 1;
+ myVal_sexe = (sexe<=" ") ? 0 : 1;
+ myVal_dateNaissance = (dateNaissance<=" ") ? 0 : 1;
+
+ myVal = parseInt(myVal_nom+myVal_prenoms+myVal_codeLienParente+myVal_sexe+myVal_dateNaissance);
+
+ if(myVal==5)
+ {
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxexistancebeneficiaire/",
+ type: 'POST',
+ data: donnees,
+ success: function(data) {
+ $('#div_existance').html(data);
+ var existe = $("#existe").val();
+
+ if(existe=="1")
+ {
+ v_msg="Les informations que vous avez saisi seront dupliquées dans la base de données si vous les enregistrez!";
+ v_msgEng="The information you entered will be duplicated in the database if you save it!";
+
+ alert_ebene(v_msg, v_msgEng);
+ }
+ },
+ error: function(data) {
+ },
+ complete: function()
+ {
+ }
+ });
+ }
+
+
+ }
+}
+
+function supprimer_un_acte_du_tarif(idDetailtarifacte, ligne)
+{
+ donnees = 'idDetailtarifacte='+idDetailtarifacte;
+
+ v_msg="Confirmez-vous cette suppression?";
+ v_msgEng="Do you confirm this removal?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxcomposantetarif/supprimer/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ supprdetailtarif(idDetailtarifacte, ligne);
+ },
+ error: function(data) {
+ },
+ complete: function() {
+
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function supprdetailtarif(idDetailtarifacte, ligne)
+{
+ donnees = 'idDetailtarifacte='+idDetailtarifacte+'&ligne='+ligne;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxdetailsupprime/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $('#div_suppr').html(data);
+ var suppr = $("#suppr").val();
+
+ if(suppr=="1"){
+ $("#tabLigne"+ligne).css({"background-color": "red", "color": "white"});
+ }else{
+ $("#tabLigne"+ligne).css({"background-color": "transparent", "color": "black"});
+ }
+
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ //ajax_composante_tarif("0");
+ }
+ });
+
+}
+
+//16-06-2023 sorel
+function inserer_tmadherent()
+{
+ idAdherent = $("#idAssure").val();
+ dateEffet = $("#dateEffet").val();
+ tm = $("#tm").val();
+
+ if((idAdherent < " ") || (idAdherent == "0"))
+ {
+ v_msg="Veuillez sélectionner un adhérent!";
+ v_msgEng="Please select a member!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").focus();
+
+ return;
+
+ }
+
+ if((dateEffet < " "))
+ {
+ v_msg="Veuillez une date d'effet!";
+ v_msgEng="Please an effective date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateEffet").focus();
+
+ return;
+
+ }
+
+ if(tm < " ")
+ {
+ v_msg="Veuillez entrer la valeur du ticket Modérateur!";
+ v_msgEng="Please enter the Moderator ticket value!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tm").focus();
+
+ return;
+
+ }
+
+ donnees = 'idAdherent='+idAdherent+'&dateEffet='+dateEffet+'&tm='+tm;
+
+ $("#div_liste_tm").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtmadherent/inserer/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ affichertmadherent();
+
+ $("#idAssure").val('');
+ $("#searchInput").val('');
+ $("#nomAssure").val('');
+ $("#dateEffet").val('');
+ $("#tm").val('');
+ $("#codeLienParente").val('');
+ $("#nomPolice").val('');
+ $("#nomCollege").val('');
+ }
+ });
+}
+
+function affichertmadherent()
+{
+ donnees = '';
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtmadherent/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $('#div_liste_tm').html(data);
+
+ },
+ error: function(data) {
+ },
+ complete: function() {
+
+ }
+ });
+
+}
+
+
+
+function controleDateEffetTm(){
+
+ var datejour = $("#datejour_C").val();
+ var maxDateEffetTmAdherent = $("#maxDateEffetTmAdherent").val();
+ var dateEffet = $("#dateEffet").val();
+
+ var str = dateEffet.split('/');
+
+ var effet = str[2]+'-'+str[1]+'-'+str[0];
+
+ var tdj = new Date(datejour);
+ var tde = new Date(effet);
+
+ dte=Math.round(Date.parse(tde)/(1000*3600*24));
+ dtj=Math.round(Date.parse(tdj)/(1000*3600*24));
+
+ //alert(maxDateEffetGarantie);
+ //return;
+
+ if((dte < dtj) && (maxDateEffetTmAdherent!=undefined)){
+ var tdm = new Date(maxDateEffetTmAdherent);
+
+ dtm = Math.round(Date.parse(tdm)/(1000*3600*24));
+
+ //alert(dte < dtm);
+ //return;
+
+ if(dte < dtm){
+
+ v_msg="Date d'effet invalide!";
+ v_msgEng="Invalid effective date!";
+ alert_ebene(v_msg, v_msgEng);
+ $("#dateEffet").val('');
+ $("#dateEffet").focus();
+ return;
+ }
+ }
+
+
+}
+
+function afficheMaxdateEffetAdherent()
+{
+ idAdherent = $("#idAssure").val();
+
+ donnees = "idAdherent="+idAdherent;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtmadherent/controle/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $('#div_effet_max').html(data);
+
+ },
+ error: function(data) {
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+
+function supprimer_tmadherent(idTm, adminSin)
+{
+ if (adminSin != "1"){
+ v_msg="Vous n'\u00eates pas autoris\u00e9!";
+ v_msgEng="You are not authorized!";
+
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous cette suppression?";
+ v_msgEng="Do you confirm this deletion?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtmadherent/supprimer/",
+ type : 'post',
+ data: "idTm="+idTm,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ affichertmadherent();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+}
+
+//20-06-2023
+function retour_limite()
+{
+ nomForm = $("#nomForm").val();
+
+ if(nomForm == "ficheAdherent"){
+ afficher_adherent_id();
+ }else if(nomForm == "ficheBeneficiaire"){
+ afficher_beneficiaire_id();
+ }
+
+}
+
+//20-06-2023 sorel
+function inserer_tmadherentacte()
+{
+ idAdherent = $("#idAssure").val();
+ dateEffet = $("#dateEffet").val();
+ tm = $("#tm").val();
+ codeActe = $("#codeActe").val();
+ codeGarantie = $("#codeGarantie").val();
+
+ if((idAdherent < " ") || (idAdherent == "0"))
+ {
+ v_msg="Veuillez sélectionner un adhérent!";
+ v_msgEng="Please select a member!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").focus();
+
+ return;
+
+ }
+
+ if((dateEffet < " "))
+ {
+ v_msg="Veuillez une date d'effet!";
+ v_msgEng="Please an effective date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateEffet").focus();
+
+ return;
+
+ }
+
+ if(tm < " ")
+ {
+ v_msg="Veuillez entrer la valeur du ticket Modérateur!";
+ v_msgEng="Please enter the Moderator ticket value!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tm").focus();
+
+ return;
+
+ }
+
+ if(codeActe < " ")
+ {
+ v_msg="Veuillez sélectionner un acte!";
+ v_msgEng="Please select an act!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInputActe").focus();
+
+ return;
+
+ }
+
+ donnees = 'idAdherent='+idAdherent+'&dateEffet='+dateEffet;
+ donnees += '&tm='+tm+'&codeActe='+codeActe+'&codeGarantie='+codeGarantie;
+
+ //alert(donnees);
+ //return;
+
+ $("#div_liste_tm").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtmadherentacte/inserer/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ affichertmadherentacte();
+
+ $("#idAssure").val('');
+ $("#searchInput").val('');
+ $("#nomAssure").val('');
+ $("#dateEffet").val('');
+ $("#tm").val('');
+ $("#codeLienParente").val('');
+ $("#nomPolice").val('');
+ $("#nomCollege").val('');
+ $("#searchInputActe").val('');
+ $("#codeActe").val('');
+
+ $("#codeGarantie").val('');
+ $('.selectpicker').selectpicker('refresh');
+
+ }
+ });
+}
+
+function affichertmadherentacte()
+{
+ donnees = '';
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtmadherentacte/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $('#div_liste_tm').html(data);
+
+ },
+ error: function(data) {
+ },
+ complete: function() {
+
+ }
+ });
+
+}
+
+//21-06-2023
+function supprimer_tmadherentacte(idTm, adminSin)
+{
+ if (adminSin != "1"){
+ v_msg="Vous n'\u00eates pas autoris\u00e9!";
+ v_msgEng="You are not authorized!";
+
+ alert_ebene(v_msg, v_msgEng);
+
+ return;
+ }
+
+ v_msg="Confirmez-vous cette suppression?";
+ v_msgEng="Do you confirm this deletion?";
+
+
+ confirm_ebene(v_msg, v_msgEng)
+ .then((isConfirmed) => {
+ if (isConfirmed) {
+ // L'utilisateur a confirmé
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtmadherentacte/supprimer/",
+ type : 'post',
+ data: "idTm="+idTm,
+ error: function(errorData) {
+ },
+ success: function(data) {
+ },
+ complete: function() {
+ affichertmadherentacte();
+ }
+ });
+ } else {
+ // L'utilisateur a annulé
+ console.log("Confirmation refusée");
+ }
+ });
+
+}
+
+function afficheMaxdateEffetAdherentacte()
+{
+ idAdherent = $("#idAssure").val();
+ codeActe = $("#codeActe").val();
+ codeGarantie= $("#codeGarantie").val();
+
+ if((idAdherent < " ") || (idAdherent == "0"))
+ {
+ v_msg="Veuillez sélectionner un adhérent!";
+ v_msgEng="Please select a member!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").focus();
+ $("#searchInputActe").val('');
+
+ return;
+
+ }
+
+ if(codeActe < " ")
+ {
+ v_msg="Veuillez sélectionner un acte!";
+ v_msgEng="Please select an act!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInputActe").focus();
+
+ return;
+
+ }
+
+ donnees = "idAdherent="+idAdherent+"&codeActe="+codeActe+'&codeGarantie='+codeGarantie;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtmadherentacte/controle/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $('#div_effet_max').html(data);
+
+ },
+ error: function(data) {
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+function affichelisteprestataires(libelle)
+{
+ if(libelle!='' && libelle.length >="3")
+ {
+ var donnees = 'libelle='+ libelle;
+
+ vLink = "Ajaxchargerlisteprestataires/";
+ $.ajax({
+ type: "POST",
+ url: $("#racineWeb").val()+vLink,
+ data:donnees,
+ beforeSend: function(){
+ $("#searchInputPrestataire").css("background","#FFF url(Bootstrap/images/LoaderIcon.gif) no-repeat 165px");
+ },
+ success: function(data){
+ $("#div_selection_prestataire").show();
+ $("#div_selection_prestataire").html(data);
+ $("#searchInputPrestataire").css("background","#FFF");
+ }
+ });
+ }else{
+ $("#div_selection_prestataire").hide();
+ return false;
+ }
+}
+
+function selectPrestataire(code, libelle){
+ nomForm = $("#nomForm").val();
+
+ $("#searchInputPrestataire").val(libelle);
+ $("#div_selection_prestataire").hide();
+ $("#codePrestataire").val(code);
+
+ //console.log($("#codePrestataire").val());
+
+ if(nomForm=="tMadherentacteprestataire"){
+ afficheMaxdateEffetAdherentacteprestataire();
+ }else if(nomForm=="tMadherentgarantieprestataire")
+ {
+ afficheMaxdateEffetAdherentgarantieprestataire();
+ }else if(nomForm=="tMadherentprestataire")
+ {
+ afficheMaxdateEffetAdherentprestataire();
+ }else if(nomForm=="tMbeneficiaireActePrestataire")
+ {
+ afficheMaxdateEffetBeneficiaireacteprestataire();
+ }else if(nomForm=="tMbeneficiaireGarantiePrestataire")
+ {
+ afficheMaxdateEffetBeneficiairegarantieprestataire();
+ }else if(nomForm=="tMbeneficiairePrestataire")
+ {
+ afficheMaxdateEffetBeneficiairePrestataire();
+ }else if(nomForm=="tMcollegeacteprestataire")
+ {
+ afficheMaxdateEffetCollegeacteprestataire();
+ }else if(nomForm=="tMcollegegarantieprestataire")
+ {
+ afficheMaxdateEffetCollegegarantieprestataire();
+ }else if(nomForm=="tMcollegeprestataire")
+ {
+ afficheMaxdateEffetCollegeprestataire();
+ }else if(nomForm=="tMpoliceacteprestataire")
+ {
+ afficheMaxdateEffetPoliceacteprestataire();
+ }else if(nomForm=="tMpolicegarantieprestataire")
+ {
+ afficheMaxdateEffetPolicegarantieprestataire();
+ }else if(nomForm=="tMpoliceprestataire")
+ {
+ afficheMaxdateEffetPoliceprestataire();
+ }else if(nomForm=="tMclientacteprestataire")
+ {
+ afficheMaxdateEffetClientacteprestataire();
+ }else if(nomForm=="tMclientgarantieprestataire")
+ {
+ afficheMaxdateEffetClientgarantieprestataire();
+ }else if(nomForm=="tMclientprestataire")
+ {
+ afficheMaxdateEffetClientprestataire();
+ }else if(nomForm=="modifierRembClassique")
+ {
+ $("#prestataireConsultation").val(libelle);
+ }
+
+
+
+
+}
+
+function afficheMaxdateEffetAdherentacteprestataire()
+{
+ idAdherent = $("#idAssure").val();
+ codeActe = $("#codeActe").val();
+ codePrestataire = $("#codePrestataire").val();
+ codeGarantie = $("#codeGarantie").val();
+
+ if((idAdherent < " ") || (idAdherent == "0"))
+ {
+ v_msg="Veuillez sélectionner un adhérent!";
+ v_msgEng="Please select a member!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").focus();
+ $("#searchInputActe").val('');
+ $("#searchInputPrestataire").val('');
+
+ return;
+
+ }
+
+ if(codeActe < " ")
+ {
+ v_msg="Veuillez sélectionner un acte!";
+ v_msgEng="Please select an act!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInputActe").focus();
+ $("#searchInputPrestataire").val('');
+
+ return;
+
+ }
+
+ if(codePrestataire < " ")
+ {
+ v_msg="Veuillez sélectionner un prestataire!";
+ v_msgEng="Please select an provider!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInputPrestataire").focus();
+
+ return;
+
+ }
+
+
+ donnees = "idAdherent="+idAdherent+"&codeActe="+codeActe+"&codePrestataire="+codePrestataire+'&codeGarantie='+codeGarantie;
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtmadherentacteprestataire/controle/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+ $('#div_effet_max').html(data);
+
+ },
+ error: function(data) {
+ },
+ complete: function() {
+
+ }
+ });
+}
+
+function inserer_tmadherentacteprestataire()
+{
+ idAdherent = $("#idAssure").val();
+ dateEffet = $("#dateEffet").val();
+ tm = $("#tm").val();
+ codeActe = $("#codeActe").val();
+ codePrestataire = $("#codePrestataire").val();
+
+ codeGarantie = $("#codeGarantie").val();
+
+ if((idAdherent < " ") || (idAdherent == "0"))
+ {
+ v_msg="Veuillez sélectionner un adhérent!";
+ v_msgEng="Please select a member!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInput").focus();
+
+ return;
+
+ }
+
+ if((dateEffet < " "))
+ {
+ v_msg="Veuillez une date d'effet!";
+ v_msgEng="Please an effective date!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#dateEffet").focus();
+
+ return;
+
+ }
+
+ if(tm < " ")
+ {
+ v_msg="Veuillez entrer la valeur du ticket Modérateur!";
+ v_msgEng="Please enter the Moderator ticket value!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#tm").focus();
+
+ return;
+
+ }
+
+ if(codeActe < " ")
+ {
+ v_msg="Veuillez sélectionner un acte!";
+ v_msgEng="Please select an act!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInputActe").focus();
+
+ return;
+
+ }
+
+ if(codePrestataire < " ")
+ {
+ v_msg="Veuillez sélectionner un prestataire!";
+ v_msgEng="Please select an provider!";
+ alert_ebene(v_msg, v_msgEng);
+
+ $("#searchInputPrestataire").focus();
+
+ return;
+
+ }
+
+ donnees = 'idAdherent='+idAdherent+'&dateEffet='+dateEffet;
+ donnees += '&tm='+tm+'&codeActe='+codeActe+"&codePrestataire="+codePrestataire;
+ donnees += "&codeGarantie="+codeGarantie;
+
+ //alert(donnees);
+ //return;
+
+ $("#div_liste_tm").html('' + '
');
+
+ $.ajax({
+ url: $("#racineWeb").val()+"Ajaxtmadherentacteprestataire/inserer/",
+ type: 'POST',
+ data: donnees,
+ success: function(data)
+ {
+
+ },
+ error: function(data) {
+ },
+ complete: function() {
+ affichertmadherentacteprestataire();
+
+ $("#idAssure").val('');
+ $("#searchInput").val('');
+ $("#nomAssure").val('');
+ $("#dateEffet").val('');
+ $("#tm").val('');
+ $("#codeLienParente").val('');
+ $("#nomPolice").val('');
+ $("#nomCollege").val('');
+ $("#searchInputActe").val('');
+ $("#codeActe").val('');
+ $("#searchInputPrestataire").val('');
+ $("#codePrestataire")
\ No newline at end of file