radiantproduction/Js/fonctions.js
2026-03-08 18:27:09 +00:00

22014 lines
512 KiB
JavaScript
Executable File

function alert_ebene(p_msg, p_msg_eng)
{
codeLangue = $("#codeLangue").val();
if(codeLangue=="en_US")
{
alert(p_msg_eng);
}
else
{
alert(p_msg);
}
}
function alert_ebene_ajax(p_msg, p_msg_eng)
{
codeLangue = $("#codeLangue").val();
if(codeLangue=="en_US")
{
alert(p_msg_eng);
}
else
{
alert(p_msg);
}
}
function confirm_ebene(p_msg, p_msg_eng)
{
codeLangue = $("#codeLangue").val();
if(codeLangue=="en_US")
{
return confirm(p_msg_eng);
}
else
{
return confirm(p_msg);
}
}
function prompt_ebene(p_msg, p_msg_eng, p_retour)
{
codeLangue = $("#codeLangue").val();
if(codeLangue=="en_US")
{
return prompt(p_msg_eng, p_retour);
}
else
{
return prompt(p_msg, p_retour);
}
}
function addslashes(ch)
{
ch = ch.replace(/\\/g,"\\\\");
ch = ch.replace(/\'/g,"\\'");
ch = ch.replace(/\"/g,"\\\"");
return ch;
}
function adherents_police()
{
if ($("#idPolice_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"Listeadherent/");
}
}
function college_police()
{
if ($("#idPolice_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"Collegepolice/");
}
}
function facturer_police()
{
/*
// 06/11/2020
if(est_ce_police_famille())
{
facturer_police_familiale();
return;
}
*/
// 08/12/2020
if(est_ce_police_famille())
{
v_msg="Oprétaion non autorisée!";
v_msgEng="Unauthorized operation!";
alert_ebene(v_msg, v_msgEng);
// afficher_police_id();
return;
}
etat=$("#codeEtatPolice_C").val();
if (etat=="RE")
{
v_msg="Attention! Police résiliée!";
v_msgEng="Warning! Terminated policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="AN")
{
v_msg="Attention! Police annulée!";
v_msgEng="Warning! Canceled policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if ($("#idPolice_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"Facturerpolice/");
}
}
$.prototype.enable = function () {
$.each(this, function (index, el) {
$(el).removeAttr('disabled');
});
}
$.prototype.disable = function () {
$.each(this, function (index, el) {
$(el).attr('disabled', 'disabled');
});
}
$.prototype.unreadable = function () {
$.each(this, function (index, el) {
$(el).attr('READONLY', 'READONLY');
});
}
$.prototype.readable = function () {
$.each(this, function (index, el) {
$(el).removeAttr('READONLY');
});
}
Date.estAnneeBissextile = function (annee) {
return (((annee % 4 === 0) && (annee % 100 !== 0)) || (annee % 400 === 0));
};
Date.getDaysInMonth = function (annee, month) {
return [31, (Date.estAnneeBissextile(annee) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
};
Date.prototype.estAnneeBissextile = function () {
return Date.estAnneeBissextile(this.getFullYear());
};
Date.prototype.getDaysInMonth = function () {
return Date.getDaysInMonth(this.getFullYear(), this.getMonth());
};
Date.prototype.addMonths = function (value) {
var n = this.getDate();
this.setDate(1);
this.setMonth(this.getMonth() + value);
this.setDate(Math.min(n, this.getDaysInMonth()));
this.setDate(this.getDate()-1);
return this;
};
$( ".datepicker" ).datepicker({
inline: true,
changeMonth: true,
changeYear: true,
yearRange: "c-60:c+20"
});
/*les fonctions courantes et globales */
function get_age(dater)
{
var td2 = $("#datejourfr_C").datepicker("getDate");
return age = td2.getFullYear()-dater.getFullYear();
}
function controle_age(dater, codeLienParente)
{
age = get_age(dater);
$("#agepersonne").val("Âge : "+age);
if (age>65)
{
v_msg="Âge "+age+" supérieur à 65 ans!";
v_msgEng="Age "+age+" over 65!";
alert_ebene(v_msg, v_msgEng);
return false;
}
if ( (codeLienParente=="E")&& (age>21) )
{
v_msg="Âge "+age+" => Enfant âgé de plus de 21 ans!";
v_msgEng="Âge "+age+" => Child over 21 years old!";
alert_ebene(v_msg, v_msgEng);
return false;
}
if ( (codeLienParente=="O")&& (age>21) )
{
v_msg="Âge "+age+" => Enfant âgé de plus de 21 ans!";
v_msgEng="Âge "+age+" => Child over 21 years old!";
alert_ebene(v_msg, v_msgEng);
return false;
}
return true;
}
/* Début JS client */
function selectionner_client(id,no)
{
$("#idClient_C").val(id);
$("#numeroClient_C").val(no);
$("#nomClient_C").val("");
}
function selectionner_client_d(id,no)
{
$("#idClient_d_C").val(id);
$("#numeroClient_d_C").val(no);
$("#nomClient_d_C").val("");
}
function afficher_client_id()
{
idClient=$("#idClient_C" ).val();
if (idClient>"")
{
ajax_context_client_afficher(idClient);
}
}
function afficher_client_d_id()
{
idClient=$("#idClient_d_C" ).val();
if (idClient>"")
{
ajax_context_client_d_afficher(idClient);
}
}
/* Fin JS client */
/* Début JS police */
function selectionner_police(id,no)
{
$("#idPolice_C" ).val(id);
$("#numeroPolice_C" ).val(no);
}
function selectionner_police_d(id,no)
{
$("#idPolice_d_C" ).val(id);
$("#numeroPolice_d_C" ).val(no);
}
function afficher_police_id()
{
idPolice=$("#idPolice_C" ).val();
if (idPolice>"")
{
ajax_context_police_afficher(idPolice);
}
}
function afficher_police_d_id()
{
idPolice=$("#idPolice_d_C" ).val();
if (idPolice>"")
{
window.location.assign($("#racineWeb" ).val()+"Fichedevis/");
}
}
function afficher_police_d_id_init()
{
idPolice=$("#idPolice_d_C" ).val();
if (idPolice>"")
{
ajax_context_police_d_afficher(idPolice);
}
}
function detail_quittance(idQuittance)
{
if (idQuittance>"0")
{
window.location.assign($("#racineWeb" ).val()+"Beneficiairequittance/"+idQuittance+"/");
}
}
/* Fin JS client */
/* Début JS adherent */
function selectionner_adherent(id,no)
{
$("#idAdherent_C" ).val(id);
$("#numeroAdherent_C" ).val(no);
}
function afficher_adherent()
{
if ($("#numeroAdherent_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#numeroAdherent_C" ).val()+"/");
}
}
function afficher_adherent_id()
{
codeTypeContrat = $("#codeTypeContrat_C").val();
if (codeTypeContrat=="F")
{
afficher_adherent_familiale_id();
return;
}
idAdherent = $("#idAdherent_C" ).val();
if (idAdherent>"0")
{
window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#idAdherent_C" ).val()+"/");
}
}
/* Fin JS adherent */
/* Début JS bénéficiare */
function selectionner_beneficiaire(id,no)
{
$("#idBeneficiaire_C" ).val(id);
$("#numeroBeneficiaire_C" ).val(no);
}
function afficher_beneficiaire()
{
if ($("#numeroBeneficiaire_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"+$("#numeroBeneficiaire_C" ).val()+"/");
}
}
function afficher_beneficiaire_id()
{
codeTypeContrat = $("#codeTypeContrat_C").val();
if (codeTypeContrat=="F")
{
afficher_beneficiaire_familiale_();
return;
}
idBeneficiaire = $("#idBeneficiaire_C" ).val();
if ($("#idBeneficiaire_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"Fichebeneficiaire/"+idBeneficiaire+"/");
}
}
function modifier_prime_beneficiaire(idBeneficiaire)
{
// alert("Attention!");
// return;
if (idBeneficiaire>"0")
{
window.location.assign($("#racineWeb" ).val()+"Modifierprimebeneficiaire/"+$("#idBeneficiaire_C" ).val()+"/");
}
}
function afficher_adherent_assure()
{
if ($("#idAdherent_C" ).val()<=" ")
{
return;
}
window.location.assign($("#racineWeb" ).val()+"ficheadherentassure/");
}
function afficher_echeance_assure()
{
if ($("#idAdherent_C" ).val()<=" ")
{
return;
}
window.location.assign($("#racineWeb" ).val()+"Echeanceassure/");
}
function afficher_echeance_adherent()
{
if ($("#idAdherent_C" ).val()<=" ")
{
return;
}
window.location.assign($("#racineWeb" ).val()+"Echeanceadherent/");
}
function afficher_assure()
{
if ($("#idAdherent_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"ficheadherentassure/"+$("#idAdherent_C" ).val()+"/");
}
}
function afficher_beneficiaire_assure()
{
if ($("#idBeneficiaire_C" ).val()<=" ")
{
return;
}
window.location.assign($("#racineWeb" ).val()+"fichebeneficiaireassure/"+$("#idBeneficiaire_C" ).val()+"/");
}
function changer_photo_beneficiaire_id()
{
}
function fermerFenetre()
{
v_msg="Etes-vous sur de vouloir quitter?";
v_msgEng="Are you sure you want to exit?";
if(confirm_ebene(v_msg, v_msgEng))
{
ajax_deconnexion();
}
}
function supprimer_ligne_Tb(id,libelle)
{
v_msg="Confirmez-vous la suppression de la ligne : "+libelle+"?";
v_msgEng="Do you confirm the deletion of the line : "+libelle+"?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Tbliste"+$("#nomtable").val()+"/supprimer/"+id+"/");
}
}
function modifier_ligne_Tb()
{
if ($("#idLigne" ).val()<="")
{
v_msg="Veuillez sélectionner une ligne!";
v_msgEng="Please select a line!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb").val()+"Tbmodifier"+$("#nomtable").val()+"/"+$("#idLigne" ).val()+"/");
}
function selectionner_ligne_Tb(id)
{
$("#idLigne" ).val(id);
}
/* */
function selectionner_Tb(lientable)
{
$("#lientable" ).val(lientable);
}
function modifier_Tb()
{
if ($("#lientable" ).val()<="")
{
v_msg="Veuillez sélectionner une table!";
v_msgEng="Please select a table!";
alert_ebene(v_msg, v_msgEng);
return;
} else
window.location.assign($("#racineWeb" ).val()+$("#lientable" ).val());
}
function afficher_Tb()
{
if ($("#lientable" ).val()<="")
{
v_msg="Veuillez sélectionner une table!";
v_msgEng="Please select a table!";
alert_ebene(v_msg, v_msgEng);
return;
} else
window.location.assign($("#racineWeb" ).val()+$("#lientable" ).val());
}
function ajaxListerVille()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxville/",
type : 'post',
data: "codePays="+$("#codePays").val(),
success: function(data) {
$("#listeville").html(data);
},
complete: function() {
}
});
}
function ajaxListerLocalite()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxlocalite/",
type : 'post',
data: "codePays="+$("#codePays").val()+"&codeVille="+$("#codeVille").val(),
success: function(data) {
$("#listelocalite").html(data);
}
});
}
function controletytpeclient()
{
if ($("#typeClient").val()=="E")
{
$("#zonemandat").show();
$("#zoneparticulier").hide();
} else
{
$("#zoneparticulier").show();
$("#zonemandat").hide();
}
}
function enregistrer_client()
{
$("#formficheclient").submit();
}
function modifier_client()
{
if ($("#idClient_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"Modifierclient/");
}
}
function modifier_client_d()
{
if ($("#idClient_d_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"Modifierprospect/");
}
}
function modifier_police()
{
idPolice = $("#idPolice_C").val();
if (idPolice>"0")
{
window.location.assign($("#racineWeb" ).val()+"Modifierpolice/");
}
}
function modifier_devis()
{
idPolice = $("#idPolice_d_C").val();
transforme = $("#transforme").val();
if (transforme=="1")
{
v_msg="Devis déjà transformé!";
v_msgEng="Quote already transformed!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (idPolice>"0")
{
window.location.assign($("#racineWeb" ).val()+"Modifierdevis/");
}
}
function transformer_devis()
{
idDevis = $("#idPolice_d_C").val();
transforme = $("#transforme").val();
if (transforme=="1")
{
v_msg="Devis déjà transformé!";
v_msgEng="Quote already transformed!";
alert_ebene(v_msg, v_msgEng);
return;
}
primeTtc_total = $("#primeTtc_total").val();
if (primeTtc_total=="0")
{
v_msg="Rien à transformer!";
v_msgEng="Nothing to transform!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous la transformation en contrat?";
v_msgEng="Do you confirm the transformation into a contract?";
if(confirm_ebene(v_msg, v_msgEng))
{
numeroOptionTarif = $("#numeroOptionTarif").val();
donnees = 'idDevis='+idDevis+"&numeroOptionTarif="+numeroOptionTarif;
$.ajax({
url: $("#racineWeb").val()+"Ajaxtransformerdevis/",
type: 'POST',
data: donnees,
success: function() {
},
error: function(data) {
},
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Fichepolice/");
}
});
}
}
function supprimer_client()
{
v_msg="Confirmez-vous la suppression de ce client?";
v_msgEng="Do you confirm the deletion of this customer?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Ficheclient/supprimer/"+$("#idClient_C").val()+"/");
}
}
function supprimer_prospect()
{
v_msg="Confirmez-vous la suppression de ce prospect?";
v_msgEng="Do you confirm the deletion of this prospect?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Ficheprospect/supprimer/"+$("#idClient_d_C").val()+"/");
}
}
/* avant 02/01/2020
function CalculerEcheance()
{
$("#dateEcheance").disable();
codePeriodicite=$("#codePeriodicite").val();
var typdate = $("#dateEffet").datepicker("getDate");
switch (codePeriodicite) {
case "A":
typdate.addMonths(12);
break;
case "L":
$("#dateEcheance").enable();
typdate = $("#dateEcheance").datepicker("getDate");
break;
default:
typdate.addMonths(12);
}
$( "#dateEcheance" ).datepicker( "setDate", typdate );
}
*/
function CalculerEcheance()
{
$("#dateEcheance").disable();
codePeriodicite=$("#codePeriodicite").val();
var typdate = $("#dateEffet").datepicker("getDate");
switch (codePeriodicite) {
case "A":
typdate.addMonths(12);
break;
case "S":
typdate.addMonths(6);
break;
case "T":
typdate.addMonths(3);
break;
case "M":
typdate.addMonths(1);
break;
case "L":
$("#dateEcheance").enable();
typdate = $("#dateEcheance").datepicker("getDate");
break;
default:
typdate.addMonths(12);
}
$( "#dateEcheance" ).datepicker( "setDate", typdate );
}
function CalculerFin()
{
$("#dateFin").disable();
codeFractionnement=$("#codeFractionnement").val();
var typdate = $("#dateEffet").datepicker("getDate");
var dtech = $("#dateEcheance").datepicker("getDate");
switch (codeFractionnement) {
case "A":
typdate.addMonths(12);
break;
case "S":
typdate.addMonths(6);
break;
case "T":
typdate.addMonths(3);
break;
case "M":
typdate.addMonths(1);
break;
default:
typdate.addMonths(12);
}
if (typdate>dtech)
{
typdate=dtech;
}
$( "#dateFin" ).datepicker( "setDate", typdate );
}
function ControlerEcheance()
{
codePeriodicite=$("#codePeriodicite").val();
if (codePeriodicite!="L") return true;
else {
var eff = $("#dateEffet").datepicker("getDate");
var ech = $("#dateEcheance").datepicker("getDate");
if (ech<eff) {
$("#dateEcheance").focus();
return false;
}
if (ech>eff.addMonths(12)) {
v_msg="Période supérieur à un an!";
v_msgEng="Period greater than one year!";
alert_ebene(v_msg, v_msgEng);
}
}
}
function ChangerPass()
{
if ($("#ancmdp" ).val()<=' ')
{
alert_ebene("Veuillez saisir l\'ancien mot de passe!", "Please enter the old password!");
$("#ancmdp").focus();
return false;
}
if ($("#nvmdp" ).val()<=' ')
{
v_msg="Veuillez saisir un mot de passe!";
v_msgEng="Please enter a password!";
alert_ebene(v_msg, v_msgEng);
$("#nvmdp").focus();
return false;
}
if ($("#nvmdp").val()=='0000' || $("#nvmdp").val()=='radiant')
{
alert_ebene("Veuillez changer de mot de passe!", "Please change password!");
$("#nvmdp").focus();
return false;
}
longueur = $("#nvmdp").val().length;
if(longueur>0 && longueur<6)
{
v_msg="6 caractères minimum exigé!";
v_msgEng="6 characters minmum required!";
alert_ebene(v_msg, v_msgEng);
$("#nvmdp").focus();
return false;
}
if ($("#cfnvmdp" ).val()!=$("#nvmdp" ).val())
{
v_msg="Veuillez confirmer votre mot de passe!";
v_msgEng="Please confirm your password!";
alert_ebene(v_msg, v_msgEng);
$("#nvmdp").focus();
return false;
}
}
function modifier_profil()
{
if ($("#idLigne" ).val()<="")
{
v_msg="Veuillez sélectionner une ligne!";
v_msgEng="Please select a line!";
alert_ebene(v_msg, v_msgEng);
return;
} else
window.location.assign($("#racineWeb").val()+"Modifierprofil/"+$("#idLigne" ).val()+"/");
}
function parametrer_profil()
{
if ($("#idLigne" ).val()<="")
{
v_msg="Veuillez sélectionner une ligne!";
v_msgEng="Please select a line!";
alert_ebene(v_msg, v_msgEng);
return;
} else
window.location.assign($("#racineWeb").val()+"Parametrerprofil/"+$("#idLigne" ).val()+"/");
}
function supprimer_profil(id, libelle)
{
v_msg="Confirmez-vous la suppression de la ligne : "+libelle+"?";
v_msgEng="Do you confirm the deletion of the line : "+libelle+"?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Listeprofil/supprimer/"+id+"/");
}
}
function modifier_utilisateur()
{
if ($("#idLigne" ).val()<="")
{
v_msg="Veuillez sélectionner une ligne!";
v_msgEng="Please select a line!";
alert_ebene(v_msg, v_msgEng);
return;
} else
window.location.assign($("#racineWeb").val()+"Modifierutilisateur/"+$("#idLigne" ).val()+"/");
}
function supprimer_utilisateur(id,libelle)
{
v_msg="Confirmez-vous la suppression de la ligne : "+libelle+"?";
v_msgEng="Do you confirm the deletion of the line : "+libelle+"?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Listeutilisateur/supprimer/"+id+"/");
}
}
function supprimer_police()
{
etat=$("#codeEtatPolice_C").val();
if (etat=="RE")
{
v_msg="Attention! Police résiliée!";
v_msgEng="Warning! Terminated policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="AN")
{
v_msg="Attention! Police annulée!";
v_msgEng="Warning! Canceled policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous la suppression de cette police?";
v_msgEng="Do you confirm the deletion of this policy?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Fichepolice/supprimer/"+$("#idPolice_C").val()+"/");
}
}
function supprimer_devis()
{
transforme = $("#transforme").val();
if (transforme=="1")
{
v_msg="Devis déjà transformé!";
v_msgEng="Quote already transformed!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous la suppression de ce devis?";
v_msgEng="Do you confirm the deletion of this quote?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Fichedevis/supprimer/"+$("#idPolice_d_C").val()+"/");
}
}
function archiver_garantie_police()
{
v_msg="Confirmez-vous l\'archivage des garanties de cette police?";
v_msgEng="Do you confirm the archiving of the guarantees of this policy?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Fichepolice/archivergarantie/"+$("#idPolice_C").val()+"/");
}
}
function archiver_colleege_police()
{
}
function ajaxListerUtilisateursProfil()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxutilisateursprofil/",
type : 'post',
data: "codeProfil="+$("#codeProfil").val(),
success: function(data) {
$("#listeutilisateur").html(data);
}
});
}
function ajaxListerUtilisateursPrestataire()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxutilisateursprestataire/",
type : 'post',
data: "codePrestataire="+$("#codePrestataire").val(),
success: function(data) {
$("#listeutilisateur").html(data);
}
});
}
function attribuer_profil_utilisateur(p_choix,p_id_utilisateur)
{
donnees = 'id_utilisateur='+p_id_utilisateur;
donnees += '&codeProfil='+$("#codeProfil").val();
donnees += '&choix='+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxutilisateursprofil/attribuerProfil/"+p_id_utilisateur+"/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
}
});
}
function attribuer_prestataire_utilisateur(p_choix,p_id_utilisateur)
{
donnees = 'id_utilisateur='+p_id_utilisateur;
donnees += '&codePrestataire='+$("#codePrestataire").val();
donnees += '&choix='+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxutilisateursprestataire/attribuerPrestataire/"+p_id_utilisateur+"/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
}
});
}
function beneficiaire_a_facturer(p_choix,p_id_beneficiaire)
{
donnees = 'idBeneficiairePrime='+p_id_beneficiaire;
donnees += '&choix='+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxbeneficiaireafacturer/selectionner/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
$("#actualsiser" ).val("0");
}
});
}
function ajaxListerMenusProfil()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxmenusprofil/",
type : 'post',
data: "codeProfil="+$("#codeProfil").val(),
success: function(data) {
$("#listemenu").html(data);
}
});
}
function ajouter_menu_profil(p_choix,p_code_menu,p_id_menuprofil)
{
donnees = 'id_menuprofil='+p_id_menuprofil;
donnees += '&codeMenu='+p_code_menu;
donnees += '&codeProfil='+$("#codeProfil").val();
donnees += '&choix='+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmenusprofil/ajouterMenu/"+p_id_menuprofil+"/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
}
});
}
function ajaxListerVuesProfil()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxvuesprofil/",
type : 'post',
data: "codeProfil="+$("#codeProfil").val()+"&vue="+$("#vue").val(),
success: function(data) {
$("#listemenu").html(data);
}
});
}
function ajouter_vue_profil(p_choix,p_code_menu,p_id_menuvueprofil)
{
donnees = 'id_menuvueprofil='+p_id_menuvueprofil;
donnees += '&codeMenu='+p_code_menu;
donnees += '&codeProfil='+$("#codeProfil").val();
donnees += '&vue='+$("#vue").val();
donnees += '&choix='+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxvuesprofil/ajouterMenu/"+p_id_menuvueprofil+"/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
}
});
}
function lancer_facturation()
{
if ($("#actualsiser").val()=="0" && $("#primeTtc").val()>"0")
{
v_msg="Veuillez réactualiser!";
v_msgEng="Please refresh!";
alert_ebene(v_msg, v_msgEng);
return;
}
if ($("#primeTtc").val()<="0")
{
v_msg="Rien à facturer!";
v_msgEng="Nothing to charge!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Lancer la facturation?";
v_msgEng="Start billing?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Facturerpolice/facturer/");
}
}
function afficher_image(fichier)
{
window.open(fichier);
}
function modifier_adherent()
{
if ($("#idAdherent_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"Modifieradherent/"+$("#idAdherent_C").val()+"/");
}
}
function modifier_beneficiaire()
{
if ($("#idBeneficiaire_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"Modifierbeneficiaire/"+$("#idBeneficiaire_C").val()+"/");
}
}
function supprimer_bon()
{
if ($("#codePrestataire").val()<" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
return;
}
if ($("#noDepart").val()<="0")
{
v_msg="Veuillez revoir vos bornes!";
v_msgEng="Please check your limits!";
alert_ebene(v_msg, v_msgEng);
return;
}
if ($("#noFin").val()<$("#noDepart").val())
{
v_msg="Veuillez revoir vos bornes!";
v_msgEng="Please check your limits!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous la suppression de la plage de "+$("#noDepart").val()+" à "+$("#noFin").val()+" pour "+$("#codePrestataire").val()+"?";
v_msgEng="Do you confirm the deletion of the range from "+$("#noDepart").val()+" to "+$("#noFin").val()+" for "+$("#codePrestataire").val()+"?";
if(confirm_ebene(v_msg, v_msgEng))
{
$('#frmsupprimerbons').submit();
}
}
function selectionner_bon(id,no, codeEtatBon, motifAnnulation)
{
$("#idBon_C").val(id);
$("#numeroBon_C").val(no);
$("#motifAnnulation_C").val(motifAnnulation);
$("#codeEtatBon_C").val(codeEtatBon);
}
function annuler_bon()
{
var codeEtatBon = $("#codeEtatBon_C").val();
var motifAnnulation = $("#motifAnnulation_C").val();
var numeroBon = $("#numeroBon_C").val();
var idBon = $("#idBon_C").val();
if (numeroBon<=" ")
{
v_msg="Veuillez sélectionner une ligne!";
v_msgEng="Please select a line!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (codeEtatBon=="3")
{
v_msg="Anullé pour motif : "+motifAnnulation;
v_msgEng="Canceled for reason : "+motifAnnulation;
alert_ebene(v_msg, v_msgEng);
return;
}
if (codeEtatBon=="4")
{
v_msg="Remplacé pour motif : "+motifAnnulation;
v_msgEng="Replaced for reason : "+motifAnnulation;
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous l\'annulation du bon No "+numeroBon+"?";
v_msgEng="Do you confirm the cancellation of the form No "+numeroBon+"?";
if(confirm_ebene(v_msg, v_msgEng))
{
v_msg="Raison de l\'annulation?";
v_msgEng="Reason for cancellation?";
motifAnnulation = prompt_ebene(v_msg, v_msgEng, motifAnnulation);
if (motifAnnulation<=" ")
{
v_msg="Vous devez saisir un motif!";
v_msgEng="You have to enter a reason!";
alert_ebene(v_msg, v_msgEng);
return;
}
$("#motifAnnulation_C").val(motifAnnulation);
donnees = 'idBon='+idBon+'&motifAnnulation='+motifAnnulation;
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherbons/annulerBon/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
afficherbon();
}
});
}
}
function ajaxbondisponible()
{
if ($("#codeActe").val()<=" ")
{
v_msg="Veuillez sélectionner un acte!";
v_msgEng="Please select an act!";
alert_ebene(v_msg, v_msgEng);
$("#codeActe").focus();
return;
}
if ($("#codeMedecin").val()<=" ")
{
v_msg="Veuillez sélectionner un prescripteur!";
v_msgEng="Please select a prescriber!";
alert_ebene(v_msg, v_msgEng);
$("#codeMedecin").focus();
return;
}
if ($("#numeroBon").val()<=" ")
{
v_msg="Veuillez saisir un No de bon!";
v_msgEng="Please enter a prescription number!";
alert_ebene(v_msg, v_msgEng);
$("#numeroBon").focus();
return;
}
$.ajax({
url: $("#racineWeb").val()+"Ajaxbondisponible/",
type : 'post',
data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(),
success: function(data) {
$("#msgErreur").html(data);
},
complete: function() {
imprimerbon();
}
});
}
function imprimerbon()
{
if ($("#codeActe").val()<=" ")
{
v_msg="Veuillez sélectionner un acte!";
v_msgEng="Please select an act!";
alert_ebene(v_msg, v_msgEng);
$("#codeActe").focus();
return;
}
if ($("#numeroBon").val()<=" ")
{
v_msg="Veuillez saisir un No de bon!";
v_msgEng="Please enter a prescription number!";
alert_ebene(v_msg, v_msgEng);
return;
}
var codeEtatBon = $("input[name='codeEtatBon']").val();
if (codeEtatBon!="1")
{
return;
}
$("#frmconsultation").submit();
}
function imprimerbonVierge()
{
if ($("#codeActe").val()<=" ")
{
v_msg="Veuillez sélectionner un acte!";
v_msgEng="Please select an act!";
alert_ebene(v_msg, v_msgEng);
$("#codeActe").focus();
return;
}
$("#codeTypeBon").val('2');
$("#frmconsultation").submit();
$("#codeTypeBon").val('1');
}
function ajaxcommission()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxcommission/",
type : 'post',
data: "codeApporteur="+$("#codeApporteur").val()+"&codeEtape="+$("#codeEtape").val(),
success: function(data) {
$("#infocomm").html(data);
},
complete: function() {
$("#tauxCommission").val( $("#tauxCommission_info").val());
}
});
}
function ajaxinfosacte()
{
if ($("#codeActe").val()<=" ")
{
v_msg="Veuillez sélectionner un acte!";
v_msgEng="Please select an act!";
alert_ebene(v_msg, v_msgEng);
$("#codeActe").focus();
return;
}
$.ajax({
url: $("#racineWeb").val()+"Ajaxinfosacte/",
type : 'post',
data: "codePrestataire="+$("#codePrestataire").val()+"&codeActe="+$("#codeActe").val(),
success: function(data) {
$("#infosacte").html(data);
},
complete: function() {
$("#montantacte").val( $("#montantacte_info").val());
$("#tauxCouverture").val( $("#tauxCouverture_info").val());
calculer_Tm();
}
});
}
function recapitulerprimeimposee()
{
primeNette = $("#primeNette").val();
fraisCarte = $("#fraisCarte").val();
donnees = "primeNette="+primeNette+"&fraisCarte="+fraisCarte;
$.ajax({
url: $("#racineWeb").val()+"Ajaxrecapitulerprimeimposee/",
type : 'post',
data: donnees,
success: function(data) {
$("#primeimposee").html(data);
},
complete: function() {
$("#primeHt").val( $("#primeHt_info").val());
$("#accessoire").val( $("#accessoire_info").val());
$("#commission").val( $("#commission_info").val());
$("#commissionAutre").val( $("#commissionAutre_info").val());
$("#taxe").val( $("#taxe_info").val());
$("#primeTtc").val( $("#primeTtc_info").val());
$("#primeNetteStat").val( $("#primeNetteStat_info").val());
}
});
}
function imposerprime()
{
v_msg="Confirmez-vous cette nouvelle prime?";
v_msgEng="Do you confirm this new premium?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#frmModifierprimebeneficiaire").submit();
}
}
function calculer_Tm()
{
$("#montantTm").val( ($("#montantacte").val() * (100-$("#tauxCouverture").val() )) / 100 );
if ($("#codeMedecin").val()>" ")
$("#numeroBon").focus();
else
$("#codeMedecin").focus();
return true;
}
function controlefocusconsultationMd()
{
if ($("#codeActe").val()>" ")
$("#numeroBon").focus();
else
$("#codeActe").focus();
return true;
}
function ajaxinfosacteexamen()
{
if ($("#codeActe").val()<=" ")
{
v_msg="Veuillez sélectionner un acte!";
v_msgEng="Please select an act!";
alert_ebene(v_msg, v_msgEng);
$("#codeActe").focus();
return;
}
$.ajax({
url: $("#racineWeb").val()+"Ajaxinfosacte/",
type : 'post',
data: "codePrestataire="+$("#codePrestataire").val()+"&codeActe="+$("#codeActe").val(),
success: function(data) {
$("#infosacte").html(data);
},
complete: function() {
$("#tauxCouverture").val( $("#tauxCouverture_info").val());
}
});
}
function ajaxbonexamendisponible()
{
if ($("#codeActe").val()<=" ")
{
v_msg="Veuillez sélectionner un acte!";
v_msgEng="Please select an act!";
alert_ebene(v_msg, v_msgEng);
$("#codeActe").focus();
return;
}
if ($("#numeroBon").val()<=" ")
{
v_msg="Veuillez saisir un No de bon!";
v_msgEng="Please enter a prescription number!";
alert_ebene(v_msg, v_msgEng);
$("#numeroBon").focus();
return;
}
$("#codeTypeBon").val('1');
$.ajax({
url: $("#racineWeb").val()+"Ajaxbondisponible/",
type : 'post',
data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(),
success: function(data) {
$("#msgErreur").html(data);
},
complete: function() {
imprimerbon();
}
});
}
function ajaxbonhospitdisponible()
{
if ($("#codeActe").val()<=" ")
{
v_msg="Veuillez sélectionner un acte!";
v_msgEng="Please select an act!";
alert_ebene(v_msg, v_msgEng);
$("#codeActe").focus();
return;
}
if ($("#numeroBon").val()<=" ")
{
v_msg="Veuillez saisir un No de bon!";
v_msgEng="Please enter a prescription number!";
alert_ebene(v_msg, v_msgEng);
$("#numeroBon").focus();
return;
}
$.ajax({
url: $("#racineWeb").val()+"Ajaxbondisponible/",
type : 'post',
data: "codePrestataire="+$("#codePrestataire").val()+"&numeroBon="+$("#numeroBon").val(),
success: function(data) {
$("#msgErreur").html(data);
},
complete: function() {
imprimerbon();
}
});
}
function repondreDemandePec(numeroDemande, codeFamille)
{
if(codeFamille=="EE")
{
window.location.assign($("#racineWeb").val()+"Repondrepecexamen/"+numeroDemande+"/");
}
else
{
window.location.assign($("#racineWeb").val()+"Repondrepechospit/"+numeroDemande+"/");
}
}
function accueil()
{
if($("#codeProfil_C" ).val()=="MEC")
{
window.location.assign($("#racineWeb").val()+"Accueilmedecin/");
}
else
{
window.location.assign($("#racineWeb").val()+"Accueil/");
}
}
function tache()
{
if($("#codeProfil_C" ).val()=="ASS")
{
window.location.assign($("#racineWeb").val()+"Tacheassure/");
}
else
{
window.location.assign($("#racineWeb").val()+"Tache/");
}
}
function actualiserdemandeexam()
{
window.location.assign($("#racineWeb").val()+"Examenententeprealable/");
}
function actualiserdemandehospit()
{
window.location.assign($("#racineWeb").val()+"Avishospitalisation/");
}
function actualiserprolongationhospit()
{
window.location.assign($("#racineWeb").val()+"Prologerhospitalisation/");
}
function Imprimerbonpecexam(numeroDemande)
{
window.location.assign($("#racineWeb").val()+"Imprimerbonpecexam/"+ numeroDemande +"/");
}
function Imprimerbonpechosp(numeroDemande)
{
window.location.assign($("#racineWeb").val()+"Imprimerbonpechosp/"+ numeroDemande +"/");
}
function Imprimerprolongationhosp(numeroDemande)
{
window.location.assign($("#racineWeb").val()+"Imprimprolonghosp/"+ numeroDemande +"/");
}
function forceDownload(fileURL, fileName)
{
}
function ged()
{
if ($("#numeroBeneficiaire_C" ).val()<=" ")
{
v_msg="Veuillez sélectionner un assuré!";
v_msgEng="Please select an insured person!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb").val()+"Ged/");
}
function gedassure()
{
if ($("#numeroAdherent_C" ).val()<=" ")
{
v_msg="Veuillez sélectionner un assuré!";
v_msgEng="Please select an insured person!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb").val()+"Gedassure/");
}
function tachesadherent()
{
if ($("#numeroAdherent_C" ).val()<=" ")
{
v_msg="Veuillez sélectionner un assuré!";
v_msgEng="Please select an insured person!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb").val()+"Tacheadherent/");
}
function afficherged(cheminFichier)
{
if (cheminFichier<=" ")
{
v_msg="Veuillez sélectionner un fichier!";
v_msgEng="Please select a file";
alert_ebene(v_msg, v_msgEng);
return;
}
window.open(cheminFichier, '_blank');
}
function archiverged()
{
if ($("#nomFichier").val()<=" ")
{
v_msg="Veuillez sélectionner un document!";
v_msgEng="Please select a document";
alert_ebene(v_msg, v_msgEng);
return;
}
if( $("#accesAssure").val()=="0" && $("#accesPrestataire").val()=="0"
&& $("#accesMedecin").val()=="0" && $("#accesGestionnaire").val()=="0")
{
v_msg="Le document doit être visible par au moins un des acteurs!";
v_msgEng="The document must be seen by at least one of the persons in charge!";
alert_ebene(v_msg, v_msgEng);
return;
}
$("#frmarchiherged").submit();
}
function archiverfacture()
{
if ($("#nomFichier").val()<=" ")
{
v_msg="Veuillez sélectionner un fichier!";
v_msgEng="Please select a file";
alert_ebene(v_msg, v_msgEng);
return;
}
$("#frmarchiherged").submit();
}
function ajaxinfosdestinatairetache()
{
if ($("#codeDestinataire").val()<=" ")
{
v_msg="Veuillez sélectionner un destinataire!";
v_msgEng="Please select a recipient!";
alert_ebene(v_msg, v_msgEng);
$("#codeDestinataire").focus();
return;
}
$.ajax({
url: $("#racineWeb").val()+"Ajaxinfosdestinatairetache/",
type : 'post',
data: "codeDestinataire="+$("#codeDestinataire").val(),
success: function(data) {
$("#infosdestinatairetache").html(data);
},
complete: function() {
$("#emailtache").val( $("#emailActeurtache_info").val());
}
});
}
function afficherPrestataireAssure(id)
{
if (id <=" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb").val()+"Prestataireassure/"+id+"/");
}
function selectionner_Rq(lienrequete)
{
$("#lienrequete" ).val(lienrequete);
}
function parametre_Rq()
{
if ($("#lienrequete" ).val()<="")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query (request)!";
alert_ebene(v_msg, v_msgEng);
return;
}
{
window.location.assign($("#racineWeb" ).val()+$("#lienrequete" ).val());
}
}
function imprimer_pdf()
{
$("#sortie").val('1');
$("#frmrequete").submit();
}
function export_xls()
{
$("#sortie").val('2');
$("#frmrequete").submit();
$("#sortie").val('1');
}
function affichermanuel()
{
codeProfil = $("#codeProfil_C").val();
cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_CENTRES_DE_SOINS.pdf";
switch(codeProfil)
{
case "AAA":
cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_AGENT_AFRIK_ASSUR.pdf";
break;
case "ADM":
cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_ADMINISTRATEUR_SYSTEME.pdf";
break;
case "ASS":
cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_ASSURE.pdf";
break;
case "CSO":
cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_CENTRES_DE_SOINS.pdf";
break;
case "DIR":
cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_DIRECTION_AFRIK_ASSUR.pdf";
break;
case "LAB":
cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_LABORATOIRES.pdf";
break;
case "MEC":
cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_MEDECINS_CONSEIL.pdf";
break;
case "PHA":
cheminFichier="MANUEL_AFRIK_ASSUR_SANTE_PHARMACIES.pdf";
break;
}
window.open('Docs/'+cheminFichier, '_blank');
}
function ajaxListerequetesProfil()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxrequetesprofil/",
type : 'post',
data: "codeProfil="+$("#codeProfil").val(),
success: function(data) {
$("#listerequete").html(data);
}
});
}
function ajouter_requete_profil(p_choix,p_nomRequete,p_id_requeteprofil)
{
donnees = 'id_requeteprofil='+p_id_requeteprofil;
donnees += '&nomRequete='+p_nomRequete;
donnees += '&codeProfil='+$("#codeProfil").val();
donnees += '&choix='+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxrequetesprofil/ajouterRequete/"+p_id_requeteprofil+"/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
}
});
}
function supprimer_beneficiaire()
{
idBeneficiaire = $("#idBeneficiaire_C").val();
primeArchive=$("#primeArchive").val();
if (primeArchive=="1")
{
v_msg="Prime archivée!";
v_msgEng="Primium archived!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (primeArchive=="0")
{
supprimer_beneficiaire_id(idBeneficiaire);
return;
}
codeTypeAvenant=$("#codeTypeAvenant_C").val();
if (codeTypeAvenant!="REN" && codeTypeAvenant!="AFN")
{
v_msg="Veuillez procéder à un retrait!";
v_msgEng="Please make a withdrawal!";
alert_ebene(v_msg, v_msgEng);
return;
}
supprimer_beneficiaire_id(idBeneficiaire);
}
function supprimer_beneficiaire_id(idBeneficiaire)
{
v_msg="Confirmez-vous la suppression de ce bénéficiaire?";
v_msgEng="Do you confirm the removal of this beneficiary?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxbeneficiaire/supprimer/",
type : 'post',
data: "idBeneficiaire="+idBeneficiaire,
success: function(data) {
},
complete: function() {
afficher_adherent_id();
}
});
}
}
function actualiserbeneficiaireafacturer()
{
window.location.assign($("#racineWeb").val()+"Facturerpolice/");
}
function selectionner_tout_beneficiaireafacturer(choix)
{
window.location.assign($("#racineWeb").val()+"Facturerpolice/selectionnertout/"+choix+"/");
}
/*
function compta()
{
numeroClient = $("#numeroClient_C" ).val();
idClient = $("#idClient_C").val();
window.location.assign($("#racineWeb").val()+"Compta/"+idClient+"/");
}
*/
function compta()
{
numeroClient = $("#numeroClient_C" ).val();
idClient = $("#idClient_C").val();
if(idClient<'0')
{
idClient = '0';
}
if(idClient>'0')
{
window.location.assign($("#racineWeb").val()+"Compta/"+idClient+"/");
}
else
{
window.location.assign($("#racineWeb").val()+"Compta/");
}
}
function selection_quittanes_enc()
{
numeroClient = $("#numeroClient_C" ).val();
idClient = $("#idClient_C").val();
window.location.assign($("#racineWeb").val()+"Encselectionquittances/"+idClient+"/");
}
function selection_quittances_cli_enc()
{
numeroClient = $("#numeroClient_C" ).val();
idClient = $("#idClient_C").val();
window.location.assign($("#racineWeb").val()+"Encselectquitclient/"+idClient+"/");
}
function compta_changer_client(numeroClient)
{
if (numeroClient>"0")
{
$("#forminfoclient").submit();
}
}
function encaissement_changer_client(numeroClient)
{
if (numeroClient>"0")
{
$("#forminfoclient").submit();
}
}
function afficher_quittances_police()
{
numeroPolice = $("#numeroPolice_C" ).val();
idPolice = $("#idPolice_C" ).val();
$("#div_quittancepolice").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
if (numeroPolice>" ")
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxquittancepolice/",
type : 'post',
data: "idPolice="+idPolice+"&numeroPolice="+numeroPolice,
success: function(data) {
$("#div_quittancepolice").html(data);
}
});
}
}
function afficher_quittances_impayees_client()
{
idClient = $("#idClient_C").val();
$.ajax({
url: $("#racineWeb").val()+"Ajaxsituationclient/",
type : 'post',
data: "idClient="+idClient,
success: function(data) {
$("#div_quittancesclient").html(data);
}
});
}
function afficher_encaissements_quittance(idQuittance, numeroQuittance)
{
if (idQuittance>"0")
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxencaissementquittance/",
type : 'post',
data: "idQuittance="+idQuittance+"&numeroQuittance="+numeroQuittance,
success: function(data) {
$("#div_encaissementsquittance").html(data);
}
});
}
}
function afficher_encaissement(idEncaissement)
{
if (idEncaissement>"0")
{
window.location.assign($("#racineWeb" ).val()+"Ficheencaissement/"+idEncaissement+"/");
}
}
function encaisser_client()
{
numeroClient = $("#numeroClient_C" ).val();
idClient = $("#idClient_C").val();
if (idClient>"0")
{
window.location.assign($("#racineWeb").val()+"Encaisserclient/"+idClient+"/");
}
}
function encaisser_depot_bord()
{
$("#btn_depot").click();
}
function enregistrer_college()
{
$("#btn_enreg").click();
}
function enregistrer_college_d()
{
$("#btn_enreg").click();
}
function encaisser_quittance(idQuittance)
{
if (idQuittance>"0")
{
window.location.assign($("#racineWeb" ).val()+"Encaisserquittance/"+idQuittance+"/");
}
}
function selectionner_quittance_impayee(numeroQuittance, idQuittance, primeTtc, encaisse, solde)
{
$("#numeroQuittanceAcpte").val(numeroQuittance);
$("#idQuittanceAcpte").val(idQuittance);
$("#primeTtcAcpte").val(primeTtc);
$("#encaisseAcpte").val(encaisse);
$("#montantAcpte").val(solde);
$("#anc_soldeAcpte").val(solde);
}
function ajouter_quittance_acompte()
{
idQuittance = $("#idQuittanceAcpte" ).val();
montantAcpte = $("#montantAcpte" ).val();
primeTtcAcpte = $("#primeTtcAcpte" ).val();
if(idQuittance<="0")
{
v_msg="Veuillez sélectionner une quittance!";
v_msgEng="PLease select a premium issue!";
alert_ebene(v_msg, v_msgEng);
return;
}
if(montantAcpte<="0")
{
v_msg="Veuillez saisir l\'acompte!";
v_msgEng="Please enter the deposit!";
alert_ebene(v_msg, v_msgEng);
return;
}
anc_soldeAcpte = $("#anc_soldeAcpte" ).val();
if(Number(montantAcpte)>Number(anc_soldeAcpte))
{
v_msg="Veuillez vérifier le montant de l\'acompte!";
v_msgEng="Please check the amount of the deposit!";
alert_ebene(v_msg, v_msgEng);
return;
}
donnees = 'idQuittance='+idQuittance+'&montantAcpte='+montantAcpte+'&primeTtcAcpte='+primeTtcAcpte;
$("#div_situation_client").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxsituationclient/ajouteracomptequittance/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_situation_client").html(data);
},
error: function(data) {
},
complete: function() {
recap_bordereau_encaissement();
}
});
}
function ajouter_quittance_acompte_client()
{
idQuittance = $("#idQuittanceAcpte" ).val();
montantAcpte = $("#montantAcpte" ).val();
primeTtcAcpte = $("#primeTtcAcpte" ).val();
if(idQuittance<="0")
{
v_msg="Veuillez sélectionner une quittance!";
v_msgEng="PLease select a premium issue!";
alert_ebene(v_msg, v_msgEng);
return;
}
if(montantAcpte<="0")
{
v_msg="Veuillez saisir l\'acompte!";
v_msgEng="Please enter the deposit!";
alert_ebene(v_msg, v_msgEng);
return;
}
anc_soldeAcpte = $("#anc_soldeAcpte" ).val();
if(Number(montantAcpte)>Number(anc_soldeAcpte))
{
v_msg="Veuillez vérifier le montant de l\'acompte!";
v_msgEng="Please check the amount of the deposit!";
alert_ebene(v_msg, v_msgEng);
return;
}
donnees = 'idQuittance='+idQuittance+'&montantAcpte='+montantAcpte+'&primeTtcAcpte='+primeTtcAcpte;
$("#div_situation_client").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximpayeclient/ajouteracomptequittance/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_situation_client").html(data);
},
error: function(data) {
},
complete: function() {
recap_bordereau_encaissement();
}
});
}
function solder_quittance_temp(idQuittance)
{
donnees = 'idQuittance='+idQuittance;
$("#div_situation_client").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxsituationclient/solderquittance/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_situation_client").html(data);
},
error: function(data) {
},
complete: function() {
recap_bordereau_encaissement();
}
});
}
function solder_quittance_client_temp(idQuittance)
{
donnees = 'idQuittance='+idQuittance;
$("#div_situation_client").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximpayeclient/solderquittance/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_situation_client").html(data);
},
error: function(data) {
},
complete: function() {
recap_bordereau_encaissement();
}
});
}
function supprimer_detail_encaissement(idDetailencaissement)
{
donnees = 'idDetailencaissement='+idDetailencaissement;
$("#div_situation_client").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxsituationclient/supprimerquittance/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_situation_client").html(data);
},
error: function(data) {
},
complete: function() {
recap_bordereau_encaissement();
}
});
}
function retirer_garantie_police(idGarantie)
{
donnees = 'idGarantie='+idGarantie;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgarantiespolice/supprimergarantie/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_garanties").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function ajouter_une_garantie_college(codeGarantie)
{
donnees = 'codeGarantie='+codeGarantie;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgarantiescollege/ajoutergarantie/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_garanties").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function supprimer_detail_encaissement_client(idDetailencaissement)
{
donnees = 'idDetailencaissement='+idDetailencaissement;
$("#div_situation_client").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximpayeclient/supprimerquittance/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_situation_client").html(data);
},
error: function(data) {
},
complete: function() {
recap_bordereau_encaissement();
}
});
}
function encaissement_changer_client(numeroClient)
{
if (numeroClient>"0")
{
$("#forminfoclient").submit();
}
}
function encaisser_bordereau()
{
window.location.assign($("#racineWeb").val()+"Encaisserbordereau/");
}
function encaisser_bordereau_detail()
{
}
function imprimer_recu(idEncaissement)
{
donnees = 'idEncaissement='+idEncaissement;
var div_export = $('#div_export_a');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerrecucaisse/",
type: 'POST',
data: donnees,
success: function(data)
{
div_export.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function afficher_pop_recherche_client()
{
numeroclientsearch = $("#numeroclientsearch").val();
nomsearch = $("#nomsearch").val();
prenomsearch = $("#prenomsearch").val();
telsearch = $("#telsearch").val();
if (numeroclientsearch+nomsearch+prenomsearch+telsearch > " ")
{
donnees = "valid=1&numeroclientsearch="+numeroclientsearch+"&nomsearch="+nomsearch+"&prenomsearch="+prenomsearch+"&telsearch="+telsearch;
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisteclients/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_listeclient").html(data);
}
});
}
}
function afficher_pop_recherche_client_enc()
{
numeroclientsearch = $("#numeroclientsearch").val();
nomsearch = $("#nomsearch").val();
prenomsearch = $("#prenomsearch").val();
telsearch = $("#telsearch").val();
if (numeroclientsearch+nomsearch+prenomsearch+telsearch > " ")
{
donnees = "valid=1&numeroclientsearch="+numeroclientsearch+"&nomsearch="+nomsearch+"&prenomsearch="+prenomsearch+"&telsearch="+telsearch;
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisteclientsenc/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_listeclient").html(data);
}
});
}
}
function selectionner_client_pop(id,no,nom)
{
$("#nocli").val(no);
$("#nomcli").val(nom);
selectionner_client(id,no);
}
function ctrlkeypress(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
afficher_pop_recherche_client();
}
}
function ctrlkeypress_enc(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
afficher_pop_recherche_client_enc();
}
}
function ajaxListerMoyenPaiement()
{
codeModePaiement = $("#codeModePaiement").val();
$.ajax({
url: $("#racineWeb").val()+"Ajaxmoyenpaiement/",
type : 'post',
data: "codeModePaiement="+codeModePaiement,
success: function(data) {
$("#listemoyenpaiement").html(data);
},
complete: function() {
}
});
}
function ajax_no_cpt_paiement()
{
codeModePaiement = $("#codeModePaiement").val();
codeMoyenPaiement = $("#codeMoyenPaiement").val();
donnees = "codeModePaiement="+codeModePaiement+"&codeMoyenPaiement="+codeMoyenPaiement;
$.ajax({
url: $("#racineWeb").val()+"Ajaxnocptmoyenpaiement/",
type : 'post',
data: donnees,
success: function(data) {
$("#infonocpt").html(data);
},
complete: function() {
$("#numeroCompte").val( $("#numeroCompte_info").val());
}
});
}
function modifier_detail_encaissement(idDetailencaissement)
{
}
function recap_bordereau_encaissement()
{
montant_ecart = $("#montant_ecart_info").val();
$("#montant_selection").val( $("#montant_selection_info").val());
$("#montant_ecart").val(montant_ecart);
}
function enregistrer_encaissement_bordereau()
{
montant_ecart = $("#montant_ecart").val();
montant_ecart = montant_ecart.replace(" ", "");
montant_ecart = parseInt(montant_ecart);
montant_ecart = Math.abs(montant_ecart);
if(montant_ecart>"100")
{
v_msg="Veuillez vérifier votre écart!";
v_msgEng="Please check your gap!";
alert_ebene(v_msg, v_msgEng);
return;
}
$("#formente_encaissement").submit();
}
function enregistrer_encaissement_client()
{
montant_ecart = $("#montant_ecart").val();
montant_ecart = montant_ecart.replace(" ", "");
montant_ecart = parseInt(montant_ecart);
montant_ecart = Math.abs(montant_ecart);
if(montant_ecart>"100")
{
v_msg="Veuillez vérifier votre écart!";
v_msgEng="Please check your gap!";
alert_ebene(v_msg, v_msgEng);
return;
}
montant = $("#montant").val();
montant = montant.replace(" ", "");
montant = parseInt(montant);
montant = Math.abs(montant);
codeModePaiement = $("#codeModePaiement").val();
codeMoyenPaiement = $("#codeMoyenPaiement").val();
referencePaiement = $("#referencePaiement").val();
libelleOperation = $("#libelleOperation").val();
if(montant=="100")
{
v_msg="Veuillez saisir un montant!";
v_msgEng="Please enter an amount";
alert_ebene(v_msg, v_msgEng);
$("#montant").focus();
return;
}
if(codeModePaiement<=" ")
{
v_msg="Veuillez indiquer le mode de paiement!";
v_msgEng="Please enter the method of payment";
alert_ebene(v_msg, v_msgEng);
$("#codeModePaiement").focus();
return;
}
if(codeMoyenPaiement<=" ")
{
v_msg="Veuillez indiquer le moyen de paiement!";
v_msgEng="Please enter the method of payment!";
alert_ebene(v_msg, v_msgEng);
$("#codeMoyenPaiement").focus();
return;
}
if(referencePaiement<=" ")
{
v_msg="Veuillez indiquer la référence du paiement!";
v_msgEng="Please enter the payment reference!";
alert_ebene(v_msg, v_msgEng);
$("#referencePaiement").focus();
return;
}
if(libelleOperation<=" ")
{
v_msg="Veuillez saisir le libellé de l\'opération!";
v_msgEng="Please enter the text of the transaction!";
alert_ebene(v_msg, v_msgEng);
$("#libelleOperation").focus();
return;
}
$("#formente_encaissement").submit();
}
function enregistrer_encaissement_quittance()
{
anc_solde = $("#anc_solde").val();
montant = $("#montant").val();
montant_ecart = (montant-anc_solde);
montant_ecart = Math.abs(montant_ecart);
if(montant_ecart>"100")
{
v_msg="Veuillez vérifier votre écart!";
v_msgEng="Please check your gap!";
alert_ebene(v_msg, v_msgEng);
return;
}
montant = $("#montant").val();
montant = montant.replace(" ", "");
montant = parseInt(montant);
montant = Math.abs(montant);
codeModePaiement = $("#codeModePaiement").val();
codeMoyenPaiement = $("#codeMoyenPaiement").val();
referencePaiement = $("#referencePaiement").val();
libelleOperation = $("#libelleOperation").val();
if(montant=="100")
{
v_msg="Veuillez saisir un montant!";
v_msgEng="Please enter an amount";
alert_ebene(v_msg, v_msgEng);
$("#montant").focus();
return;
}
if(codeModePaiement<=" ")
{
v_msg="Veuillez indiquer le mode de paiement!";
v_msgEng="Please enter the method of payment";
alert_ebene(v_msg, v_msgEng);
$("#codeModePaiement").focus();
return;
}
if(codeMoyenPaiement<=" ")
{
v_msg="Veuillez indiquer le moyen de paiement!";
v_msgEng="Please enter the method of payment!";
alert_ebene(v_msg, v_msgEng);
$("#codeMoyenPaiement").focus();
return;
}
if(referencePaiement<=" ")
{
v_msg="Veuillez indiquer la référence du paiement!";
v_msgEng="Please enter the payment reference!";
alert_ebene(v_msg, v_msgEng);
$("#referencePaiement").focus();
return;
}
if(libelleOperation<=" ")
{
v_msg="Veuillez saisir le libellé de l\'opération!";
v_msgEng="Please enter the text of the transaction!";
alert_ebene(v_msg, v_msgEng);
$("#libelleOperation").focus();
return;
}
$("#formente_encaissement").submit();
}
function controle_numerique(controle)
{
if(isNaN(controle.value))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
controle.value="";
controle.focus();
return false;
}
return true;
}
function ajax_context_client(idClient)
{
donnees = 'idClient='+idClient;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextclient/",
type : 'post',
data: donnees,
error: function(errorData) {
}
});
}
function ajax_context_client_afficher(idClient)
{
donnees = 'idClient='+idClient;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextclient/",
type : 'post',
data: donnees,
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Ficheclient/");
}
});
}
function ajax_context_client_d_afficher(idClient)
{
donnees = 'idClient='+idClient;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextclientd/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Ficheprospect/");
}
});
}
function ajax_context_police(idPolice)
{
donnees = 'idPolice='+idPolice;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextpolice/",
type : 'post',
data: donnees,
error: function(errorData) {
}
});
}
function ajax_context_police_d(idPolice)
{
donnees = 'idPolice='+idPolice;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextpoliced/",
type : 'post',
data: donnees,
error: function(errorData) {
}
});
}
function ajax_context_police_afficher(idPolice)
{
donnees = 'idPolice='+idPolice;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextpolice/",
type : 'post',
data: donnees,
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Fichepolice/");
}
});
}
function ajax_context_police_d_afficher(idPolice)
{
donnees = 'idPolice='+idPolice;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextpoliced/",
type : 'post',
data: donnees,
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Fichedevis/");
}
});
}
function ajax_deconnexion()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxdeconnexion/",
complete: function()
{
window.open('about:blank','_parent','');
close();
window.close();
}
});
/* 24/03/2019
$.ajax({
url: $("#racineWeb").val()+"Ajaxdeconnexion/"
});
*/
}
function selectionner_college(idCollege)
{
$("#idCollege" ).val(idCollege);
}
function supprimer_college(idCollege)
{
v_msg="Confirmez-vous la suppression de ce collège?";
v_msgEng="Do you confirm the removal of this college?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Collegepolice/supprimerCollege/"+idCollege+"/");
}
}
function supprimer_college_d(idCollege)
{
transforme = $("#transforme").val();
if (transforme=="1")
{
v_msg="Devis déjà transformé!";
v_msgEng="Quote already transformed!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous la suppression de ce collège?";
v_msgEng="Do you confirm the removal of this college?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Fichedevis/supprimerCollege/"+idCollege+"/");
}
}
function modifier_college(idCollege)
{
if (idCollege>"0")
{
window.location.assign($("#racineWeb" ).val()+"Modifiercollege/"+idCollege+"/");
}
}
function modifier_college_d(idCollege)
{
transforme = $("#transforme").val();
if (transforme=="1")
{
v_msg="Devis déjà transformé!";
v_msgEng="Quote already transformed!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (idCollege>"0")
{
window.location.assign($("#racineWeb" ).val()+"Modifiercolleged/"+idCollege+"/");
}
}
function consulter_college(idCollege)
{
if (idCollege>"0")
{
window.location.assign($("#racineWeb" ).val()+"Consultercollege/"+idCollege+"/");
}
}
function retour_college()
{
idCollege=$("#idCollege").val();
if (idCollege>"0")
{
window.location.assign($("#racineWeb" ).val()+"Consultercollege/"+idCollege+"/");
}
}
function ajax_flexcode()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxflexcode/",
type : 'post',
success: function(data) {
$("#content").html(data);
},
complete: function() {
}
});
}
function ajaxttcfammille()
{
idCollege=$("#idCollege").val();
dateEntree=$("#dateEntree").val();
donnees = 'idCollege='+idCollege;
donnees += '&dateEntree='+dateEntree;
$.ajax({
url: $("#racineWeb").val()+"Ajaxttcfammille/",
type : 'post',
data: donnees,
success: function(data) {
$("#infottc").html(data);
},
complete: function() {
}
});
}
function supprimer_adherent()
{
idAherent=$("#idAdherent_C").val();
primeArchive=$("#primeArchive").val();
if (primeArchive=="1")
{
v_msg="Prime archivée!";
v_msgEng="Primium archived!";
alert_ebene(v_msg, v_msgEng);
return;
}
codeTypeAvenant=$("#codeTypeAvenant_C").val();
// alert('codeTypeAvenant => '+codeTypeAvenant);
// return;
if (codeTypeAvenant!="REN" && codeTypeAvenant!="AFN" && codeTypeAvenant!="CHE")
{
v_msg="Veuillez procéder à un retrait!";
v_msgEng="Please make a withdrawal!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (primeArchive=="0")
{
supprimer_adherent_id(idAherent);
return;
}
}
function supprimer_adherent_id(idAherent)
{
v_msg="Confirmez-vous la suppression de cet adhérent?";
v_msgEng="Do you confirm the deletion of this member?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxadherent/supprimer/",
type : 'post',
data: "idAherent="+idAherent,
success: function(data)
{
v_msg="Suppression terminée avec succès terminé!";
v_msgEng="Deletion completed successfully completed!";
alert_ebene(v_msg, v_msgEng);
},
complete: function()
{
adherents_police();
}
});
}
}
function supprimer_adherent_id_list(idAherent)
{
codeTypeAvenant=$("#codeTypeAvenant_C").val();
if (codeTypeAvenant!="REN" && codeTypeAvenant!="AFN" && codeTypeAvenant!="CHE")
{
v_msg="Veuillez procéder à un retrait!";
v_msgEng="Please make a withdrawal!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous la suppression de cet adhérent?";
v_msgEng="Do you confirm the deletion of this member?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"ajaxadherent/supprimer/",
type : 'post',
data: "idAherent="+idAherent,
success: function(data) {
v_msg="Suppression terminée avec succès terminé!";
v_msgEng="Deletion completed successfully completed!";
alert_ebene(v_msg, v_msgEng);
},
complete: function() {
adherents_police();
}
});
}
}
function ajax_init_echancier()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxinitnbecheance/",
type : 'post',
data: "codeTypeEcheancier="+$("#codeTypeEcheancier").val(),
success: function(data) {
$("#infonbEcheance").html(data);
},
complete: function() {
$("#nbEcheance").val( $("#nbEcheance_info").val());
ajax_maj_echancier();
}
});
}
function ajax_maj_echancier()
{
codeTypeEcheancier = $("#codeTypeEcheancier").val();
nbEcheance = $("#nbEcheance").val();
tauxInteret = $("#tauxInteret").val();
donnees = "codeTypeEcheancier="+codeTypeEcheancier+"&nbEcheance="+nbEcheance+"&tauxInteret="+tauxInteret;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmajcheancier/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Echeancier/");
}
});
}
function enregistrer_echeancier()
{
if ($("#nbEcheance").val()=="1")
{
v_msg="Confirmez-vous l\'émission sans échéancier?";
v_msgEng="Do you confirm the issue of primium without payment schedule?";
if(!confirm_ebene(v_msg, v_msgEng))
{
return;
}
afficher_police_id();
return;
}
v_msg="Confirmez-vous cet échéancier?";
v_msgEng="Do you confirm this payment schedule?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxmajcheancier/enregistrer/",
type : 'post',
success: function(data) {
},
complete: function() {
afficher_police_id();
}
});
}
}
function ajax_maj_lib_echancier(idEcheancier, libelleEcheance)
{
donnees = "idEcheancier="+idEcheancier+"&libelleEcheance="+libelleEcheance;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmajcheancier/majlibelle/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Echeancier/");
}
});
}
function ajax_maj_date_echancier(idEcheancier, datePaiement)
{
donnees = "idEcheancier="+idEcheancier+"&datePaiement="+datePaiement;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmajcheancier/majdatepaiement/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Echeancier/");
}
});
}
function ajax_maj_taux_echancier(idEcheancier, tauxEcheance)
{
nbEcheance = $("#nbEcheance").val();
donnees = "idEcheancier="+idEcheancier+"&tauxEcheance="+tauxEcheance+"&nbEcheance="+nbEcheance;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmajcheancier/majtauxecheance/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Echeancier/");
}
});
}
function retirer_garantie_college(idGarantie)
{
donnees = 'idGarantie='+idGarantie;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgarantiescollege/supprimergarantie/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_garanties").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function ajax_maj_taux_plafond(idGarantie, tauxPlafond, controle)
{
tauxPlafond=tauxPlafond.replace(",",".");
controle.value=tauxPlafond;
if(controle_numerique(controle))
{
donnees = 'idGarantie='+idGarantie+"&tauxPlafond="+tauxPlafond;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgarantiescollege/majtauxplafond/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_garanties").html(data);
},
error: function(data) {
},
complete: function() {
controle.focus();
}
});
}
}
function ajax_imposer_plafond(idGarantie, plafond, controle)
{
plafond=plafond.replace(",",".");
controle.value=plafond;
if(controle_numerique(controle))
{
donnees = 'idGarantie='+idGarantie+"&plafond="+plafond;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgarantiescollege/imposerplafond/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_garanties").html(data);
},
error: function(data) {
},
complete: function() {
controle.focus();
}
});
}
}
function ajax_maj_lib_gar_opt(idGarantie, libellegarantie, controle)
{
if (libellegarantie<=" ")
{
return;
}
donnees = 'idGarantie='+idGarantie+"&libellegarantie="+libellegarantie;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgarantiescollege/majlibgar/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_garanties").html(data);
},
error: function(data) {
},
complete: function() {
controle.focus();
}
});
}
function maj_prime_gar_opt(idGarantie, primeOption, controle)
{
if(controle_numerique(controle))
{
donnees = 'idGarantie='+idGarantie+"&primeOption="+primeOption;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgarantiescollege/majprimeopt/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_garanties").html(data);
},
error: function(data) {
},
complete: function() {
controle.focus();
}
});
}
}
function archiver_garantie_college(idCollege)
{
v_msg="Confirmez-vous l\'archivage des garanties ce collège?";
v_msgEng="Do you confirm the archiving of guarantees this college?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxcollege/archivergarntie/",
type : 'post',
data: "idCollege="+idCollege,
success: function(data) {
},
complete: function()
{
college_police();
}
});
}
}
function controle_champ_obligatoire(controle)
{
if (controle.value<=" ")
{
v_msg="Valeur exigée!";
v_msgEng="Value required!";
alert_ebene(v_msg, v_msgEng);
controle.focus();
return false;
}
return true;
}
function controle_champ_obligatoire_new(controle)
{
if (controle.value<=" ")
{
v_msg="Valeur exigée!";
v_msgEng="Value required!";
alert_ebene(v_msg, v_msgEng);
controle.focus();
return false;
}
return true;
}
function controle_champ_obligatoire_old(controle)
{
if (controle.value<=" ")
{
v_msg="Valeur exigée!";
v_msgEng="Value required!";
alert_ebene(v_msg, v_msgEng);
controle.focus();
return false;
}
return true;
}
function plafond_adherent()
{
if ($("#idAdherent_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"Plafondadherent/");
}
}
function creer_adherents()
{
// 06/11/2020
if(est_ce_police_famille())
{
window.location.assign($("#racineWeb" ).val()+"Assuranceindividuelle/");
return;
}
nbAdh = $("#nbAdh_C").val();
codeTypeContrat = $("#codeTypeContrat_C").val();
if ( (codeTypeContrat!="G") && (nbAdh>0) )
{
v_msg="Ce n\'est pas une police GROUPE!";
v_msgEng="This is not a GROUP policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
etat=$("#codeEtatPolice_C").val();
if (etat=="RE")
{
v_msg="Attention! Police résiliée!";
v_msgEng="Warning! Terminated policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="SU")
{
v_msg="Attention! Police suspendue!";
v_msgEng="Warning! Suspended policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="AN")
{
v_msg="Attention! Police annulée!";
v_msgEng="Warning! Canceled policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Creeradherent/");
}
function creer_colleges()
{
etat=$("#codeEtatPolice_C").val();
if (etat=="RE")
{
v_msg="Attention! Police résiliée!";
v_msgEng="Warning! Terminated policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="AN")
{
v_msg="Attention! Police annulée!";
v_msgEng="Warning! Canceled policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Creercollege/initcollege/");
}
function creer_colleges_d()
{
transforme = $("#transforme").val();
if (transforme=="1")
{
v_msg="Devis déjà transformé!";
v_msgEng="Quote already transformed!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Creercolleged/initcollege/");
}
function creer_beneficiaires()
{
if(est_ce_police_famille())
{
creer_beneficiaires_familiale();
return;
}
etat=$("#codeEtatPolice_C").val();
if (etat=="RE")
{
v_msg="Attention! Police résiliée!";
v_msgEng="Warning! Terminated policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="SU")
{
v_msg="Attention! Police suspendue!";
v_msgEng="Warning! Suspended policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="AN")
{
v_msg="Attention! Police annulée!";
v_msgEng="Warning! Canceled policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
etatadh=$("#codeEtatAdherent_C").val();
if (etatadh != "V")
{
v_msg="Attention! cette famille n\'est pas en vigueur!";
v_msgEng="Warning! this family is not in force!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Creerbeneficiaire/");
}
function changer_etat_adherent()
{
etat=$("#codeEtatPolice_C").val();
if (etat=="RE")
{
v_msg="Attention! Police résiliée!";
v_msgEng="Warning! Terminated policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="SU")
{
v_msg="Attention! Police suspendue!";
v_msgEng="Warning! Suspended policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="AN")
{
v_msg="Attention! Police annulée!";
v_msgEng="Warning! Canceled policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Changeretatadherent/");
}
function creer_avenant()
{
etat=$("#codeEtatPolice_C").val();
if (etat=="RE")
{
v_msg="Attention! Police résiliée!";
v_msgEng="Warning! Terminated policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="AN")
{
v_msg="Attention! Police annulée!";
v_msgEng="Warning! Canceled policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Creeravenant/");
}
function liste_avenant()
{
window.location.assign($("#racineWeb" ).val()+"Listeavenant/");
}
function prorater_prime_adherent()
{
idCollege=$("#idCollege").val();
dateEntree=$("#dateEntree").val();
prorata=$("#prorata").val();
if (idCollege<=" ")
{
v_msg="Veuillez sélectionner un collège!";
v_msgEng="Please select a college!";
alert_ebene(v_msg, v_msgEng);
return;
}
donnees = 'idCollege='+idCollege;
donnees += '&dateEntree='+dateEntree;
donnees += '&prorata='+prorata;
$.ajax({
url: $("#racineWeb").val()+"Ajaxproraterprime/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_prime").html(data);
},
complete: function() {
}
});
}
function prorater_prime_beneficiaire()
{
idAvenant = $("#idAvenant").val();
if(idAvenant<=" ")
{
v_msg="Veuillez sélectionner un avenant!";
v_msgEng="Please select an Amendment!";
alert_ebene(v_msg, v_msgEng);
$("#idAvenant").focus();
return;
}
codeLienParente=$("#codeLienParente").val();
if (codeLienParente=="A")
{
v_msg="Veuillez revoir le lien de parenté!";
v_msgEng="Please review the relationship";
alert_ebene(v_msg, v_msgEng);
$("#codeLienParente").focus();
return;
}
dateEntree=$("#dateEntree").val();
fraisCarte=$("#fraisCarte").val();
prorata=$("#prorata").val();
donnees = '&dateEntree='+dateEntree;
donnees += '&fraisCarte='+fraisCarte;
donnees += '&prorata='+prorata;
$.ajax({
url: $("#racineWeb").val()+"Ajaxproraterprimebeneficiaire/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_prime").html(data);
},
complete: function() {
}
});
}
function histo_etats()
{
window.location.assign($("#racineWeb" ).val()+"Histoetat/");
}
function afficher_emission(idEmission)
{
if (idEmission>"0")
{
window.location.assign($("#racineWeb" ).val()+"Emission/"+idEmission+"/");
}
}
function exporter_liste_assures()
{
$('#div_exporter_liste_assures').html('');
$("#btn_exporter_liste_assures").click();
}
function imprimer_liste_assures()
{
$('#div_export_assures').html('');
$("#btn_liste_assures").click();
}
function imprimer_limites()
{
idEntetecontrat=$("#idEntetecontrat").val();
if (idEntetecontrat<="0")
{
v_msg="Veuillez sélectionner une période!";
v_msgEng="Please select a period!";
alert_ebene(v_msg, v_msgEng);
$("#idEntetecontrat").focus();
div_attente.html('');
return;
}
donnees = 'idEntetecontrat='+idEntetecontrat;
var div_export = $('#div_export_a');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerlimite/",
type: 'POST',
data: donnees,
success: function(data)
{
div_export.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function imprimer_cp(lienEtat)
{
var div_export = $('#div_export_a');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
donnees = 'lienEtat='+lienEtat;
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimercp/",
type: 'POST',
data: donnees,
success: function(data)
{
div_export.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function imprimer_cp_d(lienEtat)
{
var div_export = $('#div_export_a');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
donnees = 'lienEtat='+lienEtat;
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimercpd/",
type: 'POST',
data: donnees,
success: function(data)
{
div_export.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function imprimer_cp_eng()
{
var div_export = $('#div_export_a');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimercpeng/",
type: 'POST',
success: function(data)
{
div_export.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function imprimer_cp_eng_d()
{
var div_export = $('#div_export_a');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimercpengd/",
type: 'POST',
success: function(data)
{
div_export.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function rachat_tm_police()
{
if($('#rachatTm').val()=="1")
{
$("#tauxRachatTm").readable();
}
else
{
$("#tauxRachatTm").val("0");
$("#tauxRachatTm").unreadable();
}
}
function pop_tableau_prestation()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxtableauprestation/",
type : 'post',
success: function(data) {
$("#div_tableau_prestation").html(data);
},
complete: function() {
$("#btn_pop").click();
}
});
}
function pop_consulter_tableau_prestation()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxconsultertableauprestation/",
type : 'post',
success: function(data) {
$("#div_tableau_prestation").html(data);
},
complete: function() {
$("#btn_pop").click();
}
});
}
function pop_afficher_detail_resiliation()
{
var div_tableau_assure = $('#div_tableau_assure');
div_tableau_assure.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailresiliation/",
type : 'post',
success: function(data) {
div_tableau_assure.html(data);
},
complete: function() {
$("#btn_pop").click();
}
});
}
function maj_college()
{
if($('#codeProduit').val()<=" ")
{
v_msg="Veuillez sélectionner une catégorie!";
v_msgEng="Please select a category!";
alert_ebene(v_msg, v_msgEng);
$('#codeProduit').focus();
return;
}
$("#btn_recap").click();
}
function ajax_maj_tm(idPrestation, tm, controle)
{
tm=tm.replace(",",".");
controle.value=tm;
if(controle_numerique(controle))
{
donnees = 'idPrestation='+idPrestation+"&tm="+tm;
$.ajax({
url: $("#racineWeb").val()+"Ajaxtableauprestation/majtm/",
type: 'POST',
data: donnees,
complete: function() {
}
});
}
}
function texte_cp()
{
window.location.assign($("#racineWeb" ).val()+"Textecp/");
}
function imprimer_contrat()
{
prestationPossible = $("#prestationPossible").val();
/*
if (prestationPossible!="1")
{
v_msg="Police non encore couverte!";
v_msgEng="Policy not yet covered!";
alert_ebene(v_msg, v_msgEng);
return;
}
*/
window.location.assign($("#racineWeb" ).val()+"Contrat/");
}
function imprimer_devis()
{
window.location.assign($("#racineWeb" ).val()+"Imprimerdevis/");
}
function rapport_sp_police()
{
window.location.assign($("#racineWeb" ).val()+"Sppolice/");
}
function rapport_sp_adherent()
{
window.location.assign($("#racineWeb" ).val()+"Spadherent/");
}
function rapport_sp_college()
{
window.location.assign($("#racineWeb" ).val()+"Spcollege/");
}
function rapport_sp_beneficiaire()
{
window.location.assign($("#racineWeb" ).val()+"Spbeneficiaire/");
}
function enregistrer_avenant()
{
codeTypeAvenant=$("#codeTypeAvenant").val();
oldCodeTypeAvenant=$("#oldCodeTypeAvenant").val();
if ($("#codeTypeAvenant").val()<" ")
{
v_msg="Veuillez sélectionner le type d\'avenant!";
v_msgEng="Please select the type of amendment!";
alert_ebene(v_msg, v_msgEng);
return;
}
if(codeTypeAvenant!="CHE" && codeTypeAvenant!="REN")
{
var d_effet = new Date($("#dateEffetSql").val());
var d_fin = new Date($("#dateFinSql").val());
var d_avenant = $("#dateAvenant").datepicker("getDate");
dt_effet = Math.round(Date.parse(d_effet)/(1000*3600*24));
dt_fin = Math.round(Date.parse(d_fin)/(1000*3600*24));
dt_avenant = Math.round(Date.parse(d_avenant)/(1000*3600*24));
if (dt_avenant>dt_fin || dt_avenant<dt_effet)
{
v_msg="Veuillez revoir la date!";
v_msgEng="Please review the date!";
alert_ebene(v_msg, v_msgEng);
return;
}
}
if(codeTypeAvenant=="REN")
{
var td1 = new Date($("#DateRenouvellement").val());
var td2 = $("#dateAvenant").datepicker("getDate");
dt1=Math.round(Date.parse(td1)/(1000*3600*24));
dt2=Math.round(Date.parse(td2)/(1000*3600*24));
if (dt1>dt2)
{
v_msg="Veuillez revoir la date de renouvellement!";
v_msgEng="Please review the renewal date!";
alert_ebene(v_msg, v_msgEng);
return;
}
var eff = $("#dateAvenant").datepicker("getDate");
var ech = $("#dateEcheanceRen").datepicker("getDate");
if (ech>eff.addMonths(12)) {
v_msg="Période supérieur à un an!";
v_msgEng="Period greater than one year!";
alert_ebene(v_msg, v_msgEng);
}
}
if(codeTypeAvenant=="CHE" && oldCodeTypeAvenant=="REN")
{
var td1 = new Date($("#dateEffet").val());
var td2 = $("#dateAvenant").datepicker("getDate");
dt1=Math.round(Date.parse(td1)/(1000*3600*24));
dt2=Math.round(Date.parse(td2)/(1000*3600*24));
if (dt1>dt2)
{
v_msg="Veuillez revoir la date!";
v_msgEng="Please review the date!";
alert_ebene(v_msg, v_msgEng);
return;
}
}
if (
codeTypeAvenant=="RET" ||
codeTypeAvenant=="ANR" ||
codeTypeAvenant=="RES" ||
codeTypeAvenant=="SUS" ||
codeTypeAvenant=="ANL"||
codeTypeAvenant=="RVP"||
codeTypeAvenant=="ADL"||
codeTypeAvenant=="CHE")
{
motifavenant=$("#motifavenant").val();
if ($("#motifavenant").val()<" ")
{
v_msg="Veuillez fournir le motif!";
v_msgEng="Please provide the reason";
alert_ebene(v_msg, v_msgEng);
return;
}
}
v_msg="Confirmez-vous cet avenant?";
v_msgEng="Do you confirm this amendment to the contract?";
if(confirm_ebene(v_msg, v_msgEng))
{
var div_attente = $('#div_attente');
div_attente.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Chargement en cours! Veuillez patienter...' + '</span></div>');
codeTypeAvenant=$("#codeTypeAvenant").val();
donnees = "";
if (codeTypeAvenant=="ANL")
{
donnees = "controle=existequittance";
}
if(donnees>" ")
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontroleavenantpolice/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
alert(data);
$("#div_controler_avenant").html(data);
},
complete: function() {
$("#controler_avenant").val($("#controler_avenant_info").val());
resultat_controler_avenant = $("#controler_avenant").val();
if (resultat_controler_avenant=="Q")
{
v_msg="Attention, cette police possède des quittances!";
v_msgEng="Warning, this policy has premium issues!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (resultat_controler_avenant=="C")
{
v_msg="Attention, cette police possède des sinistres!";
v_msgEng="Warning, this policy has claims!";
alert_ebene(v_msg, v_msgEng);
return;
}
return;
}
});
}
else
if (codeTypeAvenant=="ADL")
{
donnees = "dateAvenant="+$("#dateAvenant").val()+"&motifavenant="+motifavenant;
$.ajax({
url: $("#racineWeb").val()+"Ajaxlimiteadditionnelle/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
},
complete: function() {
$("#btn_enreg").click();
}
});
}
else
{
$("#btn_enreg").click();
}
}
}
function enregistrer_resiliation()
{
v_msg="Confirmez-vous la résiliation de cette police?";
v_msgEng="Do you confirm the cancellation of this policy?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Ficheresiliation/enregistrerresiliation/");
}
}
function enregistrer_retrait()
{
var div_assure_a_retirer = $('#div_assure_a_retirer');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailretrait/recapituler/",
type: 'POST',
success: function(data) {
div_assure_a_retirer.html(data);
},
error: function(data) {
},
complete: function() {
nbAliment=$("#nbAliment").val();
if (nbAliment<"1")
{
v_msg="Veuillez sélectionner les personnes à retirer!";
v_msgEng="Please select the people to remove!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous le retrait des personnes sélectionnées de cette police?";
v_msgEng="Do you confirm the withdrawal of the selected people from this policy?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Ficheretrait/enregistrerretrait/");
}
}
});
}
function controle_date_avenant()
{
codeTypeAvenant=$("#codeTypeAvenant").val();
if(est_ce_police_famille() && codeTypeAvenant=="RET")
{
v_msg="Oprétaion non autorisée!";
v_msgEng="Unauthorized operation!";
alert_ebene(v_msg, v_msgEng);
afficher_police_id();
return;
}
$("#div_periodidite").html("");
if(codeTypeAvenant=="REN")
{
$("#dateAvenant").val($("#DateRenouvellement_fr").val());
$("#motifavenant").val("");
$("#motifavenant").unreadable();
$.ajax({
url: $("#racineWeb").val()+"Ajaxrenouvellement/",
type: 'POST',
// data: donnees,
success: function(data)
{
$("#div_periodidite").html(data);
$(".datepicker" ).datepicker();
CalculerEcheanceRen();
CalculerFinRen();
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
$("#dateAvenant").readable();
}
else
if(codeTypeAvenant=="ADL")
{
$("#dateAvenant").val($("#datejourfr_C").val());
$("#dateAvenant").unreadable();
$("#motifavenant").readable();
}
else
{
$("#dateAvenant").val($("#datejourfr_C").val());
$("#dateAvenant").readable();
$("#motifavenant").readable();
}
}
function pop_afficher_detail_renouvellement()
{
var div_tableau_assure = $('#div_tableau_assure');
div_tableau_assure.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrenouvellement/",
type : 'post',
success: function(data) {
div_tableau_assure.html(data);
},
complete: function() {
$("#btn_pop").click();
}
});
}
function enregistrer_renouvellemnt()
{
v_msg="Confirmez-vous le renouvellement de cette police?";
v_msgEng="Do you confirm the renewal of this policy?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Ficherenouvellement/enregistrerrenouvellement/");
}
}
function fiche_limite_additionnelle()
{
window.location.assign($("#racineWeb" ).val()+"Fichelimiteadditionnelle/");
}
function enregistrer_changement_etat_famille()
{
codeEtatAdherent=$("#codeEtatAdherent").val();
if (codeEtatAdherent<" ")
{
v_msg="Veuillez sélectionner le nouvel état!";
v_msgEng="Please select the new state!";
alert_ebene(v_msg, v_msgEng);
return;
}
motifEtat=$("#motifEtat").val();
if (motifEtat<" ")
{
v_msg="Veuillez indiquer le motif!";
v_msgEng="Please enter the reason!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous ce changement d\'état?";
v_msgEng="Do you confirm this change of state?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#btn_enreg").click();
}
}
function changer_etat_beneficiaire()
{
etat=$("#codeEtatPolice_C").val();
if (etat=="RE")
{
v_msg="Attention! Police résiliée!";
v_msgEng="Warning! Terminated policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="SU")
{
v_msg="Attention! Police suspendue!";
v_msgEng="Warning! Suspended policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="AN")
{
v_msg="Attention! Police annulée!";
v_msgEng="Warning! Canceled policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Changeretatbeneficiaire/");
}
function enregistrer_changement_etat_beneficiaire()
{
codeEtatBeneficiaire=$("#codeEtatBeneficiaire").val();
if (codeEtatBeneficiaire<" ")
{
v_msg="Veuillez sélectionner le nouvel état!";
v_msgEng="Please select the new state!";
alert_ebene(v_msg, v_msgEng);
return;
}
motifEtat=$("#motifEtat").val();
if (motifEtat<" ")
{
v_msg="Veuillez indiquer le motif!";
v_msgEng="Please enter the reason!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous ce changement d\'état?";
v_msgEng="Do you confirm this change of state?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#btn_enreg").click();
}
}
function pop_afficher_selection_retrait()
{
var div_selection_assure = $('#div_selection_assure');
div_selection_assure.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$("#btn_pop").click();
$.ajax({
url: $("#racineWeb").val()+"Ajaxselectionretrait/",
type : 'post',
success: function(data) {
div_selection_assure.html(data);
},
complete: function() {
// $("#btn_pop").click();
}
});
}
function beneficiaire_a_retirer(p_choix, p_id_beneficiaire)
{
donnees = 'idBeneficiaire='+p_id_beneficiaire;
donnees += '&choix='+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxselectionretrait/selectionner/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
}
});
}
function recapituler_retrait()
{
var div_assure_a_retirer = $('#div_assure_a_retirer');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailretrait/recapituler/",
type: 'POST',
success: function(data) {
div_assure_a_retirer.html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function changer_college()
{
codeTypeAvenant=$("#codeTypeAvenant_C").val();
// /* autorisé le 11/07/2018 en attendant
if (codeTypeAvenant!="REN")
{
v_msg="Opération possible uniquement lors du renouvellement!";
v_msgEng="Operation possible only during renewal!";
alert_ebene(v_msg, v_msgEng);
return;
}
codeEtatFacturation=$("#codeEtatFacturation").val();
if (codeEtatFacturation=="1")
{
v_msg="Attention! Famille déjà facturée!";
v_msgEng="Warning! Family already billed!";
alert_ebene(v_msg, v_msgEng);
return;
}
consommation_adherent=$("#consommation_adherent").val();
if(consommation_adherent>"0")
{
v_msg="Attention! cette famille a déjà consommé!";
v_msgEng="Warning! this family has already consumed!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Changercollege/");
}
function changer_college_adherent()
{
idCollege=$("#idCollege").val();
if (idCollege<=" ")
{
v_msg="Veuillez sélectionner un collège!";
v_msgEng="Please select a college!";
alert_ebene(v_msg, v_msgEng);
return;
}
donnees = 'idCollege='+idCollege;
$.ajax({
url: $("#racineWeb").val()+"Ajaxchangercollege/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_prime").html(data);
},
complete: function() {
}
});
}
function enregistrer_changement_college()
{
idCollege=$("#idCollege").val();
idCollegeOld=$("#idCollegeOld").val();
if (idCollege==idCollegeOld)
{
v_msg="Veuillez sélectionner un autre collège!";
v_msgEng="Please select a another college!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (idCollege<=" ")
{
v_msg="Veuillez sélectionner un collège!";
v_msgEng="Please select a college!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous cette opération?";
v_msgEng="Do you confirm this operation?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#btn_enreg").click();
}
}
function enregistrer_limite_additionnelle()
{
nbAliment=$("#nbAliment").val();
if (nbAliment<"1")
{
v_msg="Veuillez sélectionner les familles concernées!";
v_msgEng="Please select the families concerned!";
alert_ebene(v_msg, v_msgEng);
return;
}
cumulPlafond=$("#cumulPlafond").val();
// alert("cumulPlafond => "+cumulPlafond);
// return;
if (cumulPlafond<="1")
{
v_msg="Veuillez saisir les limites additionnelles!";
v_msgEng="Please enter the additional limits!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous ces limites additionnelles?";
v_msgEng="Do you confirm these additional limits?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Fichelimiteadditionnelle/enregistrerlimiteadditionnelle/");
}
}
function selection_college(p_choix,p_id_college_temp)
{
donnees = 'idCollegeTemp='+p_id_college_temp;
donnees += '&choix='+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxlimiteadditionnelle/selectionner/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
recapituler_limite_additionnelle();
}
});
}
function modifier_college_temp(p_id_college_temp)
{
if (p_id_college_temp>"0")
{
window.location.assign($("#racineWeb" ).val()+"Modifiercollegetemp/"+p_id_college_temp+"/");
}
}
function maj_limite_additionnelle(idGarantie, plafond, controle)
{
if(controle_numerique(controle))
{
donnees = 'idGarantie='+idGarantie+"&plafond="+plafond;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgarantiescollegeadd/majplafondadd/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_garanties").html(data);
},
error: function(data) {
},
complete: function() {
controle.focus();
}
});
}
}
function maj_prime_additionnelle(idGarantie, primeOption, controle)
{
if(controle_numerique(controle))
{
donnees = 'idGarantie='+idGarantie+"&primeOption="+primeOption;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgarantiescollegeadd/majprimeadd/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_garanties").html(data);
},
error: function(data) {
},
complete: function() {
recapituler_limite_college();
controle.focus();
}
});
}
}
function enregistrer_college_temp()
{
$("#btn_enreg").click();
}
function recapituler_limite_additionnelle()
{
var div_primes = $('#div_primes');
$.ajax({
url: $("#racineWeb").val()+"Recaplimiteadd/",
type: 'POST',
success: function(data) {
div_primes.html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function recapituler_limite_college()
{
var div_recap = $('#div_recap');
$.ajax({
url: $("#racineWeb").val()+"Recaplimitecollege/",
type: 'POST',
success: function(data) {
div_recap.html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function changer_limite()
{
etat=$("#codeEtatPolice_C").val();
if (etat=="RE")
{
v_msg="Attention! Police résiliée!";
v_msgEng="Warning! Terminated policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="SU")
{
v_msg="Attention! Police suspendue!";
v_msgEng="Warning! Suspended policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="AN")
{
v_msg="Attention! Police annulée!";
v_msgEng="Warning! Canceled policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
etatadh=$("#codeEtatAdherent_C").val();
if (etatadh != "V")
{
v_msg="Attention! cette famille n\'est pas en vigueur!";
v_msgEng="Warning! this family is not in force!";
alert_ebene(v_msg, v_msgEng);
return;
}
rapport_sp_police=$("#rapport_sp_police").val();
if(rapport_sp_police>"0.70")
{
v_msg="Attention! S/P > 70%";
v_msgEng="Warbing! Loss Ratio > 70%";
alert_ebene(v_msg, v_msgEng);
return;
}
$.ajax({
url: $("#racineWeb").val()+"Ajaxlimiteaddadherent/",
type : 'post',
success: function(data) {
},
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Changerlimite/");
}
});
}
function maj_limite_add_adherent(idGarantie, plafond, controle)
{
if(controle_numerique(controle))
{
donnees = 'idGarantie='+idGarantie+"&plafond="+plafond;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgarantiescollegeadherent/majplafondadherent/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_garanties").html(data);
},
error: function(data) {
},
complete: function() {
controle.focus();
}
});
}
}
function enregistrer_changement_limite()
{
$("#btn_enreg").click();
}
function pop_afficher_selection_limite(p_id_college_temp)
{
var div_selection_assure = $('#div_selection_assure');
$("#btn_pop").click();
donnees = 'id_college_temp='+p_id_college_temp;
$.ajax({
url: $("#racineWeb").val()+"Ajaxselectionlimite/",
type : 'post',
data: donnees,
success: function(data) {
div_selection_assure.html(data);
},
complete: function() {
// $("#btn_pop").click();
}
});
}
function selection_famille_limite(p_choix,p_idBeneficiaire)
{
donnees = 'idBeneficiaire='+p_idBeneficiaire;
donnees += '&choix='+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxselectionlimite/selectionner/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
recapituler_limite_college_simple();
}
});
}
function recapituler_limite_college_simple()
{
$.ajax({
url: $("#racineWeb").val()+"Recaplimitecollege/recapituler/",
type: 'POST',
success: function(data) {
},
error: function(data) {
},
complete: function() {
recapituler_limite_additionnelle();
}
});
}
function selectionner_tout_limite(p_idCollegeTemp, p_choix)
{
donnees = 'idCollegeTemp='+p_idCollegeTemp;
donnees += '&choix='+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxselectionlimite/selectionnertout/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
recapituler_limite_college_simple();
pop_afficher_selection_limite(p_idCollegeTemp);
}
});
}
function gestionbon()
{
adminBon = $("#adminBon").val();
if (adminBon!="1")
{
v_msg="Accès refusé!";
v_msgEng="Access denied!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb").val()+"Gestionbons/");
}
function getDenierNumeroBon()
{
$("#msgErreur").html("");
$("#div_wait").html("");
codeTypeBon=$("#codeTypeBon").val();
if (codeTypeBon<=" ")
{
v_msg="Veuillez sélectionner un type de bon!";
v_msgEng="Please select a form type!";
alert_ebene(v_msg, v_msgEng);
return;
}
$("#msgErreur").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxderniernumerobon/",
type : 'post',
data: "codeTypeBon="+codeTypeBon,
success: function(data) {
$("#infodernierbon").html(data);
$("#msgErreur").html("");
},
complete: function() {
denierNumeroBon = $("#denierNumeroBon_info").val();
denierNumeroBon = parseInt(denierNumeroBon);
$("#denierNumeroBon").val(denierNumeroBon);
$("#noDepart").val(denierNumeroBon+1);
$("#noFin").val(denierNumeroBon+50);
}
});
}
function genererbon()
{
codePrestataire=$("#codePrestataire").val();
codeTypeBon=$("#codeTypeBon").val();
receptionnaire=$("#receptionnaire").val();
noDepart=$("#noDepart").val();
noFin=$("#noFin").val();
if (noDepart=="")
{
noDepart="0";
}
if (noFin=="")
{
noFin="0";
}
noDepart = parseInt(noDepart);
noFin = parseInt(noFin);
if (codePrestataire<=" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
$("#codePrestataire").focus();
$("#btn_pop_prestataire").click();
return;
}
if (codeTypeBon<=" ")
{
v_msg="Veuillez sélectionner un type de bon!";
v_msgEng="Please select a form type!";
alert_ebene(v_msg, v_msgEng);
$("#codeTypeBon").focus();
return;
}
if (noFin<noDepart)
{
v_msg="Veuillez revoir vos bornes!";
v_msgEng="Please check your limits!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (receptionnaire<=" ")
{
v_msg="Veuillez indiquer le réceptionnaire!";
v_msgEng="Please enter the receiver!";
alert_ebene(v_msg, v_msgEng);
$("#receptionnaire").focus();
return;
}
v_msg="Confirmez-vous la génération des bons?";
v_msgEng="Do you confirm the generation of forms?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'codeTypeBon='+codeTypeBon+'&noDepart='+noDepart+'&noFin='+noFin+'&receptionnaire='+receptionnaire+'&codePrestataire='+codePrestataire;
// donnees_sav = donnees+'&typeMail=mailgenererbon';
donnees_sav = donnees;
typeMail='mailgenererbon';
$.ajax({
url: $("#racineWeb").val()+"Ajaxplagebonlibre/",
type : 'post',
data: donnees,
success: function(data) {
$("#infoplagelibre").html(data);
},
complete: function() {
plageLibre_info=$("#plageLibre_info").val();
if (plageLibre_info!="0")
{
v_msg="Cette plage est déjà occupée!";
v_msgEng="This range is already occupied!";
alert_ebene(v_msg, v_msgEng);
$("#noDepart").focus();
return;
}
$("#div_page_entiere").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxgenererbons/genererBon/",
type : 'post',
data: donnees,
error: function(errorData) {
},
success: function(data) {
$("#div_page_entiere").html(data);
},
complete: function() {
imprimer_livraison_bon();
}
});
}
});
}
}
function afficherbon()
{
codePrestataire=$("#codePrestataire").val();
codeTypeBon=$("#codeTypeBon").val();
codeEtatBon=$("#codeEtatBon").val();
noDepart=$("#noDepart").val();
noFin=$("#noFin").val();
if (noDepart=="")
{
noDepart="0";
}
if (noFin=="")
{
noFin="0";
}
noDepart = parseInt(noDepart);
noFin = parseInt(noFin);
if (codePrestataire<=" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
$("#codePrestataire").focus();
return;
}
if (codeTypeBon<=" ")
{
v_msg="Veuillez sélectionner un type de bon!";
v_msgEng="Please select a form type!";
alert_ebene(v_msg, v_msgEng);
$("#codeTypeBon").focus();
return;
}
if (noFin<noDepart)
{
v_msg="Veuillez revoir vos bornes!";
v_msgEng="Please check your limits!";
alert_ebene(v_msg, v_msgEng);
return;
}
donnees = 'codePrestataire='+codePrestataire+'&codeTypeBon='+codeTypeBon+'&codeEtatBon='+codeEtatBon+'&noDepart='+noDepart+'&noFin='+noFin;
$("#div_bonpecs").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherbons/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_bonpecs").html(data);
},
complete: function() {
$("#nbligne").val("Nombre de bons affichés : "+$("#nbligne_info").val());
}
});
}
function listergenerationbon()
{
codePrestataire=$("#codePrestataire").val();
codeTypeBon=$("#codeTypeBon").val();
d1=$("#d1").val();
d2=$("#d2").val();
if (codePrestataire<=" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
$("#codePrestataire").focus();
return;
}
if (codeTypeBon<=" ")
{
v_msg="Veuillez sélectionner un type de bon!";
v_msgEng="Please select a form type!";
alert_ebene(v_msg, v_msgEng);
$("#codeTypeBon").focus();
return;
}
donnees = 'codePrestataire='+codePrestataire+'&codeTypeBon='+codeTypeBon+'&d1='+d1+'&d2='+d2;
$("#div_bonpecs").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxalistegenererbons/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_bonpecs").html(data);
},
complete: function() {
$("#nbligne").val("Nombre de lignes affichées : "+$("#nbligne_info").val());
}
});
}
function listerdemandebon()
{
codePrestataire=$("#codePrestataire").val();
codeTypeBon=$("#codeTypeBon").val();
d1=$("#d1").val();
d2=$("#d2").val();
if (codePrestataire<=" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
$("#codePrestataire").focus();
return;
}
if (codeTypeBon<=" ")
{
v_msg="Veuillez sélectionner un type de bon!";
v_msgEng="Please select a form type!";
alert_ebene(v_msg, v_msgEng);
$("#codeTypeBon").focus();
return;
}
donnees = 'codePrestataire='+codePrestataire+'&codeTypeBon='+codeTypeBon+'&d1='+d1+'&d2='+d2;
$("#div_bonpecs").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxalistedemandebon/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_bonpecs").html(data);
},
complete: function() {
}
});
}
function ajaxListerExclusions()
{
$("#div_acte").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxexclureacte/",
type : 'post',
data: "idCollege="+$("#idCollege").val(),
success: function(data) {
$("#div_acte").html(data);
}
});
}
function exclure_acte(p_choix, p_codeActe, id_exclusioncollege)
{
donnees = 'idCollege='+$("#idCollege").val();
donnees += '&id_exclusioncollege='+id_exclusioncollege;
donnees += '&codeActe='+p_codeActe;
donnees += '&choix='+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxexclureacte/exclure/",
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
}
});
}
function separateur_millier(montant)
{
montant = parseInt(montant);
montant.toLocaleString();
return montant.toLocaleString();
}
function afficher_detail_generartionbon(idgenerationbon)
{
if (idgenerationbon>"")
{
window.location.assign($("#racineWeb" ).val()+"Detailgenerationbon/"+idgenerationbon+"/");
}
}
function afficher_tarifoptique()
{
var div_detail = $('#div_detail');
codeTarifOptique=$("#codeTarifOptique").val();
libelleOptique=$("#libelleOptique").val();
if(codeTarifOptique<=' ')
{
v_msg="Veuillez sélectionner un tarif!";
v_msgEng="Please select a rate!";
alert_ebene(v_msg, v_msgEng);
$("#codeTarifOptique").focus();
return;
}
/*
if(libelleOptique<=' ')
{
v_msg="Veuillez saisir un nom!";
v_msgEng="Please enter a name!";
alert_ebene(v_msg, v_msgEng);
$("#libelleOptique").focus();
return;
}
*/
donnees = 'codeTarifOptique='+codeTarifOptique+'&libelleOptique='+libelleOptique;
div_detail.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxtarifoptique/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_detail").html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function()
{
}
});
}
function maj_tarifoptique(idDetail, prix)
{
donnees = 'idDetail='+idDetail+"&prix="+prix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxtarifoptique/maj/",
type: 'POST',
data: donnees,
success: function(data) {
},
complete: function(data)
{
}
});
}
function supprimer_espace_nombre(nombre)
{
// nombre = nombre.replace(" ", "");
nombre = nombre.replace(/ /g, "");
if(isNaN(nombre))
{
v_msg = nombre+" n\'est pas un nombre!";
v_msgEng = nombre+" is not a number!";
alert_ebene(v_msg, v_msgEng);
return '0';
}
nombre = parseInt(nombre);
return nombre;
}
function afficher_tarifpharmacie()
{
var div_detail = $('#div_detail');
codeTarifMedicament=$("#codeTarifMedicament").val();
libelleMedicament=$("#libelleMedicament").val();
if(codeTarifMedicament<=' ')
{
v_msg="Veuillez sélectionner un tarif!";
v_msgEng="Please select a rate!";
alert_ebene(v_msg, v_msgEng);
$("#codeTarifMedicament").focus();
return;
}
if(libelleMedicament<=' ')
{
v_msg="Veuillez indiquer le nom!";
v_msgEng="Please enter the name!";
alert_ebene(v_msg, v_msgEng);
$("#libelleMedicament").focus();
return;
}
donnees = 'codeTarifMedicament='+codeTarifMedicament+'&libelleMedicament='+libelleMedicament;
div_detail.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxtarifmedicament/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_detail").html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function()
{
}
});
}
function maj_tarifpharmacie(idDetail, prix)
{
donnees = 'idDetail='+idDetail+"&prix="+prix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxtarifmedicament/maj/",
type: 'POST',
data: donnees,
success: function(data) {
},
complete: function(data)
{
}
});
}
function afficher_tarifacte()
{
var div_detail = $('#div_detail');
codeTarifActe=$("#codeTarifActe").val();
libelleActe=$("#libelleActe").val();
if(codeTarifActe<=' ')
{
v_msg="Veuillez sélectionner un tarif!";
v_msgEng="Please select a rate!";
alert_ebene(v_msg, v_msgEng);
$("#codeTarifActe").focus();
return;
}
if(libelleActe<=' ')
{
v_msg="Veuillez indiquer le nom!";
v_msgEng="Please enter the name!";
alert_ebene(v_msg, v_msgEng);
$("#libelleActe").focus();
return;
}
donnees = 'codeTarifActe='+codeTarifActe+'&libelleActe='+libelleActe;
div_detail.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxtarifacte/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_detail").html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function()
{
}
});
}
function maj_tarifacte(idDetail, prix)
{
donnees = 'idDetail='+idDetail+"&prix="+prix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxtarifacte/maj/",
type: 'POST',
data: donnees,
success: function(data) {
},
complete: function(data)
{
}
});
}
function gestiondiverses()
{
adminDiv = $("#adminDiv").val();
if (adminDiv!="1")
{
v_msg="Accès refusé!";
v_msgEng="Access denied!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb").val()+"Gestiondiverses/");
}
function liste_derogation_beneficiaire()
{
window.location.assign($("#racineWeb" ).val()+"Listederogationsbenficiaire/");
}
function listerderogationbeneficiaire()
{
d1=$("#d1").val();
d2=$("#d2").val();
donnees = 'd1='+d1+'&d2='+d2;
$("#div_derogations").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_derogations").html(data);
},
complete: function() {
}
});
}
function accepter_derogation(idDemandederogation)
{
window.location.assign($("#racineWeb" ).val()+"Accepterderogation/"+idDemandederogation+"/");
}
function refuser_derogation(idDemandederogation)
{
window.location.assign($("#racineWeb" ).val()+"Refuserderogation/"+idDemandederogation+"/");
}
function enregistrerrefusderogation()
{
idDemandederogation = $("#idDemandederogation").val();
motifReel = $("#motifReel").val();
motifRefusAssure = $("#motifRefusAssure").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif réel!";
v_msgEng="Please enter the real reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
if (motifRefusAssure<=" ")
{
v_msg="Veuillez saisir un motif pour l\'assuré!";
v_msgEng="Please enter a reason for the insured!";
$("#motifRefusAssure").focus();
return;
}
v_msg="Confirmez-vous ce refus?";
v_msgEng="Do you confirm this refusal?";
if(confirm_ebene(v_msg, v_msgEng))
{
codePrestataire = $("#codePrestataire").val();
donnees = 'idDemandederogation='+idDemandederogation+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure+'&codePrestataire='+codePrestataire;
donnees_sav = donnees;
typeMail='refusderogation';
typeSms="refusderogation";
$.ajax({
url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/enregistrerrefusderogation/",
type : 'post',
data: donnees,
success: function(data) {
preparesms(typeSms);
},
complete: function() {
v_msg="Refus envoyé avec succès!";
v_msgEng="Disagreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_derogation_beneficiaire();
}
});
}
}
function enregistreraccordderogation()
{
idDemandederogation = $("#idDemandederogation").val();
motifReel = $("#motifReel").val();
debut =$("#debut").val();
fin =$("#fin").val();
codeDerogation = $("#codeDerogation").val();
tmDerogation = $("#tmDerogation").val();
tmDerogation = parseInt(tmDerogation);
codePrestataire = $("#codePrestataire").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif!";
v_msgEng="Please enter the reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
var td0 = $("#datejourfr_C").datepicker("getDate");
var td1 = $("#debut").datepicker("getDate");
var td2 = $("#fin").datepicker("getDate");
dt0=Math.round(Date.parse(td0)/(1000*3600*24));
dt1=Math.round(Date.parse(td1)/(1000*3600*24));
dt2=Math.round(Date.parse(td2)/(1000*3600*24));
if ((dt0>dt1) || dt1>dt2)
{
v_msg="Veuillez revoir les dates!";
v_msgEng="Please review the dates!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (codeDerogation=="01" && tmDerogation<=0)
{
v_msg="Veuillez saisir le ticket modérateur!";
v_msgEng="Please enter the user fees!";
alert_ebene(v_msg, v_msgEng);
$("#tmDerogation").focus();
return;
}
v_msg="Confirmez-vous cet accord?";
v_msgEng="Do you confirm this agreement?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idDemandederogation='+idDemandederogation+'&motifReel='+motifReel+'&debut='+debut+'&fin='+fin;
donnees += '&codeDerogation='+codeDerogation+'&tmDerogation='+tmDerogation+'&codePrestataire='+codePrestataire;
donnees_sav = donnees;
typeMail='accordderogation';
typeSms = "accordderogation";
$.ajax({
url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/enregistreraccordderogation/",
type : 'post',
data: donnees,
success: function(data)
{
preparesms(typeSms);
},
complete: function() {
v_msg="Accord envoyé avec succès!";
v_msgEng="Agreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_derogation_beneficiaire();
}
});
}
}
function listerderogations()
{
codePrestataire=$("#codePrestataire").val();
codeDerogation=$("#codeDerogation").val();
codeReponseDerogation=$("#codeReponseDerogation").val();
debut=$("#debut").val();
fin=$("#fin").val();
donnees = 'codePrestataire='+codePrestataire+'&codeDerogation='+codeDerogation+'&codeReponseDerogation='+codeReponseDerogation;
donnees += '&debut='+debut+'&fin='+fin;
$("#div_derogations").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxderogations/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_derogations").html(data);
},
complete: function() {
}
});
}
function accepter_derogation_2(idDemandederogation)
{
window.location.assign($("#racineWeb" ).val()+"Accepterderogations/"+idDemandederogation+"/");
}
function refuser_derogation_2(idDemandederogation)
{
window.location.assign($("#racineWeb" ).val()+"Refuserderogations/"+idDemandederogation+"/");
}
function enregistrerrefusderogation_2()
{
idDemandederogation = $("#idDemandederogation").val();
motifReel = $("#motifReel").val();
motifRefusAssure = $("#motifRefusAssure").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif réel!";
v_msgEng="Please enter the real reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
if (motifRefusAssure<=" ")
{
v_msg="Veuillez saisir un motif pour l\'assuré!";
v_msgEng="Please enter a reason for the insured!";
alert_ebene(v_msg, v_msgEng);
$("#motifRefusAssure").focus();
return;
}
v_msg="Confirmez-vous ce refus?";
v_msgEng="Do you confirm this refusal?";
if(confirm_ebene(v_msg, v_msgEng))
{
codePrestataire = $("#codePrestataire").val();
donnees = 'idDemandederogation='+idDemandederogation+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure+'&codePrestataire='+codePrestataire;
donnees_sav = donnees;
typeMail='refusderogation';
typeSms="refusderogation";
$.ajax({
url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/enregistrerrefusderogation/",
type : 'post',
data: donnees,
success: function(data) {
preparesms(typeSms);
},
complete: function() {
v_msg="Refus envoyé avec succès!";
v_msgEng="Disagreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_derogations();
}
});
}
}
function enregistreraccordderogation_2()
{
idDemandederogation = $("#idDemandederogation").val();
motifReel = $("#motifReel").val();
debut = $("#debut").val();
fin = $("#fin").val();
codeDerogation = $("#codeDerogation").val();
tmDerogation = $("#tmDerogation").val();
tmDerogation = parseInt(tmDerogation);
codePrestataire = $("#codePrestataire").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif!";
v_msgEng="Please enter the reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
var td0 = $("#datejourfr_C").datepicker("getDate");
var td1 = $("#debut").datepicker("getDate");
var td2 = $("#fin").datepicker("getDate");
dt0=Math.round(Date.parse(td0)/(1000*3600*24));
dt1=Math.round(Date.parse(td1)/(1000*3600*24));
dt2=Math.round(Date.parse(td2)/(1000*3600*24));
if (dt0>dt1 || dt1>dt2)
{
v_msg="Veuillez revoir les dates!";
v_msgEng="Please review the dates!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (codeDerogation=="01" && tmDerogation<=0)
{
v_msg="Veuillez saisir le ticket modérateur!";
v_msgEng="Please enter the user fees!";
alert_ebene(v_msg, v_msgEng);
$("#tmDerogation").focus();
return;
}
v_msg="Confirmez-vous cet accord?";
v_msgEng="Do you confirm this agreement?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idDemandederogation='+idDemandederogation+'&motifReel='+motifReel+'&debut='+debut+'&fin='+fin;
donnees += '&codeDerogation='+codeDerogation+'&tmDerogation='+tmDerogation+'&codePrestataire='+codePrestataire;
donnees_sav = donnees;
typeMail='accordderogation';
typeSms = "accordderogation";
$.ajax({
url: $("#racineWeb").val()+"Ajaxderogationsbenficiaire/enregistreraccordderogation/",
type : 'post',
data: donnees,
success: function(data)
{
preparesms(typeSms);
},
complete: function() {
v_msg="Accord envoyé avec succès!";
v_msgEng="Agreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_derogations();
}
});
}
}
function liste_derogations()
{
window.location.assign($("#racineWeb" ).val()+"Listederogations/");
}
function prestations()
{
if ($("#idBeneficiaire_C" ).val()>"")
{
window.location.assign($("#racineWeb" ).val()+"Prestations/"+$("#idBeneficiaire_C" ).val()+"/");
}
}
function dossiers()
{
window.location.assign($("#racineWeb" ).val()+"Dossiers/");
}
function factures()
{
window.location.assign($("#racineWeb" ).val()+"Factures/");
}
function listerdossier()
{
d1=$("#d1").val();
d2=$("#d2").val();
donnees = 'd1='+d1+'&d2='+d2;
$("#div_dossiers").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdossiers/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_dossiers").html(data);
},
complete: function() {
}
});
}
function selectionner_feuille_maladie(no)
{
$("#numeroFeuilleMaladie_C" ).val(no);
}
function selectionner_facture(idFacture)
{
$("#idFacture_C" ).val(idFacture);
}
function afficher_feuille_maladie()
{
numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C" ).val();
if (numeroFeuilleMaladie>"")
{
ajax_context_feuille_maladie_afficher(numeroFeuilleMaladie);
}
}
function ajax_context_feuille_maladie_afficher(numeroFeuilleMaladie)
{
donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/",
type : 'post',
data: donnees,
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Feuillemaladiecons/");
}
});
}
function afficher_facture()
{
idFacture=$("#idFacture_C" ).val();
if (idFacture>"")
{
ajax_context_facture_afficher(idFacture);
}
}
function ajax_context_facture_afficher(idFacture)
{
donnees = 'idFacture='+idFacture;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextfacture/",
type : 'post',
data: donnees,
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Facture/");
}
});
}
function listerfacture()
{
d1=$("#d1").val();
d2=$("#d2").val();
donnees = 'd1='+d1+'&d2='+d2;
$("#div_dossiers").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxfactures/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_dossiers").html(data);
},
complete: function() {
}
});
}
function sinistres()
{
adminDiv = $("#adminDiv").val();
if (adminDiv!="1")
{
v_msg="Accès refusé!";
v_msgEng="Access denied!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb").val()+"Rechercheprestations/");
}
function afficher_pharmacie(numeroBonOrdonnance, codePrestataireLivraison)
{
donnees = 'numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextpharmaciencien/",
type : 'post',
data: donnees,
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Pharmaciencons/");
}
});
}
function afficher_optique(numeroBonOptique, codePrestataireLivraison)
{
donnees = 'numeroBonOptique='+numeroBonOptique+'&codePrestataireLivraison='+codePrestataireLivraison;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextopticien/",
type : 'post',
data: donnees,
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Opticiencons/");
}
});
}
function fraisfuneraire()
{
window.location.assign($("#racineWeb" ).val()+"Fraisfuneraire/");
}
function demanderfraisfuneraire()
{
fraisFuneraireDemande=$("#fraisFuneraireDemande_C").val();
if (fraisFuneraireDemande==1)
{
v_msg="Déjà effectuée!";
v_msgEng="Already done!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Demandefraisfuneraire/");
}
function modifierdemanderfraisfuneraire()
{
fraisFuneraireDemande=$("#fraisFuneraireDemande_C").val();
fraisFunerairePaye=$("#fraisFunerairePaye_C").val();
if (fraisFuneraireDemande!=1)
{
v_msg="Aucune demande en cours!";
v_msgEng="No request in progress!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (fraisFunerairePaye==1)
{
v_msg="Déjà payé!";
v_msgEng="Already paid!";
alert_ebene(v_msg, v_msgEng);
return;
}
demandeReglement=$("#demandeReglement").val();
demandeReglement = parseInt(demandeReglement);
if (demandeReglement==1)
{
v_msg="Déjà effectuée!";
v_msgEng="Already done!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Modifierfraisfuneraire/");
}
function payerfraisfuneraire()
{
fraisFuneraireDemande=$("#fraisFuneraireDemande_C").val();
fraisFunerairePaye=$("#fraisFunerairePaye_C").val();
if (fraisFuneraireDemande!=1)
{
v_msg="Aucune demande en cours!";
v_msgEng="No request in progress!";
alert_ebene(v_msg, v_msgEng);
return;
}
demandeReglement=$("#demandeReglement").val();
demandeReglement = parseInt(demandeReglement);
if (demandeReglement==0)
{
v_msg="Aucune Demande de Règlement!";
v_msgEng="No request in progress!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (fraisFunerairePaye==1)
{
v_msg="Déjà payé!";
v_msgEng="Already paid!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Payerfraisfuneraire/");
}
function enregistrerdemandefraisfuneraire()
{
enVigueur=$("#enVigueur_C").val();
codeEtatBeneficiaire=$("#codeEtatBeneficiaire_C").val();
etatbeneficiaire=$("#etatbeneficiaire_C").val();
if (enVigueur!="1")
{
v_msg="Attention! cette personne n'est pas en vigueur,";
v_msgEng="Warning! This person is not in force,";
alert_ebene(v_msg, v_msgEng);
return;
}
/*
if (codeEtatBeneficiaire!="V")
{
v_msg="Attention! "+etatbeneficiaire;
v_msgEng="Warning! "+etatbeneficiaire;
alert_ebene(v_msg, v_msgEng);
return;
}
*/
demandeur = $("#demandeur").val();
codeLienDemandeur = $("#codeLienDemandeur").val();
causeDeces = $("#causeDeces").val();
dateDeces=$("#dateDeces").val();
beneficiaireReglement = $("#beneficiaireReglement").val();
codeLienBeneficiaire = $("#codeLienBeneficiaire").val();
observations = $("#observations").val();
fraisReel = $("#fraisReel").val();
montantApayer = $("#montantApayer").val();
codeModePaiementDemande = $("#codeModePaiementDemande").val();
codeBanqueBeneficiaire = $("#codeBanqueBeneficiaire").val();
numeroCompteBeneficiaire = $("#numeroCompteBeneficiaire").val();
if (demandeur<=" ")
{
v_msg="Veuillez saisir le nom du demandeur!";
v_msgEng="Please enter the name of the payment requestor";
alert_ebene(v_msg, v_msgEng);
$("#demandeur").focus();
return;
}
if (codeLienDemandeur<=" ")
{
v_msg="Veuillez sélectionner le lien de parenté avec le demandeur!";
v_msgEng="Please select the relationship with the requestor!";
alert_ebene(v_msg, v_msgEng);
$("#codeLienDemandeur").focus();
return;
}
if (causeDeces<=" ")
{
v_msg="Veuillez saisir la cause du décès!";
v_msgEng="Please enter the cause of death";
alert_ebene(v_msg, v_msgEng);
$("#causeDeces").focus();
return;
}
if (dateDeces<=" ")
{
v_msg="Veuillez saisir la date du décès!";
v_msgEng="Please enter the date of death!";
alert_ebene(v_msg, v_msgEng);
$("#dateDeces").focus();
return;
}
if (beneficiaireReglement<=" ")
{
v_msg="Veuillez saisir le nom du bénéficiaire du règlement!";
v_msgEng="Please enter the name of the payee!";
alert_ebene(v_msg, v_msgEng);
$("#beneficiaireReglement").focus();
return;
}
if (codeLienBeneficiaire<=" ")
{
v_msg="Veuillez sélectionner le lien avec le bénéficiaire du règlement!";
v_msgEng="Please select the relationship with the payee!";
alert_ebene(v_msg, v_msgEng);
$("#codeLienBeneficiaire").focus();
return;
}
if(montantApayer<=" ")
{
montantApayer = "0";
}
if(montantApayer==0)
{
v_msg="Veuillez revoir le montant!";
v_msgEng="Please review the amount!";
alert_ebene(v_msg, v_msgEng);
$("#montantApayer").focus();
return;
}
if (codeModePaiementDemande<=" ")
{
v_msg="Veuillez sélectionner le mode de paiement!";
v_msgEng="Please select the payment method!";
alert_ebene(v_msg, v_msgEng);
$("#codeModePaiementDemande").focus();
return;
}
if (codeModePaiementDemande=="VR")
{
if (codeBanqueBeneficiaire<=" ")
{
v_msg="Veuillez sélectionner la banque du bénéficiaire!";
v_msgEng="Please select the beneficiary\'s bank!";
alert_ebene(v_msg, v_msgEng);
$("#codeBanqueBeneficiaire").focus();
return;
}
if (numeroCompteBeneficiaire<=" ")
{
v_msg="Veuillez saisir le No de compte du bénéficiaire!";
v_msgEng="Please enter the beneficiary\'s account number";
alert_ebene(v_msg, v_msgEng);
$("#numeroCompteBeneficiaire").focus();
return;
}
}
dateEffetPolice = $("#dateEffetPolice_C").val();
dateEcheancePolice = $("#dateEcheancePolice_C").val();
// var td0 = new Date(dateEffetPolice);
dateEntreeBeneficiaire= $("#dateEntreeBeneficiaire_C").val();
var td0 = new Date(dateEntreeBeneficiaire);
var td1 = $("#dateDeces").datepicker("getDate");
var td2 = $("#datejourfr_C").datepicker("getDate");
var td3 = new Date(dateEcheancePolice);
dt0=Math.round(Date.parse(td0)/(1000*3600*24));
dt1=Math.round(Date.parse(td1)/(1000*3600*24));
dt2=Math.round(Date.parse(td2)/(1000*3600*24));
dt3=Math.round(Date.parse(td3)/(1000*3600*24));
if (dt1>dt2)
{
v_msg="Veuillez revoir la date!";
v_msgEng="Please review the date!";
alert_ebene(v_msg, v_msgEng);
$("#dateDeces").focus();
return;
}
if (dt1>dt3 || dt1<dt0)
// if (dt1>dt3)
{
v_msg="Attention! cette police n'est pas couverte à cette date!";
v_msgEng="Warning! This insurance policy is not valid on this date!";
alert_ebene(v_msg, v_msgEng);
return;
}
dateSortieBeneficiaire = $("#dateSortieBeneficiaire_C").val();
var tdd = new Date(dateSortieBeneficiaire);
dtd = Math.round(Date.parse(tdd)/(1000*3600*24));
if(dateSortieBeneficiaire>"2000-01-01")
{
if (dt1>dtd)
{
v_msg="Attention! cette personne n'est pas couverte à cette date!";
v_msgEng="Warning! This person is not valid on this date!";
alert_ebene(v_msg, v_msgEng);
return false;
}
}
v_msg="Confirmez-vous cette demande de frais funéraires?";
v_msgEng="Do you confirm this request for funeral fees?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'demandeur='+demandeur+'&codeLienDemandeur='+codeLienDemandeur;
donnees += '&beneficiaireReglement='+beneficiaireReglement+'&codeLienBeneficiaire='+codeLienBeneficiaire;
donnees += '&fraisReel='+fraisReel+'&montantApayer='+montantApayer;
donnees += '&causeDeces='+causeDeces+'&dateDeces='+dateDeces;
donnees += '&observations='+observations;
donnees += '&codeModePaiementDemande='+codeModePaiementDemande;
donnees += '&codeBanqueBeneficiaire='+codeBanqueBeneficiaire+'&numeroCompteBeneficiaire='+numeroCompteBeneficiaire;
donnees_sav = donnees;
typeMail='fraisfuneraire';
$.ajax({
url: $("#racineWeb").val()+"Ajaxenregistrerdemandefraisfuneraire/enregistrerdemandefraisfuneraire/",
type : 'post',
data: donnees,
success: function(data) {
v_msg="Opération effectuée avec succès!";
v_msgEng="Operation successfully completed";
alert_ebene(v_msg, v_msgEng);
},
complete: function() {
fraisfuneraire();
}
});
}
}
function listerfraisfuneraires()
{
}
function enregistrermodificationsfraisfuneraire()
{
idFraisfuneraire = $("#idFraisfuneraire").val();
demandeur = $("#demandeur").val();
codeLienDemandeur = $("#codeLienDemandeur").val();
causeDeces = $("#causeDeces").val();
dateDeces=$("#dateDeces").val();
beneficiaireReglement = $("#beneficiaireReglement").val();
codeLienBeneficiaire = $("#codeLienBeneficiaire").val();
observations = $("#observations").val();
fraisReel = $("#fraisReel").val();
montantApayer = $("#montantApayer").val();
codeModePaiementDemande = $("#codeModePaiementDemande").val();
codeBanqueBeneficiaire = $("#codeBanqueBeneficiaire").val();
numeroCompteBeneficiaire = $("#numeroCompteBeneficiaire").val();
if (demandeur<=" ")
{
v_msg="Veuillez saisir le nom du demandeur!";
v_msgEng="Please enter the name of the payment requestor";
alert_ebene(v_msg, v_msgEng);
$("#demandeur").focus();
return;
}
if (codeLienDemandeur<=" ")
{
v_msg="Veuillez sélectionner le lien de parenté avec le demandeur!";
v_msgEng="Please select the relationship with the requestor!";
alert_ebene(v_msg, v_msgEng);
$("#codeLienDemandeur").focus();
return;
}
if (causeDeces<=" ")
{
v_msg="Veuillez saisir la cause du décès!";
v_msgEng="Please enter the cause of death";
alert_ebene(v_msg, v_msgEng);
$("#causeDeces").focus();
return;
}
if (dateDeces<=" ")
{
v_msg="Veuillez saisir la date du décès!";
v_msgEng="Please enter the date of death!";
alert_ebene(v_msg, v_msgEng);
$("#dateDeces").focus();
return;
}
if (beneficiaireReglement<=" ")
{
v_msg="Veuillez saisir le nom du bénéficiaire du règlement!";
v_msgEng="Please enter the name of the payee!";
alert_ebene(v_msg, v_msgEng);
$("#beneficiaireReglement").focus();
return;
}
if (codeLienBeneficiaire<=" ")
{
v_msg="Veuillez sélectionner le lien avec le bénéficiaire du règlement!";
v_msgEng="Please select the relationship with the payee!";
alert_ebene(v_msg, v_msgEng);
$("#codeLienBeneficiaire").focus();
return;
}
if (codeModePaiementDemande<=" ")
{
v_msg="Veuillez sélectionner le mode de paiement!";
v_msgEng="Please select the payment method!";
alert_ebene(v_msg, v_msgEng);
$("#codeModePaiementDemande").focus();
return;
}
if (codeModePaiementDemande=="VR")
{
if (codeBanqueBeneficiaire<=" ")
{
v_msg="Veuillez sélectionner la banque du bénéficiaire!";
v_msgEng="Please select the beneficiary\'s bank!";
alert_ebene(v_msg, v_msgEng);
$("#codeBanqueBeneficiaire").focus();
return;
}
if (numeroCompteBeneficiaire<=" ")
{
v_msg="Veuillez saisir le No de compte du bénéficiaire!";
v_msgEng="Please enter the beneficiary\'s account number";
alert_ebene(v_msg, v_msgEng);
$("#numeroCompteBeneficiaire").focus();
return;
}
}
if(montantApayer<=" ")
{
montantApayer = "0";
}
if(montantApayer==0)
{
v_msg="Veuillez revoir le montant!";
v_msgEng="Please review the amount!";
alert_ebene(v_msg, v_msgEng);
$("#montantApayer").focus();
return;
}
dateEffetPolice = $("#dateEffetPolice_C").val();
dateEcheancePolice=$("#dateEcheancePolice_C").val();
// var td0 = new Date(dateEffetPolice);
dateEntreeBeneficiaire= $("#dateEntreeBeneficiaire_C").val();
var td0 = new Date(dateEntreeBeneficiaire);
var td1 = $("#dateDeces").datepicker("getDate");
var td2 = $("#datejourfr_C").datepicker("getDate");
var td3 = new Date(dateEcheancePolice);
dt0=Math.round(Date.parse(td0)/(1000*3600*24));
dt1=Math.round(Date.parse(td1)/(1000*3600*24));
dt2=Math.round(Date.parse(td2)/(1000*3600*24));
dt3=Math.round(Date.parse(td3)/(1000*3600*24));
if (dt1>dt2)
{
v_msg="Veuillez revoir la date de consultation!";
v_msgEng="Please review the date!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt1>dt3 || dt1<dt0)
// if (dt1>dt3)
{
v_msg="Attention! cette police n'est pas couverte à cette date!";
v_msgEng="Warning! This insurance policy is not valid on this date!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous ces modifications?";
v_msgEng="Do you confirm these modifications?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'demandeur='+demandeur+'&codeLienDemandeur='+codeLienDemandeur;
donnees += '&beneficiaireReglement='+beneficiaireReglement+'&codeLienBeneficiaire='+codeLienBeneficiaire;
donnees += '&fraisReel='+fraisReel+'&montantApayer='+montantApayer;
donnees += '&causeDeces='+causeDeces+'&dateDeces='+dateDeces;
donnees += '&observations='+observations+'&idFraisfuneraire='+idFraisfuneraire;
donnees += '&codeModePaiementDemande='+codeModePaiementDemande;
donnees += '&codeBanqueBeneficiaire='+codeBanqueBeneficiaire+'&numeroCompteBeneficiaire='+numeroCompteBeneficiaire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxenregistrerdemandefraisfuneraire/enregistrermodificationsfraisfuneraire/",
type : 'post',
data: donnees,
success: function(data) {
v_msg="Modifications effectuées avec succès!";
v_msgEng="Changes made successfully!";
alert_ebene(v_msg, v_msgEng);
},
complete: function() {
fraisfuneraire()
}
});
}
}
function initierdecompte()
{
codePeriodeMax = $("#codePeriodeMax").val();
codePrestataire=$("#codePrestataire").val();
codeExercice=$("#codeExercice").val();
codeMois=$("#codeMois").val();
if (codePrestataire<=" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
$("#codePrestataire").focus();
return;
}
if (codeExercice<=" ")
{
v_msg="Veuillez sélectionner un exercice!";
v_msgEng="Please select an exercise!";
alert_ebene(v_msg, v_msgEng);
$("#codeExercice").focus();
return;
}
if (codeMois<=" ")
{
v_msg="Veuillez sélectionner une période!";
v_msgEng="Please select a period!";
alert_ebene(v_msg, v_msgEng);
$("#codeMois").focus();
return;
}
codePeriodeCourant = codeExercice+codeMois;
if (codePeriodeCourant>codePeriodeMax)
{
v_msg="Veuillez revoir la période!";
v_msgEng="Please review the period!";
alert_ebene(v_msg, v_msgEng);
$("#codeMois").focus();
return;
}
donnees = 'codePrestataire='+codePrestataire+'&codeExercice='+codeExercice+'&codeMois='+codeMois;
var div_wait = $('#div_wait');
div_wait.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/initierdecompte/",
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 || regle==2 || regle==3 || regle==8)
{
afficherdecompte();
}
else
{
// 9 => Décompte validé mais en attente de règlemen
// 1 => Décompte réglé
consulterdecompte();
}
}
});
}
function liste_decompte()
{
window.location.assign($("#racineWeb" ).val()+"Listedecomptes/");
}
function decompte()
{
window.location.assign($("#racineWeb" ).val()+"Initdecompte/");
}
function afficherdecompte()
{
window.location.assign($("#racineWeb" ).val()+"Decompte/");
}
function re_afficherdecompte()
{
$("#detail_reglement").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
window.location.assign($("#racineWeb" ).val()+"Decompte/");
}
function rechargerfacture()
{
$("#detail_reglement").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/rechargerfacture/",
type : 'post',
success: function(data) {
afficherdecompte();
},
complete: function() {
}
});
}
function reinitialiserdecompte()
{
v_msg="Remettre le décompte à zéro. Confirmez-vous cette opération?";
v_msgEng="Reset the counts. Do you confirm this operation?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#detail_reglement").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/reinitialiserdecompte/",
type : 'post',
success: function(data) {
afficherdecompte();
},
complete: function() {
}
});
}
}
function afficher_feuille_maladie_dec()
{
numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val();
if (numeroFeuilleMaladie>"")
{
ajax_context_feuille_maladie_afficher_dec(numeroFeuilleMaladie);
}
}
function ajax_context_feuille_maladie_afficher_dec(numeroFeuilleMaladie)
{
donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/",
type : 'post',
data: donnees,
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Feuillemaladiedec/");
}
});
}
function afficher_optique_dec(numeroBonOptique, codePrestataireLivraison)
{
donnees = 'numeroBonOptique='+numeroBonOptique+'&codePrestataireLivraison='+codePrestataireLivraison;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextopticien/",
type : 'post',
data: donnees,
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Opticiendec/");
}
});
}
function afficher_pharmacie_dec(numeroBonOrdonnance, codePrestataireLivraison)
{
donnees = 'numeroBonOrdonnance='+numeroBonOrdonnance+'&codePrestataireLivraison='+codePrestataireLivraison;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextpharmaciencien/",
type : 'post',
data: donnees,
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Pharmaciendec/");
}
});
}
function maj_montantForce(idFacture, montantForce)
{
donnees = 'idFacture='+idFacture+"&montantForce="+montantForce;
$.ajax({
url: $("#racineWeb").val()+"Ajaxentetedecompte/majmontantforce/",
type: 'POST',
data: donnees,
success: function(data) {
$("#reglement").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function afficherfacturenoncharge()
{
}
function afficherfactureattente()
{
}
function valider_facture(idFacture, numeroFeuilleMaladie, p_choix, codeTypeFacture)
{
donnees = 'idFacture='+idFacture+'&choix='+p_choix+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&codeTypeFacture='+codeTypeFacture;
var ctrl_montantForce = $("#montantForce"+idFacture);
var ctrl_montantApayer = $("#montantApayer"+idFacture);
var ctrl_montantRedresse = $("#montantRedresse"+idFacture);
$.ajax({
url: $("#racineWeb").val()+"Ajaxvaliderfacture/validerfacture/",
type: 'POST',
data: donnees,
success: function(data) {
$("#reglement").html(data);
montantForce_val = $("#montantForce_val").val();
montantApayer_val = $("#montantApayer_val").val();
montantRedresse_val = $("#montantRedresse_val").val();
montantRedresse_sans_format = $("#montantRedresse_sans_format").val();
observations_val = $("#observations_val").val();
ctrl_montantForce.html(montantForce_val);
c_html = "<input class='form-control btn btn-primary' onclick='javascript:verifier_feuille_maladie_dec("+numeroFeuilleMaladie+", "+idFacture+', "'+codeTypeFacture+'");'+"' type='button' value='"+montantApayer_val+"'> ";
ctrl_montantApayer.html(c_html);
ctrl_montantRedresse.html(montantRedresse_val);
},
error: function(data) {
},
complete: function()
{
// alert("p_choix2 => "+p_choix);
if ( (montantRedresse_sans_format!=0) && (observations_val<=" ") || (p_choix=="2"))
{
maj_observations_facture(idFacture, observations_val);
}
}
});
}
function maj_observations_facture(idFacture, observations)
{
v_msg="Veuillez saisir ou modifier les observations!";
v_msgEng="Please enter or edit comments!";
observations = prompt_ebene(v_msg, v_msgEng, observations);
if(observations==null)
{
return;
}
v_msg="Confirmez-vous ces modifications?";
v_msgEng="Do you confirm these modifications?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idFacture='+idFacture+"&observations="+observations;
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/majobservations/",
type: 'POST',
data: donnees,
complete: function() {
}
});
}
}
function afficher_div_wait()
{
$("#div_wait").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
}
function effacer_div_wait()
{
$("#div_wait").html("");
}
function rechercheprestations_form()
{
$("#frmrechercheprestation").submit();
}
function consulterdecompte()
{
// detail_reglement
var div_wait = $('#detail_reglement');
div_wait.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
window.location.assign($("#racineWeb" ).val()+"Decomptecons/");
}
function maj_bordereau_decompte(idReglement, numeroBordereau)
{
v_msg="Veuillez saisir ou modifier le No de bordereau!";
v_msgEng="Please enter or modify the slip number!";
numeroBordereau = prompt_ebene(v_msg, v_msgEng, numeroBordereau);
if(numeroBordereau==null)
{
return;
}
v_msg="Confirmez-vous ces modifications?";
v_msgEng="Do you confirm these modifications?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idReglement='+idReglement+"&numeroBordereau="+numeroBordereau;
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/majbordereaudecompte/",
type: 'POST',
data: donnees,
success: function(data) {
$("#numeroBordereauDecompte").val(numeroBordereau);
},
error: function(data) {
},
complete: function() {
}
});
}
}
function validerdecompte_premier()
{
/*
0 Décompte en cours
2 Attente Valid. prestat. / Waiting for provider s valid.
3 Validé par le prestataire
8 Pas besoin de valid prestat / Provid valid not needed
9 En attente de règelment
1 Réglé / Payé
*/
regle=$("#regle").val();
regle = parseInt(regle);
if (regle>0)
{
v_msg="1ère validation déjà effectuée!";
v_msgEng="1st validation already done!";
alert_ebene(v_msg, v_msgEng);
return;
}
if ($("#montantApayer").val()<="0")
{
v_msg="Rien à valider!";
v_msgEng="Nothing to validate!";
alert_ebene(v_msg, v_msgEng);
return;
}
nbNonTraite = $("#nbNonTraite").val();
if (nbNonTraite!="0")
{
v_msg="Vous avez "+nbNonTraite+" facture(s) non traitée(s)!";
v_msgEng="You have "+nbNonTraite+" bill(s) not processed!";
alert_ebene(v_msg, v_msgEng);
return;
}
montantPrestataire = $("#montantPrestataire").val();
if (montantPrestataire<="0")
{
v_msg="Veuillez indiquer le montant réclamé par le prestataire! => Réception facture";
v_msgEng="Please indicate the amount claimed by the provider! => Invoice receipt";
alert_ebene(v_msg, v_msgEng);
$('#btn_pop_reception').click();
return;
}
nbExclues = $("#nbExclues").val();
if (nbExclues<="0")
{
v_msg="Confirmez-vous qu'il n'y a pas de factures à exclure?";
v_msgEng="Do you confirm that there are no invoices to exclude?";
if(!confirm_ebene(v_msg, v_msgEng))
{
return;
}
}
v_msg="Confirmez-vous la 1ère validation?";
v_msgEng="Do you confirm the 1st validation?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#detail_reglement").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/validerdecomptepremier/",
type : 'post',
success: function(data) {
prestataire = $("#prestataire").val();
numeroDecompte = $("#numeroDecompte").val();
numeroLotDecompte = $("#numeroLotDecompte").val();
periode = $("#periode").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Decompte : Attente Valid. prestat. / Waiting for provider valid.";
p_message += "\n";
p_message += "Periode : "+periode;
p_message += "\n";
p_message += "No Decompte : "+numeroDecompte;
p_message += "\n";
p_message += "No Lot : "+numeroLotDecompte;
envoyer_messagerie(p_message, "0");
},
complete: function()
{
v_msg="Validation terminée avec succès!";
v_msgEng="Validation successfully completed";
alert_ebene(v_msg, v_msgEng);
afficherdecompte();
}
});
}
}
function validerdecompte()
{
/*
0 Décompte en cours
2 Attente Valid. prestat. / Waiting for provider s valid.
3 Validé par le prestataire
8 Pas besoin de valid prestat / Provid valid not needed
9 En attente de règelment
1 Réglé / Payé
*/
regle=$("#regle").val();
regle = parseInt(regle);
if (regle==0)
{
v_msg="Veuillez procéder à la 1ère validation!";
v_msgEng="Please proceed to the 1st validation!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (regle==2)
{
v_msg="En attente de la validation du prestataire!";
v_msgEng="Waiting for the validation of the provider!";
alert_ebene(v_msg, v_msgEng);
return;
}
if ($("#montantApayer").val()<="0")
{
v_msg="Rien à valider!";
v_msgEng="Nothing to validate!";
alert_ebene(v_msg, v_msgEng);
return;
}
if ( (regle==3) || (regle==8) )
{
v_msg="Confirmez-vous la 2ème validation?";
v_msgEng="Do you confirm the 2nd validation?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#detail_reglement").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/validerdecompte/",
type : 'post',
error: function(errorData) {
},
success: function(data) {
},
complete: function()
{
v_msg="Validation terminée avec succès!";
v_msgEng="Validation successfully completed";
alert_ebene(v_msg, v_msgEng);
consulterdecompte();
}
});
}
}
}
function afficher_div_wait()
{
$("#div_page_complet").disable();
}
function effacer_div_wait()
{
$("#div_wait").html("");
}
function imprimerbordereaudecompte()
{
idReglement = $("#idReglement").val();
if (idReglement>"0")
{
var div_wait = $('#div_wait');
div_wait.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/imprimerbordereaudecompte",
type: 'POST',
success: function(data)
{
div_wait.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
}
function reglerdecompte()
{
/*
0 Décompte en cours
2 Attente Valid. prestat. / Waiting for provider s valid.
3 Validé par le prestataire
8 Pas besoin de valid prestat / Provid valid not needed
9 En attente de règelment
1 Réglé / Payé
*/
demandeReglement=$("#demandeReglement").val();
demandeReglement = parseInt(demandeReglement);
if (demandeReglement==0)
{
v_msg="Aucune Demande de Règlement!";
v_msgEng="No request in progress!";
alert_ebene(v_msg, v_msgEng);
return;
}
regle=$("#regle").val();
if (regle==1)
{
v_msg="Déjà réglé!";
v_msgEng="Already paid!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Reglerdecompte/");
}
function enregistrerreglementdecompte()
{
idReglement = $("#idReglement").val();
dateComptable = $("#dateComptable").val();
montantPaye = $("#montantPaye").val();
codeModePaiement = $("#codeModePaiement").val();
referencePaiement = $("#referencePaiement").val();
codeBanquePayeur = $("#codeBanquePayeur").val();
if (codeModePaiement<=" ")
{
v_msg="Veuillez sélectionner le mode de paiement!";
v_msgEng="Please select the payment method!";
alert_ebene(v_msg, v_msgEng);
$("#codeModePaiement").focus();
return;
}
if (codeBanquePayeur<=" ")
{
v_msg="Veuillez sélectionner la banque de paiement!";
v_msgEng="Please select the payment bank!";
alert_ebene(v_msg, v_msgEng);
$("#codeBanquePayeur").focus();
return;
}
if (referencePaiement<=" ")
{
v_msg="Veuillez indiquer la référence du paiement!";
v_msgEng="Please enter the payment reference!";
alert_ebene(v_msg, v_msgEng);
$("#referencePaiement").focus();
return;
}
if (dateComptable<=" ")
{
v_msg="Veuillez saisir la date comptable!";
v_msgEng="Please enter the posting date!";
alert_ebene(v_msg, v_msgEng);
$("#dateComptable").focus();
return;
}
if(montantPaye<=" ")
{
montantPaye = "0";
}
if(montantPaye==0)
{
v_msg="Veuillez revoir le montant!";
v_msgEng="Please review the amount!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous ce règelement?";
v_msgEng="Do you confirm this payment?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idReglement='+idReglement+'&codeModePaiement='+codeModePaiement;
donnees += '&referencePaiement='+referencePaiement+'&montantPaye='+montantPaye;
donnees += '&dateComptable='+dateComptable;
donnees += '&codeBanquePayeur='+codeBanquePayeur;
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/enregistrerreglementdecompte/",
type : 'post',
data: donnees,
success: function(data) {
consulterdecompte();
},
complete: function() {
}
});
}
}
function preparesms(typeSms)
{
envoismsactif = $("#envoismsactif").val();
if(envoismsactif=="0")
{
return;
}
codeLangueSociete = $("#codeLangueSociete").val();
p_destinataires = "";
p_message = "";
creation_message = "1";
if (typeSms=="accordderogation")
{
p_destinataires = $("#smsGestionPrestataire").val();
copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val();
if (copieSmsPrestataireAssure=="1")
{
p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires);
}
patient = $("#beneficiaire").val();
numeroBeneficiaire = $("#numeroBeneficiaire" ).val();
prestataire = $("#prestataire").val();
numeroDerogation = $("#numeroDerogation").val();
libelleDerogation = $("#libelleDerogation").val();
tmDerogation = $("#tmDerogation").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Exemption granted for : " : "Derogation accordee pour : ";
p_message += libelleDerogation;
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : ";
p_message += numeroDerogation;
}
if (typeSms=="refusderogation")
{
p_destinataires = $("#smsGestionPrestataire").val();
copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val();
if (copieSmsPrestataireAssure=="1")
{
p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires);
}
patient = $("#beneficiaire").val();
numeroBeneficiaire = $("#numeroBeneficiaire" ).val();
prestataire = $("#prestataire").val();
numeroDerogation = $("#numeroDerogation").val();
libelleDerogation = $("#libelleDerogation").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Exemption refused for : " : "Derogation refusee pour : ";
p_message += libelleDerogation;
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : ";
p_message += numeroDerogation;
}
if (typeSms=="accordententeprealable")
{
p_destinataires = $("#smsGestionPrestataire").val();
copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val();
if (copieSmsPrestataireAssure=="1")
{
p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires);
}
patient = $("#beneficiaire").val();
numeroBeneficiaire = $("#numeroBeneficiaire" ).val();
prestataire = $("#prestataire").val();
numeroEntentePrealable = $("#numeroEntentePrealable").val();
libelleActe = $("#libelleActe").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Act granted : " : "Acte accorde : ";
p_message += libelleActe;
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : ";
p_message += numeroEntentePrealable;
}
if (typeSms=="refusententeprealable")
{
p_destinataires = $("#smsGestionPrestataire").val();
copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val();
if (copieSmsPrestataireAssure=="1")
{
p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires);
}
patient = $("#beneficiaire").val();
numeroBeneficiaire = $("#numeroBeneficiaire" ).val();
prestataire = $("#prestataire").val();
numeroEntentePrealable = $("#numeroEntentePrealable").val();
libelleActe = $("#libelleActe").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Act refused : " : "Acte refuse : ";
p_message += libelleActe;
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : ";
p_message += numeroEntentePrealable;
}
if (typeSms=="refusacteexclu")
{
p_destinataires = $("#smsGestionPrestataire").val();
copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val();
if (copieSmsPrestataireAssure=="1")
{
p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires);
}
patient = $("#beneficiaire").val();
numeroBeneficiaire = $("#numeroBeneficiaire" ).val();
prestataire = $("#prestataire").val();
numeroAutorisation = $("#numeroAutorisation").val();
libelleActe = $("#libelleActe").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
p_message += "\n";
p_message += "Acte refuse : "+libelleActe+" ";
p_message += "\n";
p_message += "No demande : "+numeroAutorisation;
}
if (typeSms=="accordacteexclu")
{
p_destinataires = $("#smsGestionPrestataire").val();
copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val();
if (copieSmsPrestataireAssure=="1")
{
p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires);
}
patient = $("#beneficiaire").val();
numeroBeneficiaire = $("#numeroBeneficiaire" ).val();
prestataire = $("#prestataire").val();
numeroAutorisation = $("#numeroAutorisation").val();
libelleActe = $("#libelleActe").val();
prixTarif = $("#prixTarif").val();
valeurActe = $("#valeurActe").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
p_message += "\n";
p_message += "Acte accorde : "+libelleActe+" ";
p_message += "\n";
p_message +="Tarif convention : "+prixTarif+" FRW ";
p_message +="Tarif accorde : "+valeurActe+" FRW ";
p_message += "No demande : "+numeroAutorisation;
}
if (typeSms=="accordententeprealablepha")
{
p_destinataires = $("#smsGestionPrestataire").val();
copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val();
if (copieSmsPrestataireAssure=="1")
{
p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires);
}
patient = $("#beneficiaire").val();
numeroBeneficiaire = $("#numeroBeneficiaire" ).val();
prestataire = $("#prestataire").val();
numeroEntentePrealable = $("#numeroEntentePrealable").val();
libelleMedicament = $("#libelleMedicament").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Drug granted : " : "Medicament accorde : ";
p_message += libelleMedicament;
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : ";
p_message += numeroEntentePrealable;
}
if (typeSms=="refusententeprealablepha")
{
p_destinataires = $("#smsGestionPrestataire").val();
copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val();
if (copieSmsPrestataireAssure=="1")
{
p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires);
}
patient = $("#beneficiaire").val();
numeroBeneficiaire = $("#numeroBeneficiaire" ).val();
prestataire = $("#prestataire").val();
numeroEntentePrealable = $("#numeroEntentePrealable").val();
libelleMedicament = $("#libelleMedicament").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Drug refused : " : "Medicament refuse : ";
p_message += libelleMedicament;
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : ";
p_message += numeroEntentePrealable;
}
if (typeSms=="accordententeprealableopt")
{
p_destinataires = $("#smsGestionPrestataire").val();
copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val();
if (copieSmsPrestataireAssure=="1")
{
p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires);
}
patient = $("#beneficiaire").val();
numeroBeneficiaire = $("#numeroBeneficiaire" ).val();
prestataire = $("#prestataire").val();
numeroEntentePrealable = $("#numeroEntentePrealable").val();
libelleOptique = $("#libelleOptique").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Glasses granted : " : "Verres accordes : ";
p_message += libelleOptique;
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : ";
p_message += numeroEntentePrealable;
}
if (typeSms=="refusententeprealableopt")
{
p_destinataires = $("#smsGestionPrestataire").val();
copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val();
if (copieSmsPrestataireAssure=="1")
{
p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires);
}
patient = $("#beneficiaire").val();
numeroBeneficiaire = $("#numeroBeneficiaire" ).val();
prestataire = $("#prestataire").val();
numeroEntentePrealable = $("#numeroEntentePrealable").val();
libelleOptique = $("#libelleOptique").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Glasses refused : " : "Verres refuses : ";
p_message += libelleOptique;
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : ";
p_message += numeroEntentePrealable;
}
if (typeSms=="accordententeprealablemont")
{
p_destinataires = $("#smsGestionPrestataire").val();
copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val();
if (copieSmsPrestataireAssure=="1")
{
p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires);
}
patient = $("#beneficiaire").val();
numeroBeneficiaire = $("#numeroBeneficiaire" ).val();
prestataire = $("#prestataire").val();
numeroEntentePrealable = $("#numeroEntentePrealable").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Optical frame : granted" : "Monture accordee";
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : ";
p_message += numeroEntentePrealable;
}
if (typeSms=="refusententeprealablemont")
{
p_destinataires = $("#smsGestionPrestataire").val();
copieSmsPrestataireAssure = $("#copieSmsPrestataireAssure").val();
if (copieSmsPrestataireAssure=="1")
{
p_destinataires = ajouter_destinataire_sms_adherent(p_destinataires);
}
patient = $("#beneficiaire").val();
numeroBeneficiaire = $("#numeroBeneficiaire" ).val();
prestataire = $("#prestataire").val();
numeroEntentePrealable = $("#numeroEntentePrealable").val();
p_message = prestataire+" ";
p_message += "\n";
p_message += "Patient : "+patient+" ("+numeroBeneficiaire+") ";
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Optical frame : refused" : "Monture refuse";
p_message += "\n";
p_message += (codeLangueSociete=="en_US") ? "Request number : " : "No demande : ";
p_message += numeroEntentePrealable;
}
envoyersms(p_destinataires, p_message, creation_message);
}
function liste_ententeprealables()
{
actVisible=$("#actVisible").val();
// if (actVisible!="1" && modeSaisieFacture!="1")
if (actVisible!="1")
{
v_msg="Non autorisée!";
v_msgEng="Not allowed!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Listeententeprealables/");
}
function liste_actes_exclus()
{
window.location.assign($("#racineWeb" ).val()+"Listeexclusions/");
}
function listeententeprealables()
{
codePrestataire=$("#codePrestataire").val();
codeReponseEntentePrealable=$("#codeReponseEntentePrealable").val();
debut=$("#debut").val();
fin=$("#fin").val();
donnees = 'codePrestataire='+codePrestataire+'&codeReponseEntentePrealable='+codeReponseEntentePrealable;
donnees += '&debut='+debut+'&fin='+fin;
$("#div_ententeprealable").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealables/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_ententeprealable").html(data);
},
complete: function() {
}
});
}
function accepter_ententeprealable_2(idDemandeententeprealable, facture)
{
if (facture==1)
{
v_msg="Déjà facturé!";
v_msgEng="Already charged!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Accepterententeprealables/"+idDemandeententeprealable+"/");
}
function refuser_ententeprealable_2(idDemandeententeprealable, facture)
{
if (facture==1)
{
v_msg="Déjà facturé!";
v_msgEng="Already charged!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Refuserententeprealables/"+idDemandeententeprealable+"/");
}
//
function accepter_ententeprealable(idDemandeententeprealable, facture)
{
if (facture==1)
{
v_msg="Déjà facturé!";
v_msgEng="Already charged!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Accepterententeprealable/"+idDemandeententeprealable+"/");
}
function refuser_ententeprealable(idDemandeententeprealable, facture)
{
if (facture==1)
{
v_msg="Déjà facturé!";
v_msgEng="Already charged!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Refuserententeprealable/"+idDemandeententeprealable+"/");
}
function liste_ententeprealable_beneficiaire()
{
window.location.assign($("#racineWeb" ).val()+"Listeententeprealablesbenficiaire/");
}
function liste_actes_exclus_beneficiaire()
{
window.location.assign($("#racineWeb" ).val()+"Listeexclusionsbenficiaire/");
}
function enregistreraccordententepreslable_2()
{
idDemandeententeprealable = $("#idDemandeententeprealable").val();
motifReel = $("#motifReel").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif!";
v_msgEng="Please enter the reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
v_msg="Confirmez-vous cet accord?";
v_msgEng="Do you confirm this agreement?";
if(confirm_ebene(v_msg, v_msgEng))
{
codePrestataire = $("#codePrestataire").val();
donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&codePrestataire='+codePrestataire;
donnees_sav = donnees;
typeMail="accordententeprealable";
typeSms = "accordententeprealable";
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistreraccordententeprealable/",
type : 'post',
data: donnees,
success: function(data) {
preparesms(typeSms);
},
complete: function() {
v_msg="Accord envoyé avec succès!";
v_msgEng="Agreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_ententeprealables();
}
});
}
}
function enregistrerrefusententepreslable_2()
{
idDemandeententeprealable = $("#idDemandeententeprealable").val();
motifReel = $("#motifReel").val();
motifRefusAssure = $("#motifRefusAssure").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif réel!";
v_msgEng="Please enter the real reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
if (motifRefusAssure<=" ")
{
v_msg="Veuillez saisir un motif pour l\'assuré!";
v_msgEng="Please enter a reason for the insured!";
alert_ebene(v_msg, v_msgEng);
$("#motifRefusAssure").focus();
return;
}
v_msg="Confirmez-vous ce refus?";
v_msgEng="Do you confirm this refusal?";
if(confirm_ebene(v_msg, v_msgEng))
{
codePrestataire = $("#codePrestataire").val();
donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure+'&codePrestataire='+codePrestataire;
donnees_sav = donnees;
typeMail='refusententeprealable';
typeSms="refusententeprealable";
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistrerrefusententeprealable/",
type : 'post',
data: donnees,
success: function(data) {
preparesms(typeSms);
},
complete: function() {
v_msg="Refus envoyé avec succès!";
v_msgEng="Disagreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_ententeprealables();
}
});
}
}
function listerententeprealablebeneficiaire()
{
d1=$("#d1").val();
d2=$("#d2").val();
donnees = 'd1='+d1+'&d2='+d2;
$("#div_ententeprealable").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_ententeprealable").html(data);
},
complete: function() {
}
});
}
function enregistreraccordententepreslable()
{
idDemandeententeprealable = $("#idDemandeententeprealable").val();
motifReel = $("#motifReel").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif!";
v_msgEng="Please enter the reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
v_msg="Confirmez-vous cet accord?";
v_msgEng="Do you confirm this agreement?";
if(confirm_ebene(v_msg, v_msgEng))
{
codePrestataire = $("#codePrestataire").val();
donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&codePrestataire='+codePrestataire;
donnees_sav = donnees;
typeMail='accordententeprealable';
typeSms = "accordententeprealable";
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistreraccordententeprealable/",
type : 'post',
data: donnees,
success: function(data) {
preparesms(typeSms);
},
complete: function() {
v_msg="Accord envoyé avec succès!";
v_msgEng="Agreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_ententeprealable_beneficiaire();
}
});
}
}
function enregistrerrefusententepreslable()
{
idDemandeententeprealable = $("#idDemandeententeprealable").val();
motifReel = $("#motifReel").val();
motifRefusAssure = $("#motifRefusAssure").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif réel!";
v_msgEng="Please enter the real reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
if (motifRefusAssure<=" ")
{
v_msg="Veuillez saisir un motif pour l\'assuré!";
v_msgEng="Please enter a reason for the insured!";
alert_ebene(v_msg, v_msgEng);
$("#motifRefusAssure").focus();
return;
}
v_msg="Confirmez-vous ce refus?";
v_msgEng="Do you confirm this refusal?";
if(confirm_ebene(v_msg, v_msgEng))
{
codePrestataire = $("#codePrestataire").val();
donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure+'&codePrestataire='+codePrestataire;
donnees_sav = donnees;
typeMail='refusententeprealable';
typeSms="refusententeprealable";
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistrerrefusententeprealable/",
type : 'post',
data: donnees,
success: function(data) {
preparesms(typeSms);
},
complete: function() {
v_msg="Refus envoyé avec succès!";
v_msgEng="Disagreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_ententeprealable_beneficiaire();
}
});
}
}
function afficher_decompte(idFacture, montantForce)
{
donnees = 'idFacture='+idFacture+"&montantForce="+montantForce;
$.ajax({
url: $("#racineWeb").val()+"Ajaxentetedecompte/majmontantforce/",
type: 'POST',
data: donnees,
success: function(data) {
$("#reglement").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function ctrlkeypress_tarifmedicament(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
afficher_tarifpharmacie();
}
}
function ctrlkeypress_tarifacte(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
afficher_tarifacte();
}
}
function ctrlkeypress_tarifoptique(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
afficher_tarifoptique();
}
}
function consulter_sinistres()
{
window.location.assign($("#racineWeb" ).val()+"Consultations/");
}
function liste_dossiers()
{
window.location.assign($("#racineWeb" ).val()+"Listedossiers/");
}
function liste_factures()
{
window.location.assign($("#racineWeb" ).val()+"Listefactures/");
}
function lister_dossiers()
{
d1 = $("#d1").val();
d2 = $("#d2").val();
codePrestataire = $("#codePrestataire").val();
donnees = 'd1='+d1+'&d2='+d2;
donnees = 'd1='+d1+'&d2='+d2+'&codePrestataire='+codePrestataire;
$("#div_dossiers").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistedossiers/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_dossiers").html(data);
},
complete: function() {
}
});
}
function lister_factures()
{
d1 = $("#d1").val();
d2 = $("#d2").val();
codePrestataire = $("#codePrestataire").val();
donnees = 'd1='+d1+'&d2='+d2;
donnees = 'd1='+d1+'&d2='+d2+'&codePrestataire='+codePrestataire;
$("#div_dossiers").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistefactures/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_dossiers").html(data);
},
complete: function() {
}
});
}
function listeactesexclus()
{
codePrestataire = $("#codePrestataire").val();
codeReponseAutorisation = $("#codeReponseAutorisation").val();
debut = $("#debut").val();
fin = $("#fin").val();
donnees = 'codePrestataire='+codePrestataire+'&codeReponseAutorisation='+codeReponseAutorisation;
donnees += '&debut='+debut+'&fin='+fin;
$.ajax({
url: $("#racineWeb").val()+"Ajaxactesexclus/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_ententeprealable").html(data);
},
complete: function() {
}
});
}
function refuser_acte_exclu_2(idDemandeautorisation)
{
window.location.assign($("#racineWeb" ).val()+"Refuseracteexclus/"+idDemandeautorisation+"/");
}
function refuser_acte_exclu(idDemandeautorisation)
{
window.location.assign($("#racineWeb" ).val()+"Refuseracteexclu/"+idDemandeautorisation+"/");
}
function enregistrerrefus_acte_exclu_2()
{
idDemandeautorisation = $("#idDemandeautorisation").val();
motifReel = $("#motifReel").val();
motifRefusAssure = $("#motifRefusAssure").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif réel!";
v_msgEng="Please enter the real reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
if (motifRefusAssure<=" ")
{
v_msg="Veuillez saisir un motif pour l\'assuré!";
v_msgEng="Please enter a reason for the insured!";
alert_ebene(v_msg, v_msgEng);
$("#motifRefusAssure").focus();
return;
}
v_msg="Confirmez-vous ce refus?";
v_msgEng="Do you confirm this refusal?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idDemandeautorisation='+idDemandeautorisation+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure;
donnees_sav = donnees;
typeMail='refusacteexclu';
typeSms="refusacteexclu";
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistrerrefusacteexclu/",
type : 'post',
data: donnees,
success: function(data) {
preparesms(typeSms);
},
complete: function() {
v_msg="Refus envoyé avec succès!";
v_msgEng="Disagreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_actes_exclus();
}
});
}
}
function accepter_acte_exclu_2(idDemandeautorisation)
{
window.location.assign($("#racineWeb" ).val()+"Accepteracteexclus/"+idDemandeautorisation+"/");
}
function accepter_acte_exclu(idDemandeautorisation)
{
window.location.assign($("#racineWeb" ).val()+"Accepteracteexclu/"+idDemandeautorisation+"/");
}
function enregistreraccord_acte_exclu_2()
{
idDemandeautorisation = $("#idDemandeautorisation").val();
motifReel = $("#motifReel").val();
prixTarif = $("#prixTarif").val();
valeurActe = $("#valeurActe").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif!";
v_msgEng="Please enter the reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
if(valeurActe==0 || parseFloat(valeurActe)>parseFloat(prixTarif))
{
v_msg="Veuillez revoir le tarif!";
v_msgEng="Please review rate!";
alert_ebene(v_msg, v_msgEng);
$("#valeurActe").focus();
return;
}
v_msg="Confirmez-vous cet accord?";
v_msgEng="Do you confirm this agreement?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idDemandeautorisation='+idDemandeautorisation+'&motifReel='+motifReel+'&valeurActe='+valeurActe;
donnees_sav = donnees;
typeMail='accordacteexclu';
typeSms="accordacteexclu";
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistreraccordacteexclu/",
type : 'post',
data: donnees,
success: function(data) {
preparesms(typeSms);
},
complete: function() {
v_msg="Accord envoyé avec succès!";
v_msgEng="Agreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_actes_exclus();
}
});
}
}
function listeracteexclubeneficiaire()
{
d1=$("#d1").val();
d2=$("#d2").val();
donnees = 'd1='+d1+'&d2='+d2;
$.ajax({
url: $("#racineWeb").val()+"Ajaxactesexclusbenficiaire/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_ententeprealable").html(data);
},
complete: function() {
}
});
}
function enregistrerrefus_acte_exclu()
{
idDemandeautorisation = $("#idDemandeautorisation").val();
motifReel = $("#motifReel").val();
motifRefusAssure = $("#motifRefusAssure").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif réel!";
v_msgEng="Please enter the real reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
if (motifRefusAssure<=" ")
{
v_msg="Veuillez saisir un motif pour l\'assuré!";
v_msgEng="Please enter a reason for the insured!";
alert_ebene(v_msg, v_msgEng);
$("#motifRefusAssure").focus();
return;
}
v_msg="Confirmez-vous ce refus?";
v_msgEng="Do you confirm this refusal?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idDemandeautorisation='+idDemandeautorisation+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure;
donnees_sav = donnees;
typeMail='refusacteexclu';
typeSms="refusacteexclu";
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistrerrefusacteexclu/",
type : 'post',
data: donnees,
success: function(data) {
preparesms(typeSms);
},
complete: function() {
v_msg="Refus envoyé avec succès!";
v_msgEng="Disagreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_actes_exclus_beneficiaire();
}
});
}
}
function enregistreraccord_acte_exclu()
{
idDemandeautorisation = $("#idDemandeautorisation").val();
motifReel = $("#motifReel").val();
prixTarif = $("#prixTarif").val();
valeurActe = $("#valeurActe").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif!";
v_msgEng="Please enter the reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
if(valeurActe==0 || parseFloat(valeurActe)>parseFloat(prixTarif))
{
v_msg="Veuillez revoir le tarif!";
v_msgEng="Please review rate!";
alert_ebene(v_msg, v_msgEng);
$("#valeurActe").focus();
return;
}
v_msg="Confirmez-vous cet accord?";
v_msgEng="Do you confirm this agreement?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idDemandeautorisation='+idDemandeautorisation+'&motifReel='+motifReel+'&valeurActe='+valeurActe;
donnees_sav = donnees;
typeMail='accordacteexclu';
typeSms="accordacteexclu";
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistreraccordacteexclu/",
type : 'post',
data: donnees,
success: function(data) {
preparesms(typeSms);
},
complete: function() {
v_msg="Accord envoyé avec succès!";
v_msgEng="Agreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_actes_exclus_beneficiaire();
}
});
}
}
function verifier_feuille_maladie_dec(numeroFeuilleMaladie, idFacture, codeTypeFacture)
{
$("#numeroFeuilleMaladie_C").val(numeroFeuilleMaladie);
numeroDecompte = $("#numeroDecompte").val();
if (idFacture>"0")
{
donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroDecompte='+numeroDecompte+'&idFacture='+idFacture;
codeTypePrestataire = $("#codeTypePrestataire").val();
if(codeTypeFacture=="CSO" || codeTypeFacture=="LAB" || codeTypeFacture=="SEA")
{
verifier_feuille_maladie_dec_cso(donnees);
}
else
if(codeTypeFacture=="PHAR" || codeTypeFacture=="PHA")
{
verifier_feuille_maladie_dec_pha(donnees);
}
else
if(codeTypeFacture=="OPT")
{
verifier_feuille_maladie_dec_opt(donnees);
}
}
}
function verifier_feuille_maladie_dec_cso(donnees)
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxverifierfacture/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
complete: function() {
$("#btn_pop").click();
}
});
}
function verifier_feuille_maladie_dec_pha(donnees)
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxverifierfacturepha/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
complete: function() {
$("#btn_pop").click();
}
});
}
function verifier_feuille_maladie_dec_pha_cons(donnees)
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxverifierfacturephacons/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
complete: function() {
$("#btn_pop").click();
}
});
}
function valider_facture_dec()
{
ndPrestNonTraites=$("#ndPrestNonTraites").val();
if (ndPrestNonTraites>"0")
{
v_msg="Des prestations non traitées!";
v_msgEng="Unprocessed benefits!";
alert_ebene(v_msg, v_msgEng);
return;
}
numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
idFacture = $("#idFacture").val();
codeTypeFacture = $("#codeTypeFacture").val();
donnees = 'idFacture='+idFacture;
var ctrl_montantForce = $("#montantForce"+idFacture);
var ctrl_montantApayer = $("#montantApayer"+idFacture);
var ctrl_montantRedresse = $("#montantRedresse"+idFacture);
v_msg="Confirmez-vous ces montants?";
v_msgEng="Do you confirm these amounts?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfacture/validerfacturedec/",
type: 'POST',
data: donnees,
success: function(data) {
montantForce_dec = $("#montantForce_dec").val();
montantApayer_dec = $("#montantApayer_dec").val();
montantRedresse_dec = $("#montantRedresse_dec").val();
ctrl_montantForce.html(montantForce_dec);
c_html = "<input class='form-control btn btn-primary' onclick='javascript:verifier_feuille_maladie_dec("+numeroFeuilleMaladie+", "+idFacture+', "'+codeTypeFacture+'");'+"' type='button' value='"+montantApayer_dec+"'> ";
ctrl_montantApayer.html(c_html);
ctrl_montantRedresse.html(montantRedresse_dec);
$("#btn_close_pop").click();
},
error: function(data) {
},
complete: function() {
afficher_recap_decompte();
}
});
}
}
function afficher_recap_decompte()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxentetedecompte/",
success: function(data) {
$("#reglement").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function valider_prestation(idPrestationactes, p_choix)
{
numeroFeuilleMaladie = $("#numeroFeuilleMaladie").val();
idFacture = $("#idFacture").val();
donnees = 'idPrestationactes='+idPrestationactes+"&choix="+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfacture/validerprestation/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function valider_prestation_pha(idPrestationactes, p_choix)
{
numeroFeuilleMaladie = $("#numeroFeuilleMaladie").val();
idFacture = $("#idFacture").val();
donnees = 'idPrestationactes='+idPrestationactes+"&choix="+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfacturepha/validerprestation/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function maj_montantForce_prestation(idPrestationactes, montantForce)
{
donnees = 'idPrestationactes='+idPrestationactes+"&montantForce="+montantForce;
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfacture/majmontantforce/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function reinit_facture_dec()
{
numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
idFacture = $("#idFacture").val();
donnees = 'idFacture='+idFacture+"&numeroFeuilleMaladie="+numeroFeuilleMaladie;
v_msg="Confirmez-vous la ré-initialisation?";
v_msgEng="Do you confirm the re-initialization?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfacture/reinitfacturedec/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
}
function reinit_facture_dec_pha()
{
numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
idFacture = $("#idFacture").val();
donnees = 'idFacture='+idFacture+"&numeroFeuilleMaladie="+numeroFeuilleMaladie;
v_msg="Confirmez-vous la ré-initialisation?";
v_msgEng="Do you confirm the re-initialization?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfacturepha/reinitfacturedec/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
}
function maj_montantForce_prestation_pha(idPrestationactes, montantForce)
{
donnees = 'idPrestationactes='+idPrestationactes+"&montantForce="+montantForce;
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfacturepha/majmontantforce/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function valider_facture_dec_pha()
{
ndPrestNonTraites=$("#ndPrestNonTraites").val();
if (ndPrestNonTraites>"0")
{
v_msg="Des prestations non traitées!";
v_msgEng="Unprocessed benefits!";
alert_ebene(v_msg, v_msgEng);
return;
}
numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
idFacture = $("#idFacture").val();
codeTypeFacture = $("#codeTypeFacture").val();
donnees = 'idFacture='+idFacture;
var ctrl_montantForce = $("#montantForce"+idFacture);
var ctrl_montantApayer = $("#montantApayer"+idFacture);
var ctrl_montantRedresse = $("#montantRedresse"+idFacture);
v_msg="Confirmez-vous ces montants?";
v_msgEng="Do you confirm these amounts?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfacturepha/validerfacturedec/",
type: 'POST',
data: donnees,
success: function(data) {
montantForce_dec = $("#montantForce_dec").val();
montantApayer_dec = $("#montantApayer_dec").val();
montantRedresse_dec = $("#montantRedresse_dec").val();
ctrl_montantForce.html(montantForce_dec);
c_html = "<input class='form-control btn btn-primary' onclick='javascript:verifier_feuille_maladie_dec("+numeroFeuilleMaladie+", "+idFacture+', "'+codeTypeFacture+'");'+"' type='button' value='"+montantApayer_dec+"'> ";
ctrl_montantApayer.html(c_html);
ctrl_montantRedresse.html(montantRedresse_dec);
$("#btn_close_pop").click();
},
error: function(data) {
},
complete: function() {
afficher_recap_decompte();
}
});
}
}
function verifier_feuille_maladie_dec_cons(numeroFeuilleMaladie, idFacture, codeTypeFacture)
{
$("#numeroFeuilleMaladie_C").val(numeroFeuilleMaladie);
numeroDecompte = $("#numeroDecompte").val();
if (idFacture>"0")
{
donnees = 'numeroFeuilleMaladie='+numeroFeuilleMaladie+'&numeroDecompte='+numeroDecompte+'&idFacture='+idFacture;
codeTypePrestataire = $("#codeTypePrestataire").val();
if(codeTypeFacture=="CSO" || codeTypeFacture=="LAB" || codeTypeFacture=="SEA")
{
verifier_feuille_maladie_dec_cso_cons(donnees);
}
else
if(codeTypeFacture=="PHAR" || codeTypeFacture=="PHA")
{
verifier_feuille_maladie_dec_pha_cons(donnees);
}
else
if(codeTypeFacture=="OPT")
{
verifier_feuille_maladie_dec_opt_cons(donnees);
}
}
}
function verifier_feuille_maladie_dec_cso_cons(donnees)
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxverifierfacturecons/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
complete: function() {
$("#btn_pop").click();
}
});
}
function requetes()
{
window.location.assign($("#racineWeb" ).val()+"Requetes/");
}
function ajaxenteterequete()
{
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
donnees = 'codeRequete='+codeRequete;
v_url = $("#racineWeb").val()+"Ajaxrequeteentete"+codeRequete+"/";
$("#div_ente_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#div_ente_requete").html(data);
$(".datepicker" ).datepicker();
}
});
}
function requetes_feuilles_maladie()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
codePrestataire = $("#codePrestataire").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_feuilles_maladie_export()
{
$('#div_detail_requete').html('');
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
codePrestataire = $("#codePrestataire").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 ctrlkeypress_medecin(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
afficher_pop_recherche_medecin();
}
}
function afficher_pop_recherche_medecin()
{
noOrdreMedecin = $("#noOrdreMedecin").val();
nomsearch = $("#nomsearch").val();
if(noOrdreMedecin+nomsearch<=" ")
return;
donnees = "valid=1&noOrdreMedecin="+noOrdreMedecin+"&nomsearch="+nomsearch;
$("#div_listemedecins").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistemedecins/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_listemedecins").html(data);
}
});
}
function selectionner_medecin(codeMedecin, nomMedecin, noOrdreMedecin)
{
$("#codeMedecin").val(codeMedecin);
$("#nomMedecin").html(nomMedecin+" ( "+noOrdreMedecin+" )");
$("#close_pop").click();
}
function reinitialiser_medecin()
{
$("#codeMedecin").val("");
$("#nomMedecin").html("Rechercher Médecin...");
$("#close_pop").click();
}
function requetes_bonpoec()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
codeTypeBon = $("#codeTypeBon").val();
codeEtatBon = $("#codeEtatBon").val();
// Ligne 2
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
numeroBon1 = $("#numeroBon1").val();
numeroBon2 = $("#numeroBon2").val();
// Ligne 4
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// FIN champs
// DEBUT convertir_en_entier
numeroBon1 = convertir_en_entier(numeroBon1);
numeroBon2 = convertir_en_entier(numeroBon2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&codeTypeBon=' + codeTypeBon;
donnees += '&codeEtatBon=' + codeEtatBon;
// Ligne 2
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
donnees += '&numeroBon1=' + numeroBon1;
donnees += '&numeroBon2=' + numeroBon2;
// Ligne 4
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_bonpoec_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
codeTypeBon = $("#codeTypeBon").val();
codeEtatBon = $("#codeEtatBon").val();
// Ligne 2
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
numeroBon1 = $("#numeroBon1").val();
numeroBon2 = $("#numeroBon2").val();
// Ligne 3
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// FIN champs
// DEBUT convertir_en_entier
numeroBon1 = convertir_en_entier(numeroBon1);
numeroBon2 = convertir_en_entier(numeroBon2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&codeTypeBon=' + codeTypeBon;
donnees += '&codeEtatBon=' + codeEtatBon;
// Ligne 2
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
donnees += '&numeroBon1=' + numeroBon1;
donnees += '&numeroBon2=' + numeroBon2;
// Ligne 3
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 requetes_prestationactes()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
datePrestation1 = $("#datePrestation1").val();
datePrestation2 = $("#datePrestation2").val();
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
// Ligne 2
codeMedecin = $("#codeMedecin").val();
numeroBonConsultation1 = $("#numeroBonConsultation1").val();
numeroBonConsultation2 = $("#numeroBonConsultation2").val();
numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val();
numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val();
numeroBonOptique1 = $("#numeroBonOptique1").val();
numeroBonOptique2 = $("#numeroBonOptique2").val();
// Ligne 3
codeTypePrestataire = $("#codeTypePrestataire").val();
numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
codeTypePrestation = $("#codeTypePrestation").val();
ententePrealable = $("#ententePrealable").val();
numeroChambre = $("#numeroChambre").val();
facture = $("#facture").val();
// Ligne 4
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// Ligne 5
libelleActe = $("#libelleActe").val();
libelleFamilleActe = $("#libelleFamilleActe").val();
// FIN champs
// DEBUT convertir_en_entier
numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1);
numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&datePrestation1=' + datePrestation1;
donnees += '&datePrestation2=' + datePrestation2;
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
// Ligne 2
donnees += '&codeMedecin=' + codeMedecin;
donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1;
donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2;
donnees += '&numeroBonOptique1=' + numeroBonOptique1;
donnees += '&numeroBonOptique2=' + numeroBonOptique2;
// Ligne 3
donnees += '&codeTypePrestataire=' + codeTypePrestataire;
donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
donnees += '&codeTypePrestation=' + codeTypePrestation;
donnees += '&ententePrealable=' + ententePrealable;
donnees += '&numeroChambre=' + numeroChambre;
donnees += '&facture=' + facture;
// Ligne 4
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
// Ligne 5
donnees += '&libelleActe=' + libelleActe;
donnees += '&libelleFamilleActe=' + libelleFamilleActe;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_prestationactes_export()
{
$('#div_detail_requete').html('');
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
datePrestation1 = $("#datePrestation1").val();
datePrestation2 = $("#datePrestation2").val();
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
// Ligne 2
codeMedecin = $("#codeMedecin").val();
numeroBonConsultation1 = $("#numeroBonConsultation1").val();
numeroBonConsultation2 = $("#numeroBonConsultation2").val();
numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val();
numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val();
numeroBonOptique1 = $("#numeroBonOptique1").val();
numeroBonOptique2 = $("#numeroBonOptique2").val();
// Ligne 3
codeTypePrestataire = $("#codeTypePrestataire").val();
numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
codeTypePrestation = $("#codeTypePrestation").val();
ententePrealable = $("#ententePrealable").val();
numeroChambre = $("#numeroChambre").val();
facture = $("#facture").val();
// Ligne 4
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// Ligne 5
libelleActe = $("#libelleActe").val();
libelleFamilleActe = $("#libelleFamilleActe").val();
// FIN champs
// DEBUT convertir_en_entier
numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1);
numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&datePrestation1=' + datePrestation1;
donnees += '&datePrestation2=' + datePrestation2;
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
// Ligne 2
donnees += '&codeMedecin=' + codeMedecin;
donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1;
donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2;
donnees += '&numeroBonOptique1=' + numeroBonOptique1;
donnees += '&numeroBonOptique2=' + numeroBonOptique2;
// Ligne 3
donnees += '&codeTypePrestataire=' + codeTypePrestataire;
donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
donnees += '&codeTypePrestation=' + codeTypePrestation;
donnees += '&ententePrealable=' + ententePrealable;
donnees += '&numeroChambre=' + numeroChambre;
donnees += '&facture=' + facture;
// Ligne 4
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
// Ligne 5
donnees += '&libelleActe=' + libelleActe;
donnees += '&libelleFamilleActe=' + libelleFamilleActe;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 requetes_pharmacie()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
dateLivraison1 = $("#dateLivraison1").val();
dateLivraison2 = $("#dateLivraison2").val();
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
// Ligne 2
codeMedecin = $("#codeMedecin").val();
numeroBonConsultation1 = $("#numeroBonConsultation1").val();
numeroBonConsultation2 = $("#numeroBonConsultation2").val();
numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
codePrestatairePrescription = $("#codePrestatairePrescription").val();
// Ligne 3
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// Ligne 4
libelleMedicament = $("#libelleMedicament").val();
// FIN champs
// DEBUT convertir_en_entier
numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1);
numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateLivraison1=' + dateLivraison1;
donnees += '&dateLivraison2=' + dateLivraison2;
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
// Ligne 2
donnees += '&codeMedecin=' + codeMedecin;
donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
donnees += '&codePrestatairePrescription=' + codePrestatairePrescription;
// Ligne 3
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
// Ligne 4
donnees += '&libelleMedicament=' + libelleMedicament;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_pharmacie_export()
{
$('#div_detail_requete').html('');
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
dateLivraison1 = $("#dateLivraison1").val();
dateLivraison2 = $("#dateLivraison2").val();
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
// Ligne 2
codeMedecin = $("#codeMedecin").val();
numeroBonConsultation1 = $("#numeroBonConsultation1").val();
numeroBonConsultation2 = $("#numeroBonConsultation2").val();
numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
codePrestatairePrescription = $("#codePrestatairePrescription").val();
// Ligne 3
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// Ligne 4
libelleMedicament = $("#libelleMedicament").val();
// FIN champs
// DEBUT convertir_en_entier
numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1);
numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateLivraison1=' + dateLivraison1;
donnees += '&dateLivraison2=' + dateLivraison2;
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
// Ligne 2
donnees += '&codeMedecin=' + codeMedecin;
donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
donnees += '&codePrestatairePrescription=' + codePrestatairePrescription;
// Ligne 3
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
// Ligne 4
donnees += '&libelleMedicament=' + libelleMedicament;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 requetes_optique()
{
$('#div_export').html("");
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
dateLivraison1 = $("#dateLivraison1").val();
dateLivraison2 = $("#dateLivraison2").val();
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
// Ligne 2
codeMedecin = $("#codeMedecin").val();
numeroBonConsultation1 = $("#numeroBonConsultation1").val();
numeroBonConsultation2 = $("#numeroBonConsultation2").val();
numeroBonOptique1 = $("#numeroBonOptique1").val();
numeroBonOptique2 = $("#numeroBonOptique2").val();
numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
codePrestatairePrescription = $("#codePrestatairePrescription").val();
// Ligne 3
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// Ligne 4
libelleOptique = $("#libelleOptique").val();
// FIN champs
// DEBUT convertir_en_entier
numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1);
numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateLivraison1=' + dateLivraison1;
donnees += '&dateLivraison2=' + dateLivraison2;
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
// Ligne 2
donnees += '&codeMedecin=' + codeMedecin;
donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
donnees += '&numeroBonOptique1=' + numeroBonOptique1;
donnees += '&numeroBonOptique2=' + numeroBonOptique2;
donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
donnees += '&codePrestatairePrescription=' + codePrestatairePrescription;
// Ligne 3
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
// Ligne 4
donnees += '&libelleOptique=' + libelleOptique;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_optique_export()
{
$('#div_detail_requete').html('');
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
dateLivraison1 = $("#dateLivraison1").val();
dateLivraison2 = $("#dateLivraison2").val();
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
// Ligne 2
codeMedecin = $("#codeMedecin").val();
numeroBonConsultation1 = $("#numeroBonConsultation1").val();
numeroBonConsultation2 = $("#numeroBonConsultation2").val();
numeroBonOptique1 = $("#numeroBonOptique1").val();
numeroBonOptique2 = $("#numeroBonOptique2").val();
numeroFeuilleMaladie1 = $("#numeroFeuilleMaladie1").val();
numeroFeuilleMaladie2 = $("#numeroFeuilleMaladie2").val();
codePrestatairePrescription = $("#codePrestatairePrescription").val();
// Ligne 3
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// Ligne 4
libelleOptique = $("#libelleOptique").val();
// FIN champs
// DEBUT convertir_en_entier
numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
numeroFeuilleMaladie1 = convertir_en_entier(numeroFeuilleMaladie1);
numeroFeuilleMaladie2 = convertir_en_entier(numeroFeuilleMaladie2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateLivraison1=' + dateLivraison1;
donnees += '&dateLivraison2=' + dateLivraison2;
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
// Ligne 2
donnees += '&codeMedecin=' + codeMedecin;
donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
donnees += '&numeroBonOptique1=' + numeroBonOptique1;
donnees += '&numeroBonOptique2=' + numeroBonOptique2;
donnees += '&numeroFeuilleMaladie1=' + numeroFeuilleMaladie1;
donnees += '&numeroFeuilleMaladie2=' + numeroFeuilleMaladie2;
donnees += '&codePrestatairePrescription=' + codePrestatairePrescription;
// Ligne 3
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
// Ligne 4
donnees += '&libelleOptique=' + libelleOptique;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 requetes_assure()
{
$('#div_export').html("");
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
// Ligne 1
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// Ligne 2
numeroPolice = $("#numeroPolice").val();
codeProduit = $("#codeProduit").val();
codeEtatPolice = $("#codeEtatPolice").val();
codeLienParente = $("#codeLienParente").val();
codeEtatBeneficiaire = $("#codeEtatBeneficiaire").val();
sexe = $("#sexe").val();
// Ligne 3
numeroClient1 = $("#numeroClient1").val();
numeroClient2 = $("#numeroClient2").val();
telephonePortableAdherent = $("#telephonePortableAdherent").val();
emailAdherent = $("#emailAdherent").val();
decede = $("#decede").val();
nomClient = $("#nomClient").val();
// FIN champs
// DEBUT convertir_en_entier
numeroClient1 = convertir_en_entier(numeroClient1);
numeroClient2 = convertir_en_entier(numeroClient2);
// FIN convertir_en_entier
// Ligne 1
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
// Ligne 2
donnees += '&numeroPolice=' + numeroPolice;
donnees += '&codeProduit=' + codeProduit;
donnees += '&codeEtatPolice=' + codeEtatPolice;
donnees += '&codeLienParente=' + codeLienParente;
donnees += '&codeEtatBeneficiaire=' + codeEtatBeneficiaire;
donnees += '&sexe=' + sexe;
// Ligne 3
donnees += '&numeroClient1=' + numeroClient1;
donnees += '&numeroClient2=' + numeroClient2;
donnees += '&telephonePortableAdherent=' + telephonePortableAdherent;
donnees += '&emailAdherent=' + emailAdherent;
donnees += '&decede=' + decede;
donnees += '&nomClient=' + nomClient;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function(data) {
$("#div_detail_requete").html(donnees_retour);
$("#nbligne").val("Lignes : "+$("#nbligne_info").val());
}
});
}
function requetes_assure_export()
{
$('#div_detail_requete').html('');
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
// Ligne 1
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// Ligne 2
numeroPolice = $("#numeroPolice").val();
codeProduit = $("#codeProduit").val();
codeEtatPolice = $("#codeEtatPolice").val();
codeLienParente = $("#codeLienParente").val();
codeEtatBeneficiaire = $("#codeEtatBeneficiaire").val();
sexe = $("#sexe").val();
// Ligne 3
numeroClient1 = $("#numeroClient1").val();
numeroClient2 = $("#numeroClient2").val();
telephonePortableAdherent = $("#telephonePortableAdherent").val();
emailAdherent = $("#emailAdherent").val();
decede = $("#decede").val();
nomClient = $("#nomClient").val();
// FIN champs
// DEBUT convertir_en_entier
numeroClient1 = convertir_en_entier(numeroClient1);
numeroClient2 = convertir_en_entier(numeroClient2);
// FIN convertir_en_entier
// Ligne 1
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
// Ligne 2
donnees += '&numeroPolice=' + numeroPolice;
donnees += '&codeProduit=' + codeProduit;
donnees += '&codeEtatPolice=' + codeEtatPolice;
donnees += '&codeLienParente=' + codeLienParente;
donnees += '&codeEtatBeneficiaire=' + codeEtatBeneficiaire;
donnees += '&sexe=' + sexe;
// Ligne 3
donnees += '&numeroClient1=' + numeroClient1;
donnees += '&numeroClient2=' + numeroClient2;
donnees += '&telephonePortableAdherent=' + telephonePortableAdherent;
donnees += '&emailAdherent=' + emailAdherent;
donnees += '&decede=' + decede;
donnees += '&nomClient=' + nomClient;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 consulter_limite_avant_facturation()
{
facture=$("#facture").val();
if (facture==0)
{
v_msg="Pas encore facturée!";
v_msgEng="Not yet charged!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturecons/");
}
function consulter_limite_avant_facturation_dec()
{
window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturecdec/");
}
function limite_avant_facture_dec(idFacture)
{
donnees = 'idFacture='+idFacture;
$.ajax({
url: $("#racineWeb").val()+"AjaxPlafondavantfacturecdec/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_limites").html(data);
},
complete: function() {
}
});
}
function afficher_pharmacien()
{
window.location.assign($("#racineWeb" ).val()+"Pharmaciencons/");
}
function afficher_pharmacien_dec()
{
window.location.assign($("#racineWeb" ).val()+"Pharmaciendec/");
}
function consulter_limite_avant_facturation_pha()
{
window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturephacons/");
}
function consulter_limite_avant_facturation_pha_dec()
{
window.location.assign($("#racineWeb" ).val()+"Plafondavantfacturephadec/");
}
function imprimer_livraison_bon()
{
var div_wait = $('#div_wait');
div_wait.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerlivraisonbons/",
type: 'POST',
success: function(data)
{
div_wait.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function convertir_en_entier(valeur)
{
if(isNaN(valeur))
{
valeur = "0";
}
if (valeur=="")
{
valeur="0";
}
valeur = parseInt(valeur);
return valeur;
}
function verifier_feuille_maladie_dec_opt(donnees)
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxverifierfactureopt/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
complete: function() {
$("#btn_pop").click();
}
});
}
function valider_prestation_opt(idPrestationactes, p_choix)
{
numeroFeuilleMaladie = $("#numeroFeuilleMaladie").val();
idFacture = $("#idFacture").val();
donnees = 'idPrestationactes='+idPrestationactes+"&choix="+p_choix;
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfactureopt/validerprestation/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function maj_montantForce_prestation_opt(idPrestationactes, montantForce)
{
donnees = 'idPrestationactes='+idPrestationactes+"&montantForce="+montantForce;
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfactureopt/majmontantforce/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function reinit_facture_dec_opt()
{
numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
idFacture = $("#idFacture").val();
donnees = 'idFacture='+idFacture+"&numeroFeuilleMaladie="+numeroFeuilleMaladie;
v_msg="Confirmez-vous la ré-initialisation?";
v_msgEng="Do you confirm the re-initialization?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfactureopt/reinitfacturedec/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
}
function valider_facture_dec_opt()
{
ndPrestNonTraites=$("#ndPrestNonTraites").val();
if (ndPrestNonTraites>"0")
{
v_msg="Des prestations non traitées!";
v_msgEng="Unprocessed benefits!";
alert_ebene(v_msg, v_msgEng);
return;
}
numeroFeuilleMaladie = $("#numeroFeuilleMaladie_C").val();
idFacture = $("#idFacture").val();
codeTypeFacture = $("#codeTypeFacture").val();
donnees = 'idFacture='+idFacture;
var ctrl_montantForce = $("#montantForce"+idFacture);
var ctrl_montantApayer = $("#montantApayer"+idFacture);
var ctrl_montantRedresse = $("#montantRedresse"+idFacture);
v_msg="Confirmez-vous ces montants?";
v_msgEng="Do you confirm these amounts?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfactureopt/validerfacturedec/",
type: 'POST',
data: donnees,
success: function(data) {
montantForce_dec = $("#montantForce_dec").val();
montantApayer_dec = $("#montantApayer_dec").val();
montantRedresse_dec = $("#montantRedresse_dec").val();
ctrl_montantForce.html(montantForce_dec);
c_html = "<input class='form-control btn btn-primary' onclick='javascript:verifier_feuille_maladie_dec("+numeroFeuilleMaladie+", "+idFacture+', "'+codeTypeFacture+'");'+"' type='button' value='"+montantApayer_dec+"'> ";
ctrl_montantApayer.html(c_html);
ctrl_montantRedresse.html(montantRedresse_dec);
$("#btn_close_pop").click();
},
error: function(data) {
},
complete: function() {
afficher_recap_decompte();
}
});
}
}
function verifier_feuille_maladie_dec_opt_cons(donnees)
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxverifierfactureoptcons/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_verification_facture").html(data);
},
complete: function() {
$("#btn_pop").click();
}
});
}
function supprimer_empreinte_digitale()
{
finger_id_C=$("#finger_id_C" ).val();
if(finger_id_C<1)
{
v_msg="Pas d\'empreinte digitale!";
v_msgEng="No fingerprint!";
alert_ebene(v_msg, v_msgEng);
return;
}
motif=$("#motif").val();
if (motif<=" ")
{
v_msg="Veuillez saisir un motif!";
v_msgEng="Please enter a reaon!";
alert_ebene(v_msg, v_msgEng);
$("#motif").focus();
return;
}
v_msg="Confirmez-vous la suppression de l\'empreinte digitale?";
v_msgEng="Do you confirm the deletion of the fingerprint?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'motif='+motif;
$.ajax({
url: $("#racineWeb").val()+"Ajaxsupprimerempreinte/supprimerempreinte/",
type : 'post',
data: donnees,
success: function(data) {
v_msg="Empreinte digitale ré-initialisée avec succès!";
v_msgEng="Fingerprint re-initialized successfully!";
alert_ebene(v_msg, v_msgEng);
},
error: function(data) {
},
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Supprimerempreinte/");
}
});
}
}
function remboursement_classique()
{
window.location.assign($("#racineWeb" ).val()+"Remboursementclassique/");
}
function listerremboursementbeneficiaire()
{
d1=$("#d1").val();
d2=$("#d2").val();
donnees = 'd1='+d1+'&d2='+d2;
$("#div_dossiers").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxfacturesclassiques/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_dossiers").html(data);
},
complete: function() {
}
});
}
function nouvelle_facture_classique()
{
regle=$("#regle").val();
if (regle==1)
{
v_msg="Déjà payé!";
v_msgEng="Already paid!";
alert_ebene(v_msg, v_msgEng);
return;
}
demandeReglement=$("#demandeReglement").val();
demandeReglement = parseInt(demandeReglement);
if (demandeReglement==1)
{
v_msg="Demande de règlement déjà effectuée!";
v_msgEng="Request for payment already made!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Factureclassique/");
}
function enregistrerfacture_classique_temp()
{
prestataire = $("#prestataire").val();
if (prestataire<=" ")
{
v_msg="Veuillez indiquer le prestataire!";
v_msgEng="Please indicate the provider!";
alert_ebene(v_msg, v_msgEng);
$("#prestataire").focus();
return;
}
dateFacture=$("#dateFacture").val();
if (dateFacture<=" ")
{
v_msg="Veuillez saisir la date de la facture!";
v_msgEng="Please enter the date of the invoice!";
alert_ebene(v_msg, v_msgEng);
$("#dateFacture").focus();
return;
}
dateEffetPolice = $("#dateEffetPolice_C").val();
dateEcheancePolice = $("#dateEcheancePolice_C").val();
dateConsultation = $("#dateConsultation").val();
// var td0 = new Date(dateEffetPolice);
dateEntreeBeneficiaire= $("#dateEntreeBeneficiaire_C").val();
var td0 = new Date(dateEntreeBeneficiaire);
var td1 = new Date(dateConsultation);
var td2 = $("#datejourfr_C").datepicker("getDate");
var td3 = new Date(dateEcheancePolice);
var td4 = $("#dateFacture").datepicker("getDate");
dt0=Math.round(Date.parse(td0)/(1000*3600*24));
dt1=Math.round(Date.parse(td1)/(1000*3600*24));
dt2=Math.round(Date.parse(td2)/(1000*3600*24));
dt3=Math.round(Date.parse(td3)/(1000*3600*24));
dt4=Math.round(Date.parse(td4)/(1000*3600*24));
if (dt4<dt1) // date facture < date consultation
{
v_msg="La date des Prestations ne peut être inférieure à la date de la Consultation!";
v_msgEng="The date of the Services can not be lower than the date of the Consultation!";
alert_ebene(v_msg, v_msgEng);
$("#dateConsultation").focus();
return;
}
if (dt4>dt2)
{
v_msg="La date des Prestations ne peut être supérieure à la date du jour!";
v_msgEng="The date of the Services can not be greater than today";
alert_ebene(v_msg, v_msgEng);
$("#dateConsultation").focus();
return;
}
if (dt4>dt3 || dt4<dt0)
{
v_msg="Attention! cette police n'est pas couverte à cette date!";
v_msgEng="Warning! This insurance policy is not valid on this date!";
alert_ebene(v_msg, v_msgEng);
return;
}
numeroFacture = $("#numeroFacture").val();
if (numeroFacture<=" ")
{
v_msg="Veuillez saisir le No de la facture!";
v_msgEng="Veuillez saisir le No de la facture!";
alert_ebene(v_msg, v_msgEng);
$("#numeroFacture").focus();
return;
}
observations = $("#observations").val();
hospitalisation = $("#hospitalisation").val();
tm = $("#tmFacture").val();
donnees = 'prestataire='+prestataire+'&observations='+observations+'&dateFacture='+dateFacture+'&hospitalisation='+hospitalisation+'&tm='+tm+'&numeroFacture='+numeroFacture;
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailfactureclassique/enregistrerfacturetemp/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_facture").html(data);
},
complete: function() {
alerter_depassement_limite_classique();
}
});
}
function enregistrerfacture_classique()
{
enregistrerfacture_classique_temp();
prestataire = $("#prestataire").val();
if (prestataire<=" ")
{
v_msg="Veuillez indiquer le prestataire!";
v_msgEng="Please indicate the provider!";
alert_ebene(v_msg, v_msgEng);
$("#prestataire").focus();
return;
}
dateFacture=$("#dateFacture").val();
if (dateFacture<=" ")
{
v_msg="Veuillez saisir la date de la facture!";
v_msgEng="Please enter the date of the invoice!";
alert_ebene(v_msg, v_msgEng);
$("#dateFacture").focus();
return;
}
prixActe = $("#prixActe").val();
if (prixActe==0)
{
v_msg="Rien à enregistrer!";
v_msgEng="Nothing to save!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous cette facture?";
v_msgEng="Do you confirm this invoice?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailfactureclassique/validerfactureclassique/",
success: function(data) {
},
complete: function() {
v_msg="Facture ajoutée avec succès!";
v_msgEng="Invoice added successfully!";
alert_ebene(v_msg, v_msgEng);
afficher_dossier_classique();
}
});
}
}
function ajax_maj_tm_facture(tm, controle)
{
donnees = 'tm='+tm;
tm=tm.replace(",",".");
controle.value=tm;
if(controle_numerique(controle))
{
enregistrerfacture_classique_temp();
}
}
function ajax_maj_prix_acte(idPrestation, valeurActe, controle)
{
donnees = 'idPrestation='+idPrestation+"&valeurActe="+valeurActe;
valeurActe=valeurActe.replace(",",".");
controle.value=valeurActe;
if(controle_numerique(controle))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailfactureclassique/majprix/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_facture").html(data);
},
error: function(data) {
},
complete: function(data) {
alerter_depassement_limite_classique();
}
});
}
}
function valider_facture_classique_temp()
{
enregistrerfacture_classique_temp();
}
function alerter_depassement_limite_classique()
{
fraisExclu=$("#fraisExclu").val();
fraisExclu = parseInt(fraisExclu);
if (fraisExclu>0)
{
v_msg="Attention ! Dépassement de limite";
v_msgEng="Warning ! Overflow";
alert_ebene(v_msg, v_msgEng);
return;
}
}
function consulter_facture_classique(idFacture)
{
window.location.assign($("#racineWeb" ).val()+"Consulteractureclassique/"+idFacture+"/");
}
function consulter_limite_avant_facturation_classique()
{
idFacture=$("#idFacture_C").val();
if (idFacture==0)
{
v_msg="Pas encore facturée!";
v_msgEng="Not yet charged!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Plafondavantfactureclassique/");
}
function retour_facture_classique()
{
idFacture=$("#idFacture_C").val();
window.location.assign($("#racineWeb" ).val()+"Consulteractureclassique/"+idFacture+"/");
}
function payerfactureclassique()
{
regle=$("#regle").val();
if (regle==1)
{
v_msg="Déjà payé!";
v_msgEng="Already paid!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Payerfactureclassique/");
}
function ajaxcommissionautre()
{
donnees = "codeApporteur="+$("#codeCommercial").val()+"&codeEtape="+$("#codeEtape").val();
$.ajax({
url: $("#racineWeb").val()+"Ajaxcommissionautre/",
type : 'post',
data: donnees,
success: function(data) {
$("#infocommautre").html(data);
},
complete: function() {
$("#tauxCommissionAutre").val( $("#tauxCommissionautre_info").val());
}
});
}
function creer_optiontarif()
{
transforme = $("#transforme").val();
if (transforme=="1")
{
v_msg="Devis déjà transformé!";
v_msgEng="Quote already transformed!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous la création d\'une nouvelle option?";
v_msgEng="Do you confirm the creation of a new option?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxnouvelleoptiontarif/",
type : 'post',
success: function(data) {
},
complete: function() {
v_msg="Nouvelle option créée avec succès!";
v_msgEng="New option created successfully!";
alert_ebene(v_msg, v_msgEng);
// afficher_police_d_id();
window.location.assign($("#racineWeb" ).val()+"Fichedevis/");
}
});
}
}
function actualiser_liste_college_d()
{
numeroOptionTarif = $("#numeroOptionTarif").val();
donnees = "numeroOptionTarif="+numeroOptionTarif;
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistecolleged/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_listecollege").html(data);
},
complete: function() {
}
});
}
function supprimer_option()
{
transforme = $("#transforme").val();
if (transforme=="1")
{
v_msg="Devis déjà transformé!";
v_msgEng="Quote already transformed!";
alert_ebene(v_msg, v_msgEng);
return;
}
numeroOptionTarif = $("#numeroOptionTarif").val();
donnees = "numeroOptionTarif="+numeroOptionTarif;
v_msg="Confirmez-vous la suppression de cette option?";
v_msgEng="Do you confirm the deletion of this option?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistecolleged/supprimeroption/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
v_msg="Option supprimée avec succès!";
v_msgEng="Option removed successfully!";
alert_ebene(v_msg, v_msgEng);
afficher_police_d_id();
}
});
}
}
function texte_cpd()
{
window.location.assign($("#racineWeb" ).val()+"Textecpd/");
}
function prestataire_en_plus()
{
window.location.assign($("#racineWeb" ).val()+"Prestatairenplus/");
}
function prestataire_en_moins()
{
window.location.assign($("#racineWeb" ).val()+"Prestatairenmoins/");
}
function ajouter_un_prestataire_en_plus(codePrestataire)
{
donnees = 'codePrestataire='+codePrestataire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestatairenplus/ajouterunprestataireenplus/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_complet").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function retirer_un_prestataire_en_plus(idPrestation)
{
donnees = 'idPrestation='+idPrestation;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestatairenplus/retirer/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_complet").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function ajax_maj_tm_en_plus(idPrestation, tm, controle)
{
tm=tm.replace(",",".");
controle.value=tm;
donnees = 'idPrestation='+idPrestation+"&tm="+tm;
if(controle_numerique(controle))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestatairenplus/majtm/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_complet").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
}
function ajouter_un_prestataire_en_moins(codePrestataire)
{
donnees = 'codePrestataire='+codePrestataire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestatairenmoins/ajouterunprestataireenmoins/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_complet").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function retirer_un_prestataire_en_moins(idPrestation)
{
donnees = 'idPrestation='+idPrestation;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestatairenmoins/retirer/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_complet").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function prestataire_en_plus_cons()
{
window.location.assign($("#racineWeb" ).val()+"Prestatairenpluscons/");
}
function afficher_prestataire_en_plus()
{
idCollege = $("#idCollege").val();
donnees = 'idCollege='+idCollege;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestatairenpluscons/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_complet").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function exporter_liste_assures_sans_format()
{
$('#div_export_assures_sans_format').html('');
$("#btn_liste_assures_sans_format").click();
}
//
function requetes_demandederogations()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
dateDemande1 = $("#dateDemande1").val();
dateDemande2 = $("#dateDemande2").val();
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
// Ligne 2
numeroDerogation1 = $("#numeroDerogation1").val();
numeroDerogation2 = $("#numeroDerogation2").val();
// Ligne 3
codeDerogation = $("#codeDerogation").val();
codeReponseDerogation = $("#codeReponseDerogation").val();
// Ligne 4
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// FIN champs
// DEBUT convertir_en_entier
numeroDerogation1 = convertir_en_entier(numeroDerogation1);
numeroDerogation2 = convertir_en_entier(numeroDerogation2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateDemande1=' + dateDemande1;
donnees += '&dateDemande2=' + dateDemande2;
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
// Ligne 2
donnees += '&numeroDerogation1=' + numeroDerogation1;
donnees += '&numeroDerogation2=' + numeroDerogation2;
// Ligne 3
donnees += '&codeDerogation=' + codeDerogation;
donnees += '&codeReponseDerogation=' + codeReponseDerogation;
// Ligne 4
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_demandederogations_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
dateDemande1 = $("#dateDemande1").val();
dateDemande2 = $("#dateDemande2").val();
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
// Ligne 2
numeroDerogation1 = $("#numeroDerogation1").val();
numeroDerogation2 = $("#numeroDerogation2").val();
// Ligne 3
codeDerogation = $("#codeDerogation").val();
codeReponseDerogation = $("#codeReponseDerogation").val();
// Ligne 4
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// FIN champs
// DEBUT convertir_en_entier
numeroDerogation1 = convertir_en_entier(numeroDerogation1);
numeroDerogation2 = convertir_en_entier(numeroDerogation2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateDemande1=' + dateDemande1;
donnees += '&dateDemande2=' + dateDemande2;
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
// Ligne 2
donnees += '&numeroDerogation1=' + numeroDerogation1;
donnees += '&numeroDerogation2=' + numeroDerogation2;
// Ligne 3
donnees += '&codeDerogation=' + codeDerogation;
donnees += '&codeReponseDerogation=' + codeReponseDerogation;
// Ligne 4
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 requetes_ententeprealable()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
dateDemande1 = $("#dateDemande1").val();
dateDemande2 = $("#dateDemande2").val();
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
// Ligne 2
numeroEntentePrealable1 = $("#numeroEntentePrealable1").val();
numeroEntentePrealable2 = $("#numeroEntentePrealable2").val();
// Ligne 3
codeReponseEntentePrealable = $("#codeReponseEntentePrealable").val();
// Ligne 4
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
libelleActe = $("#libelleActe").val();
libelleFamilleActe = $("#libelleFamilleActe").val();
// FIN champs
// DEBUT convertir_en_entier
numeroEntentePrealable1 = convertir_en_entier(numeroEntentePrealable1);
numeroEntentePrealable2 = convertir_en_entier(numeroEntentePrealable2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateDemande1=' + dateDemande1;
donnees += '&dateDemande2=' + dateDemande2;
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
// Ligne 2
donnees += '&numeroEntentePrealable1=' + numeroEntentePrealable1;
donnees += '&numeroEntentePrealable2=' + numeroEntentePrealable2;
// Ligne 3
donnees += '&codeReponseEntentePrealable=' + codeReponseEntentePrealable;
// Ligne 4
donnees += '&libelleActe=' + libelleActe;
donnees += '&beneficiaire=' + beneficiaire;
donnees += '&adherent=' + adherent;
donnees += '&libelleFamilleActe=' + libelleFamilleActe;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_ententeprealable_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
dateDemande1 = $("#dateDemande1").val();
dateDemande2 = $("#dateDemande2").val();
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
// Ligne 2
numeroEntentePrealable1 = $("#numeroEntentePrealable1").val();
numeroEntentePrealable2 = $("#numeroEntentePrealable2").val();
// Ligne 3
codeReponseEntentePrealable = $("#codeReponseEntentePrealable").val();
// Ligne 4
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
libelleActe = $("#libelleActe").val();
libelleFamilleActe = $("#libelleFamilleActe").val();
// FIN champs
// DEBUT convertir_en_entier
numeroEntentePrealable1 = convertir_en_entier(numeroEntentePrealable1);
numeroEntentePrealable2 = convertir_en_entier(numeroEntentePrealable2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateDemande1=' + dateDemande1;
donnees += '&dateDemande2=' + dateDemande2;
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
// Ligne 2
donnees += '&numeroEntentePrealable1=' + numeroEntentePrealable1;
donnees += '&numeroEntentePrealable2=' + numeroEntentePrealable2;
// Ligne 3
donnees += '&codeReponseEntentePrealable=' + codeReponseEntentePrealable;
// Ligne 4
donnees += '&libelleActe=' + libelleActe;
donnees += '&beneficiaire=' + beneficiaire;
donnees += '&adherent=' + adherent;
donnees += '&libelleFamilleActe=' + libelleFamilleActe;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 statistiques()
{
window.location.assign($("#racineWeb" ).val()+"Initstatistiques/");
}
function initierstatistiques()
{
dateAnalyse = $("#dateAnalyse").val();
debutArchivageFr = $("#debutArchivageFr").val();
if (dateAnalyse<=" ")
{
v_msg="Veuillez indiquer une date!";
v_msgEng="Please enter a date!";
alert_ebene(v_msg, v_msgEng);
$("#dateAnalyse").focus();
return;
}
donnees = 'dateAnalyse='+dateAnalyse;
var td0 = $("#datejourfr_C").datepicker("getDate");
var td1 = $("#dateAnalyse").datepicker("getDate");
var td2 = $("#debutArchivageFr").datepicker("getDate");
dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // datejourfr_C
dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse
td2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutArchivageFr
if ((dt1==dt0))
{
v_msg="Journée non ecore archivée!";
v_msgEng="No archived day!";
alert_ebene(v_msg, v_msgEng);
return;
}
if ((dt1>dt0))
{
v_msg="Date trop grande!";
v_msgEng="Date too big!";
alert_ebene(v_msg, v_msgEng);
return;
}
// /* mis en commentaire le 28/08/2018 pour les tests
if ((dt1<td2))
{
v_msg="Date minimum : "+debutArchivageFr+"!";
v_msgEng="Minimum date : "+debutArchivageFr+"!";
alert_ebene(v_msg, v_msgEng);
return;
}
// */
/*
if ((dt1==dt0))
{
$("#div_attente").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Chargment en temps réel. Veuillez patienter...' + '</span></div>');
}
else
{
$("#div_attente").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Chargement archive du '+dateAnalyse+'. Veuillez patienter...' + '</span></div>');
}
*/
// $("#div_attente").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Chargement archive du '+dateAnalyse+'. Veuillez patienter...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxinitstat/initstat/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
afficherstat();
}
});
}
function initierstatistiques_non_archives()
{
dateAnalyse = $("#dateAnalyse").val();
debutArchivageFr = $("#debutArchivageFr").val();
if (dateAnalyse<=" ")
{
v_msg="Veuillez indiquer une date!";
v_msgEng="Please enter a date!";
alert_ebene(v_msg, v_msgEng);
$("#dateAnalyse").focus();
return;
}
donnees = 'dateAnalyse='+dateAnalyse;
var td0 = $("#datejourfr_C").datepicker("getDate");
var td1 = $("#dateAnalyse").datepicker("getDate");
var td2 = $("#debutArchivageFr").datepicker("getDate");
dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // datejourfr_C
dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse
td2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutArchivageFr
if ((dt1>dt0))
{
v_msg="Date trop grande!";
v_msgEng="Date too big!";
alert_ebene(v_msg, v_msgEng);
return;
}
$.ajax({
url: $("#racineWeb").val()+"Ajaxinitstat/initstat/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
afficherstatnonarchives();
}
});
}
function afficherstat()
{
window.location.assign($("#racineWeb" ).val()+"Statistiques/");
}
function afficherstatnonarchives()
{
window.location.assign($("#racineWeb" ).val()+"Statistiquesnonarchives/");
}
function reinitialiser_prestataire()
{
$("#codePrestataire").val("");
$("#close_pop").click();
codeLangue = $("#codeLangue").val();
if(codeLangue=="en_US")
{
$("#libelleApporteur").html("All / Search Provider...");
}
else
{
$("#nomPrestataire").html("Tous / Rechercher Prestataire ...");
}
}
function ctrlkeypress_prestataire(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
afficher_pop_recherche_prestataire();
}
}
function afficher_pop_recherche_prestataire()
{
codesearch = $("#codesearch").val();
nomsearch = $("#nomsearch").val();
if(codesearch+nomsearch<=" ")
return;
donnees = "valid=1&codesearch="+codesearch+"&nomsearch="+nomsearch;
$("#div_listeprestataires").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisteprestataires/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_listeprestataires").html(data);
}
});
}
function selectionner_prestataire(codePrestataire, nomPrestataire)
{
$("#codePrestataire").val(codePrestataire);
$("#nomPrestataire").html(nomPrestataire);
$("#close_pop").click();
}
// 2
function reinitialiser_prestataire2()
{
$("#codePrestataire").val("");
$("#nomPrestataire").html("Tous / Rechercher Prestataire ...");
$("#close_pop2").click();
}
function ctrlkeypress_prestataire2(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
afficher_pop_recherche_prestataire2();
}
}
function afficher_pop_recherche_prestataire2()
{
codesearch = $("#codesearch2").val();
nomsearch = $("#nomsearch2").val();
if(codesearch+nomsearch<=" ")
return;
donnees = "valid=1&codesearch="+codesearch+"&nomsearch="+nomsearch;
$("#div_listeprestataires").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisteprestatairesb/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_listeprestataires").html(data);
}
});
}
function selectionner_prestataire2(codePrestataire, nomPrestataire)
{
$("#codePrestataire").val(codePrestataire);
$("#nomPrestataire").html(nomPrestataire);
$("#close_pop2").click();
}
function prestataire_tm()
{
window.location.assign($("#racineWeb" ).val()+"Prestatairetm/");
}
function ajouter_un_prestataire_tm(codePrestataire)
{
donnees = 'codePrestataire='+codePrestataire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestatairetm/ajouterunprestatairetm/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_complet").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function retirer_un_prestataire_tm(idPrestation)
{
donnees = 'idPrestation='+idPrestation;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestatairetm/retirer/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_complet").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function ajax_maj_tm_tm(idPrestation, tm, controle)
{
tm=tm.replace(",",".");
controle.value=tm;
donnees = 'idPrestation='+idPrestation+"&tm="+tm;
if(controle_numerique(controle))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestatairetm/majtm/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_complet").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
}
function prestataire_tm_cons()
{
window.location.assign($("#racineWeb" ).val()+"Prestatairetmcons/");
}
function afficher_prestataire_tm()
{
idCollege = $("#idCollege").val();
donnees = 'idCollege='+idCollege;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestatairetmcons/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_complet").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function de_archiver_garantie_college(idCollege)
{
v_msg="Confirmez-vous le désarchivage des garanties de ce collège?";
v_msgEng="Do you confirm the unarchivity of the guarantees of this college?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxcollege/desarchivergarntie/",
type : 'post',
data: "idCollege="+idCollege,
success: function(data) {
},
complete: function()
{
college_police();
}
});
}
}
function ajaxentetestat()
{
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
donnees = 'codeEtat='+codeEtat;
v_url = $("#racineWeb").val()+"Ajaxetatentete"+codeEtat+"/";
$("#div_ente_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#div_ente_requete").html(data);
$(".datepicker" ).datepicker();
}
});
}
//
function etat_cumul_prestataire()
{
var td0 = $("#debutExercice").datepicker("getDate");
var td1 = $("#dateAnalyse").datepicker("getDate");
var td2 = $("#debutStat").datepicker("getDate");
var td3 = $("#finStat").datepicker("getDate");
dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // debutExercice
dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse
dt2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutStat
dt3=Math.round(Date.parse(td3)/(1000*3600*24)); // finStat
if (dt2<dt0 || dt2>dt1)
{
v_msg="Période a extraire hors de la période d\'analyse!";
v_msgEng="Period to extract out of the analysis period!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt3<dt0 || dt3>dt1)
{
v_msg="Période a extraire hors de la période d\'analyse!";
v_msgEng="Period to extract out of the analysis period!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt3<dt2)
{
v_msg="Revoir les bornes de la période!";
v_msgEng="Review the boundaries of the period!";
alert_ebene(v_msg, v_msgEng);
return;
}
debutStat = $("#debutStat").val();
finStat = $("#finStat").val();
$('#div_export_a').html("");
donnees_retour = "";
donnees = 'debutStat='+debutStat+"&finStat="+finStat;
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('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_cumul_prestataire_export()
{
var td0 = $("#debutExercice").datepicker("getDate");
var td1 = $("#dateAnalyse").datepicker("getDate");
var td2 = $("#debutStat").datepicker("getDate");
var td3 = $("#finStat").datepicker("getDate");
dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // debutExercice
dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse
dt2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutStat
dt3=Math.round(Date.parse(td3)/(1000*3600*24)); // finStat
if (dt2<dt0 || dt2>dt1)
{
v_msg="Période a extraire hors de la période d\'analyse!";
v_msgEng="Period to extract out of the analysis period!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt3<dt0 || dt3>dt1)
{
v_msg="Période a extraire hors de la période d\'analyse!";
v_msgEng="Period to extract out of the analysis period!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt3<dt2)
{
v_msg="Revoir les bornes de la période!";
v_msgEng="Review the boundaries of the period!";
alert_ebene(v_msg, v_msgEng);
return;
}
debutStat = $("#debutStat").val();
finStat = $("#finStat").val();
$('#div_export_a').html("");
donnees_retour = "";
donnees = 'debutStat='+debutStat+"&finStat="+finStat;
$('#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()+"Ajaxetat"+codeEtat+"export/";
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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);
}
});
}
// factures cleints
function requetes_factures_client()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
// Ligne 2
numeroBonConsultation1 = $("#numeroBonConsultation1").val();
numeroBonConsultation2 = $("#numeroBonConsultation2").val();
numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val();
numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val();
numeroBonOptique1 = $("#numeroBonOptique1").val();
numeroBonOptique2 = $("#numeroBonOptique2").val();
// Ligne 3
codeTypePrestataire = $("#codeTypePrestataire").val();
numeroDecompte1 = $("#numeroDecompte1").val();
numeroDecompte2 = $("#numeroDecompte2").val();
hospitalisation = $("#hospitalisation").val();
numeroChambre = $("#numeroChambre").val();
chirurgie = $("#chirurgie").val();
// Ligne 4
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// FIN champs
// DEBUT convertir_en_entier
numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1);
numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
// Ligne 2
donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1;
donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2;
donnees += '&numeroBonOptique1=' + numeroBonOptique1;
donnees += '&numeroBonOptique2=' + numeroBonOptique2;
// Ligne 3
donnees += '&codeTypePrestataire=' + codeTypePrestataire;
donnees += '&numeroDecompte1=' + numeroDecompte1;
donnees += '&numeroDecompte2=' + numeroDecompte2;
donnees += '&hospitalisation=' + hospitalisation;
donnees += '&numeroChambre=' + numeroChambre;
donnees += '&chirurgie=' + chirurgie;
// Ligne 4
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_client_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
// Ligne 1
codePrestataire = $("#codePrestataire").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
numeroAdherent = $("#numeroAdherent").val();
numeroBeneficiaire = $("#numeroBeneficiaire").val();
// Ligne 2
numeroBonConsultation1 = $("#numeroBonConsultation1").val();
numeroBonConsultation2 = $("#numeroBonConsultation2").val();
numeroBonOrdonnance1 = $("#numeroBonOrdonnance1").val();
numeroBonOrdonnance2 = $("#numeroBonOrdonnance2").val();
numeroBonHospitalisation1 = $("#numeroBonHospitalisation1").val();
numeroBonHospitalisation2 = $("#numeroBonHospitalisation2").val();
numeroBonOptique1 = $("#numeroBonOptique1").val();
numeroBonOptique2 = $("#numeroBonOptique2").val();
// Ligne 3
codeTypePrestataire = $("#codeTypePrestataire").val();
numeroDecompte1 = $("#numeroDecompte1").val();
numeroDecompte2 = $("#numeroDecompte2").val();
hospitalisation = $("#hospitalisation").val();
numeroChambre = $("#numeroChambre").val();
chirurgie = $("#chirurgie").val();
// Ligne 4
adherent = $("#adherent").val();
beneficiaire = $("#beneficiaire").val();
// FIN champs
// DEBUT convertir_en_entier
numeroBonConsultation1 = convertir_en_entier(numeroBonConsultation1);
numeroBonConsultation2 = convertir_en_entier(numeroBonConsultation2);
numeroBonOrdonnance1 = convertir_en_entier(numeroBonOrdonnance1);
numeroBonOrdonnance2 = convertir_en_entier(numeroBonOrdonnance2);
numeroBonOptique1 = convertir_en_entier(numeroBonOptique1);
numeroBonOptique2 = convertir_en_entier(numeroBonOptique2);
numeroBonHospitalisation1 = convertir_en_entier(numeroBonHospitalisation1);
numeroBonHospitalisation2 = convertir_en_entier(numeroBonHospitalisation2);
// FIN convertir_en_entier
// Ligne 1
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
donnees += '&numeroAdherent=' + numeroAdherent;
donnees += '&numeroBeneficiaire=' + numeroBeneficiaire;
// Ligne 2
donnees += '&numeroBonConsultation1=' + numeroBonConsultation1;
donnees += '&numeroBonConsultation2=' + numeroBonConsultation2;
donnees += '&numeroBonOrdonnance1=' + numeroBonOrdonnance1;
donnees += '&numeroBonOrdonnance2=' + numeroBonOrdonnance2;
donnees += '&numeroBonHospitalisation1=' + numeroBonHospitalisation1;
donnees += '&numeroBonHospitalisation2=' + numeroBonHospitalisation2;
donnees += '&numeroBonOptique1=' + numeroBonOptique1;
donnees += '&numeroBonOptique2=' + numeroBonOptique2;
// Ligne 3
donnees += '&codeTypePrestataire=' + codeTypePrestataire;
donnees += '&numeroDecompte1=' + numeroDecompte1;
donnees += '&numeroDecompte2=' + numeroDecompte2;
donnees += '&hospitalisation=' + hospitalisation;
donnees += '&numeroChambre=' + numeroChambre;
donnees += '&chirurgie=' + chirurgie;
// Ligne 4
donnees += '&adherent=' + adherent;
donnees += '&beneficiaire=' + beneficiaire;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_cumul_type_prestataire()
{
var td0 = $("#debutExercice").datepicker("getDate");
var td1 = $("#dateAnalyse").datepicker("getDate");
var td2 = $("#debutStat").datepicker("getDate");
var td3 = $("#finStat").datepicker("getDate");
dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // debutExercice
dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse
dt2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutStat
dt3=Math.round(Date.parse(td3)/(1000*3600*24)); // finStat
if (dt2<dt0 || dt2>dt1)
{
v_msg="Période a extraire hors de la période d\'analyse!";
v_msgEng="Period to extract out of the analysis period!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt3<dt0 || dt3>dt1)
{
v_msg="Période a extraire hors de la période d\'analyse!";
v_msgEng="Period to extract out of the analysis period!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt3<dt2)
{
v_msg="Revoir les bornes de la période!";
v_msgEng="Review the boundaries of the period!";
alert_ebene(v_msg, v_msgEng);
return;
}
debutStat = $("#debutStat").val();
finStat = $("#finStat").val();
$('#div_export_a').html("");
donnees_retour = "";
donnees = 'debutStat='+debutStat+"&finStat="+finStat;
$('#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()+"Ajaxetat"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_cumul_type_prestataire_export()
{
var td0 = $("#debutExercice").datepicker("getDate");
var td1 = $("#dateAnalyse").datepicker("getDate");
var td2 = $("#debutStat").datepicker("getDate");
var td3 = $("#finStat").datepicker("getDate");
dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // debutExercice
dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse
dt2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutStat
dt3=Math.round(Date.parse(td3)/(1000*3600*24)); // finStat
if (dt2<dt0 || dt2>dt1)
{
v_msg="Période a extraire hors de la période d\'analyse!";
v_msgEng="Period to extract out of the analysis period!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt3<dt0 || dt3>dt1)
{
v_msg="Période a extraire hors de la période d\'analyse!";
v_msgEng="Period to extract out of the analysis period!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt3<dt2)
{
v_msg="Revoir les bornes de la période!";
v_msgEng="Review the boundaries of the period!";
alert_ebene(v_msg, v_msgEng);
return;
}
debutStat = $("#debutStat").val();
finStat = $("#finStat").val();
$('#div_export_a').html("");
donnees_retour = "";
donnees = 'debutStat='+debutStat+"&finStat="+finStat;
$('#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()+"Ajaxetat"+codeEtat+"export/";
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_detail_facture_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"export/";
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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);
}
});
}
// cumul par mois
function etat_cumul_mois()
{
var td0 = $("#debutExercice").datepicker("getDate");
var td1 = $("#dateAnalyse").datepicker("getDate");
var td2 = $("#debutStat").datepicker("getDate");
var td3 = $("#finStat").datepicker("getDate");
dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // debutExercice
dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse
dt2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutStat
dt3=Math.round(Date.parse(td3)/(1000*3600*24)); // finStat
if (dt2<dt0 || dt2>dt1)
{
v_msg="Période a extraire hors de la période d\'analyse!";
v_msgEng="Period to extract out of the analysis period!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt3<dt0 || dt3>dt1)
{
v_msg="Période a extraire hors de la période d\'analyse!";
v_msgEng="Period to extract out of the analysis period!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt3<dt2)
{
v_msg="Revoir les bornes de la période!";
v_msgEng="Review the boundaries of the period!";
alert_ebene(v_msg, v_msgEng);
return;
}
debutStat = $("#debutStat").val();
finStat = $("#finStat").val();
donnees_retour = "";
donnees = 'debutStat='+debutStat+"&finStat="+finStat;
$('#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()+"Ajaxetat"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_cumul_mois_export()
{
var td0 = $("#debutExercice").datepicker("getDate");
var td1 = $("#dateAnalyse").datepicker("getDate");
var td2 = $("#debutStat").datepicker("getDate");
var td3 = $("#finStat").datepicker("getDate");
dt0=Math.round(Date.parse(td0)/(1000*3600*24)); // debutExercice
dt1=Math.round(Date.parse(td1)/(1000*3600*24)); // dateAnalyse
dt2=Math.round(Date.parse(td2)/(1000*3600*24)); // debutStat
dt3=Math.round(Date.parse(td3)/(1000*3600*24)); // finStat
if (dt2<dt0 || dt2>dt1)
{
v_msg="Période a extraire hors de la période d\'analyse!";
v_msgEng="Period to extract out of the analysis period!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt3<dt0 || dt3>dt1)
{
v_msg="Période a extraire hors de la période d\'analyse!";
v_msgEng="Period to extract out of the analysis period!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (dt3<dt2)
{
v_msg="Revoir les bornes de la période!";
v_msgEng="Review the boundaries of the period!";
alert_ebene(v_msg, v_msgEng);
return;
}
debutStat = $("#debutStat").val();
finStat = $("#finStat").val();
$('#div_export_a').html("");
donnees_retour = "";
donnees = 'debutStat='+debutStat+"&finStat="+finStat;
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('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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);
}
});
}
// raport SP
function etat_rapport_sp_exo()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_exo_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"export/";
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_rapport_sp()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_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('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_stat_prestataire()
{
$('#div_export_b').html("");
codePrestataire = $("#codePrestataire").val();
donnees = "codePrestataire="+codePrestataire;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxrequetefactureprestataire/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function afficher_detail_stat_prestataire(codePrestataire)
{
$('#div_export_b').html("");
$("#codePrestataire").val(codePrestataire);
$("#btn_pop_detail").click();
}
function afficher_detail_stat_type_prestataire(codeReseau)
{
$('#div_export_b').html("");
$("#codeReseau").val(codeReseau);
$("#btn_pop_detail").click();
}
function charger_detail_stat_type_prestataire()
{
$('#div_export_b').html("");
codeReseau = $("#codeReseau").val();
donnees = "codeReseau="+codeReseau;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxrequetefacturetypeprestataire/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function afficher_detail_stat_prestataire_mois(codePrestataire, mois)
{
$('#div_export_b').html("");
$("#codePrestataire").val(codePrestataire);
$("#mois").val(mois);
$("#btn_pop_detail").click();
}
function charger_detail_stat_prestataire_mois()
{
$('#div_export_b').html("");
codePrestataire = $("#codePrestataire").val();
mois = $("#mois").val();
donnees = "codePrestataire="+codePrestataire+"&mois="+mois;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxrequetefactureprestatairemois/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function maj_date_sortie()
{
etat=$("#codeEtatPolice_C").val();
if (etat=="RE")
{
v_msg="Attention! Police résiliée!";
v_msgEng="Warning! Terminated policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="SU")
{
v_msg="Attention! Police suspendue!";
v_msgEng="Warning! Suspended policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="AN")
{
v_msg="Attention! Police annulée!";
v_msgEng="Warning! Canceled policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Majdatesortie/");
}
function enregistrer_maj_date_sortie()
{
codeEtatBeneficiaire=$("#codeEtatBeneficiaire").val();
motifSortie=$("#motifSortie").val();
if (motifSortie<" ")
{
v_msg="Veuillez indiquer le motif!";
v_msgEng="Please enter the reason!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous ce changement?";
v_msgEng="Do you confirm this change?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#btn_enreg").click();
}
}
function etat_rapport_sp_cat()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_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('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_rapport_sp_pol_cat()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_pol_cat_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"export/";
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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);
}
});
}
// etat DG
function etat_rapport_sp_pol_cat_det()
{
$('#div_export_a').html("");
donnees = "codeProduit="+$("#codeProduit").val();
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_pol_cat_det_export()
{
$('#div_export_a').html("");
donnees = "codeProduit="+$("#codeProduit").val();
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"export/";
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 saisirefacdecompte()
{
idSaisieDecompte = $("#idSaisieDecompte" ).val();
lienPrestation_C = $("#lienPrestation_C" ).val();
lienProduction_C = $("#lienProduction_C" ).val();
v_url = lienPrestation_C+"/Connexiondecompte/"+idSaisieDecompte;
if (idSaisieDecompte>"")
{
window.location.assign(v_url);
}
}
// etat 10
function etat_rapport_sp_cat_det()
{
$('#div_export_a').html("");
donnees = "codeProduit="+$("#codeProduit").val();
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_cat_det_export()
{
$('#div_export_a').html("");
donnees = "codeProduit="+$("#codeProduit").val();
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"export/";
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 creer_substitut_non_assure()
{
v_msg="Confirmez-vous la substitution?";
v_msgEng="question";
if(confirm_ebene(v_msg, v_msgEng))
{
nomSubstitut = $("#nomSubstitut").val();
prenomsSubstitut = $("#prenomsSubstitut").val();
codeLienSubstitut = $("#codeLienSubstitut").val();
codeNaturePiece = $("#codeNaturePiece").val();
numeroPieceSubstitut = $("#numeroPieceSubstitut").val();
sexeSubstitut = $("#sexeSubstitut").val();
dateNaissanceSubstitut = $("#dateNaissanceSubstitut").val();
telephonePortableSubstitut = $("#telephonePortableSubstitut").val();
donnees = "nomSubstitut="+nomSubstitut;
donnees += "&prenomsSubstitut="+prenomsSubstitut;
donnees += "&codeLienSubstitut="+codeLienSubstitut;
donnees += "&codeNaturePiece="+codeNaturePiece;
donnees += "&numeroPieceSubstitut="+numeroPieceSubstitut;
donnees += "&sexeSubstitut="+sexeSubstitut;
donnees += "&dateNaissanceSubstitut="+dateNaissanceSubstitut;
donnees += "&telephonePortableSubstitut="+telephonePortableSubstitut;
$.ajax({
url: $("#racineWeb").val()+"Ajaxsubstitutnonassure/creersubstitutnonassure/",
type: 'POST',
data: donnees,
success: function(data) {
v_msg="Substitut créé avec succès!";
v_msgEng="Substitute successfully created!";
alert_ebene(v_msg, v_msgEng);
},
error: function(data) {
},
complete: function() {
prestations();
}
});
}
}
function supprimer_substitut_non_assure()
{
idSubstitut = $("#idSubstitut_C").val();
v_msg="Confirmez-vous la suppression du substitut?";
v_msgEng="Do you confirm the removal of the substitute?";
if(confirm_ebene(v_msg, v_msgEng))
{
motifSortie = "";
v_msg="Supprimé pour quel motif?";
v_msgEng="Deleted for what reason?";
motifSortie = prompt_ebene(v_msg, v_msgEng, motifSortie);
if (motifSortie<=" ")
{
v_msg="Vous devez saisir un motif!";
v_msgEng="You have to enter a reason!";
alert_ebene(v_msg, v_msgEng);
return;
}
donnees = 'idSubstitut='+idSubstitut+'&motifSortie='+motifSortie;
$.ajax({
url: $("#racineWeb").val()+"Ajaxsubstitutnonassure/supprimersubstitutnonassure/",
type: 'POST',
data: donnees,
success: function(data) {
v_msg="Substitut supprimé avec succès!";
v_msgEng="Substitute successfully removed!";
alert_ebene(v_msg, v_msgEng);
},
error: function(data) {
},
complete: function() {
prestations();
}
});
}
}
// Polices non renouvellées
function etat_polices_non_renouvellees()
{
$('#div_export_a').html("");
donnees = "codeProduit="+$("#codeProduit").val();
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_polices_non_renouvellees_export()
{
$('#div_export_a').html("");
donnees = "codeProduit="+$("#codeProduit").val();
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"export/";
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 maj_plafond_gar_opt(idGarantie, plafond, controle)
{
if(controle_numerique(controle))
{
donnees = 'idGarantie='+idGarantie+"&plafond="+plafond;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgarantiescollege/majplafondopt/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_garanties").html(data);
},
error: function(data) {
},
complete: function() {
controle.focus();
}
});
}
}
function derogation_medicament()
{
window.location.assign($("#racineWeb" ).val()+"Derogationmedicement/");
}
function refuser_derogation_medicament(idCollege)
{
v_msg="Confirmez-vous ce refus?";
v_msgEng="Do you confirm this refusal?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxcollege/refuserderogationmedicament/",
type : 'post',
data: "idCollege="+idCollege,
success: function(data) {
},
complete: function()
{
derogation_medicament();
}
});
}
}
function accorder_derogation_medicament(idCollege)
{
v_msg="Confirmez-vous cet accord?";
v_msgEng="Do you confirm this agreement?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxcollege/accorderderogationmedicament/",
type : 'post',
data: "idCollege="+idCollege,
success: function(data) {
},
complete: function()
{
derogation_medicament();
}
});
}
}
function afficher_detail_stat_police(idPolice, emailRapport)
{
$('#div_export_b').html("");
$("#idPolice").val(idPolice);
$("#emailRapport").val(emailRapport);
$("#emailRapport_0").val(emailRapport);
$("#btn_pop_detail").click();
}
function charger_detail_stat_police()
{
$('#div_export_b').html("");
idPolice = $("#idPolice").val();
donnees = "idPolice="+idPolice;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportsp/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function charger_detail_stat_police_pdf()
{
$('#div_export_b').html("");
idPolice = $("#idPolice").val();
donnees = "idPolice="+idPolice;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportsppdf/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function charger_detail_stat_police_facture()
{
$('#div_export_b').html("");
idPolice = $("#idPolice").val();
donnees = "idPolice="+idPolice;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportspfacture/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function charger_detail_stat_police_garantie()
{
$('#div_export_b').html("");
idPolice = $("#idPolice").val();
donnees = "idPolice="+idPolice;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportspgarantie/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function charger_detail_stat_police_facture_pdf()
{
$('#div_export_b').html("");
idPolice = $("#idPolice").val();
donnees = "idPolice="+idPolice;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportspfacturepdf/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function charger_detail_stat_police_garantie_pdf()
{
$('#div_export_b').html("");
idPolice = $("#idPolice").val();
donnees = "idPolice="+idPolice;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportspgarantiepdf/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function de_archiver_adherent(idAherent)
{
v_msg="Confirmez-vous le désarchivage de cette famille?";
v_msgEng="Do you confirm the unarchiving of this family?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxcollege/desarchiveradherent/",
type : 'post',
data: "idAherent="+idAherent,
success: function(data) {
},
complete: function()
{
adherents_police();
}
});
}
}
function archiver_adherent(idAherent)
{
v_msg="Confirmez-vous l\'archivage de cette famille?";
v_msgEng="Do you confirm the archiving of this family?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxcollege/archiveradherent/",
type : 'post',
data: "idAherent="+idAherent,
success: function(data) {
},
complete: function()
{
adherents_police();
}
});
}
}
function archiver_adherent_fiche(idAherent)
{
v_msg="Confirmez-vous l\'archivage de cette famille?";
v_msgEng="Do you confirm the archiving of this family?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxcollege/archiveradherent/",
type : 'post',
data: "idAherent="+idAherent,
success: function(data) {
},
complete: function()
{
afficher_adherent_id();
}
});
}
}
function de_archiver_adherent_fiche(idAherent)
{
v_msg="Confirmez-vous le désarchivage de cette famille?";
v_msgEng="Do you confirm the unarchiving of this family?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxcollege/desarchiveradherent/",
type : 'post',
data: "idAherent="+idAherent,
success: function(data) {
},
complete: function()
{
afficher_adherent_id();
}
});
}
}
function archiver_beneficiaire(idBeneficiaire)
{
v_msg="Confirmez-vous l\'archivage de cette personne?";
v_msgEng="Do you confirm the archiving of this person?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxcollege/archiverbeneficiaire/",
type : 'post',
data: "idBeneficiaire="+idBeneficiaire,
success: function(data) {
},
complete: function()
{
afficher_adherent_id();
}
});
}
}
function de_archiver_beneficiaire(idBeneficiaire)
{
v_msg="Confirmez-vous le désarchivage de cette personne?";
v_msgEng="Do you confirm the unarchiving of this person?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxcollege/desarchiverbeneficiaire/",
type : 'post',
data: "idBeneficiaire="+idBeneficiaire,
success: function(data) {
},
complete: function()
{
afficher_adherent_id();
}
});
}
}
function afficher_lite_prestataire()
{
donnees = "";
donnees_retour = "";
codeTypePrestataire = $("#codeTypePrestataire").val();
codeReseau = $("#codeReseau").val();
libelle = $("#libelle").val();
codePays = $("#codePays").val();
codeVille = $("#codeVille").val();
codeLocalite = $("#codeLocalite").val();
donnees += 'codeTypePrestataire=' + codeTypePrestataire;
donnees += '&codeReseau=' + codeReseau;
donnees += '&libelle=' + libelle;
donnees += '&codePays=' + codePays;
donnees += '&codeVille=' + codeVille;
donnees += '&codeLocalite=' + codeLocalite;
$("#div_liste_prestataire").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisteprestataireparametrage/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$("#div_liste_prestataire").html(donnees_retour);
$("#nbligne").val("Lignes : "+$("#nbligne_info").val());
}
});
}
function afficher_prestataire_id(idPrestataire)
{
window.location.assign($("#racineWeb" ).val()+"Ficheprestataire/"+idPrestataire+"/");
}
function modifier_prestataire()
{
idPrestataire = $("#idPrestataire" ).val();
if (idPrestataire>"0")
{
window.location.assign($("#racineWeb" ).val()+"Modifierprestataire/"+idPrestataire+"/");
}
}
function enregistrer_modif_prestataire()
{
idPrestataire = $("#idPrestataire").val();
libelle = $("#libelle").val();
codeTypePrestataire = $("#codeTypePrestataire").val();
codeReseau = $("#codeReseau").val();
codeTarifActe = $("#codeTarifActe").val();
codeTarifMedicament = $("#codeTarifMedicament").val();
codeTarifOptique = $("#codeTarifOptique").val();
codePays = $("#codePays").val();
villeSignature = $("#villeSignature").val();
codeTypeDecompte = $("#codeTypeDecompte").val();
adresseGeo = $("#adresseGeo").val();
numeroCompte = $("#numeroCompte").val();
adressePost = $("#adressePost").val();
conventionne = $("#conventionne").val();
gestionreseau = $("#gestionreseau").val();
emailGestionPrestataire = $("#emailGestionPrestataire").val();
rdvPossible = $("#rdvPossible").val();
// Prise en compte des comptes bancaires prestataire
codeBanque = $("#codeBanque").val();
codeBanqueInterne = $("#codeBanqueInterne").val();
codeGuichet = $("#codeGuichet").val();
numeroCompteBancaire = $("#numeroCompteBancaire").val();
cleRib = $("#cleRib").val();
iban = $("#iban").val();
intituleCompteBancaire = $("#intituleCompteBancaire").val();
//
codeVille = $("#codeVille").val();
codeLocalite = $("#codeLocalite").val();
smsGestionPrestataire = $("#smsGestionPrestataire").val();
registreCommerce = $("#registreCommerce").val();
codeLanguePrestataire = $("#codeLangueUser").val();
if(libelle<=" ")
{
v_msg="Veuillez indiquer le nom du prestataire!";
v_msgEng="Please enter the name of the provider";
alert_ebene(v_msg, v_msgEng);
$("#libelle").focus();
return;
}
if(codeTypePrestataire<=" ")
{
v_msg="Veuillez indiquer le type de prestataire!";
v_msgEng="Please indicate the type of provider!";
alert_ebene(v_msg, v_msgEng);
$("#codeTypePrestataire").focus();
return;
}
if(codeReseau<=" ")
{
v_msg="Veuillez indiquer le réseau!";
v_msgEng="Please indicate the care network!";
alert_ebene(v_msg, v_msgEng);
$("#codeReseau").focus();
return;
}
if (codeTypePrestataire=="CSO" || codeTypePrestataire=="DEN" || codeTypePrestataire=="HRW" || codeTypePrestataire=="LAB"|| codeTypePrestataire=="SEA")
{
if (codeTarifActe<" ")
{
v_msg="Veuillez fournir le tarif des actes!";
v_msgEng="Please provide the rates of the acts!";
alert_ebene(v_msg, v_msgEng);
$("#codeTarifActe").focus();
return;
}
}
if (codeTypePrestataire=="PHA")
{
if (codeTarifMedicament<" ")
{
v_msg="Veuillez fournir le tarif des médicaments!";
v_msgEng="Please provide the price of the drugs!";
alert_ebene(v_msg, v_msgEng);
$("#codeTarifMedicament").focus();
return;
}
}
if (codeTypePrestataire=="OPT")
{
if (codeTarifOptique<" ")
{
v_msg="Veuillez fournir le tarif optique!";
v_msgEng="Please provide the optical rate!";
alert_ebene(v_msg, v_msgEng);
$("#codeTarifOptique").focus();
return;
}
}
if(villeSignature<=" ")
{
v_msg="Veuillez indiquer la ville de signature!";
v_msgEng="Please indicate the city of signature!";
alert_ebene(v_msg, v_msgEng);
$("#villeSignature").focus();
return;
}
if(codeTypeDecompte<=" ")
{
v_msg="Veuillez indiquer la type de décompte!";
v_msgEng="Please indicate the type of count!";
alert_ebene(v_msg, v_msgEng);
$("#codeTypeDecompte").focus();
return;
}
if(conventionne<=" ")
{
v_msg="Le prestataire est-il conventionné ou pas?";
v_msgEng="Do the provider have an convetion or not?";
alert_ebene(v_msg, v_msgEng);
$("#conventionne").focus();
return;
}
if(gestionreseau<=" ")
{
v_msg="Tenir compte des réseaux de soins ou pas?";
v_msgEng="Consider care networks or not?";
alert_ebene(v_msg, v_msgEng);
$("#gestionreseau").focus();
return;
}
if(codeLanguePrestataire<=" ")
{
v_msg="Veuillez sélectionner une langue";
v_msgEng="Please select a language";
alert_ebene(v_msg, v_msgEng);
$("#codeLangueUser").focus();
return;
}
if(registreCommerce.length<9)
{
v_msg="Veuillez revoir le TIN";
v_msgEng="Please review the TIN";
alert_ebene(v_msg, v_msgEng);
$("#registreCommerce").focus();
return;
}
donnees = 'idPrestataire='+idPrestataire+'&libelle='+libelle+'&codeTypePrestataire='+codeTypePrestataire;
donnees += '&codeReseau='+codeReseau+'&codeTarifActe='+codeTarifActe+'&codeTarifMedicament='+codeTarifMedicament;
donnees += '&codeTarifOptique='+codeTarifOptique+'&codePays='+codePays+'&villeSignature='+villeSignature;
donnees += '&codeTypeDecompte='+codeTypeDecompte+'&adresseGeo='+adresseGeo+'&numeroCompte='+numeroCompte;
donnees += '&adressePost='+adressePost+'&conventionne='+conventionne+'&gestionreseau='+gestionreseau+'&emailGestionPrestataire='+emailGestionPrestataire;
donnees += '&codeBanque='+codeBanque+'&codeBanqueInterne='+codeBanqueInterne+'&codeGuichet='+codeGuichet;
donnees += '&numeroCompteBancaire='+numeroCompteBancaire+'&cleRib='+cleRib+'&iban='+iban+'&intituleCompteBancaire='+intituleCompteBancaire;
donnees += '&codeVille='+codeVille+'&codeLocalite='+codeLocalite+'&smsGestionPrestataire='+smsGestionPrestataire+'&registreCommerce='+registreCommerce;
donnees += '&codeLanguePrestataire='+codeLanguePrestataire;
donnees += '&rdvPossible='+rdvPossible;
// 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/enregistrermodif/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
retour_prestataire_id();
}
});
}
}
function retour_prestataire_id()
{
idPrestataire = $("#idPrestataire").val();
afficher_prestataire_id(idPrestataire);
}
function requetes_factures_leger()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
// Ligne 1
donnees += 'dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_leger_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
// Ligne 1
donnees += 'dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_pha()
{
window.location.assign($("#racineWeb" ).val()+"Listeententeprealablespha/");
}
function listeententeprealablespha()
{
codeReponseEntentePrealable=$("#codeReponseEntentePrealable").val();
debut=$("#debut").val();
fin=$("#fin").val();
donnees = 'codeReponseEntentePrealable='+codeReponseEntentePrealable;
donnees += '&debut='+debut+'&fin='+fin;
$("#div_ententeprealable").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealablespha/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_ententeprealable").html(data);
},
complete: function() {
}
});
}
function accepter_ententeprealable_pha(idDemandeententeprealable, facture)
{
if (facture==1)
{
v_msg="Déjà facturé!";
v_msgEng="Already charged!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Accepterententeprealablespha/"+idDemandeententeprealable+"/");
}
function refuser_ententeprealable_pha(idDemandeententeprealable, facture)
{
if (facture==1)
{
v_msg="Déjà facturé!";
v_msgEng="Already charged!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Refuserententeprealablespha/"+idDemandeententeprealable+"/");
}
function enregistreraccordententepreslable_pha()
{
idDemandeententeprealable = $("#idDemandeententeprealable").val();
motifReel = $("#motifReel").val();
prixAccorde = $("#prixAccorde").val();
quantiteAccorde = $("#quantiteAccorde").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif!";
v_msgEng="Please enter the reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
prixAccorde=prixAccorde.replace(",",".");
$("#prixAccorde").val(prixAccorde);
if(isNaN(prixAccorde))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#prixAccorde").val("0");
$("#prixAccorde").focus();
return;
}
if(prixAccorde==0)
{
$("#prixAccorde").focus();
v_msg="Veuillez saisir le prix!";
v_msgEng="Please enter the price!";
alert_ebene(v_msg, v_msgEng);
return;
}
// qte accordee
quantiteAccorde=quantiteAccorde.replace(",",".");
$("#quantiteAccorde").val(quantiteAccorde);
if(isNaN(quantiteAccorde))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#quantiteAccorde").val("0");
$("#quantiteAccorde").focus();
return;
}
if(quantiteAccorde==0)
{
$("#quantiteAccorde").focus();
v_msg="Veuillez saisir la quantité!";
v_msgEng="Please enter the quantity!";
alert_ebene(v_msg, v_msgEng);
return;
}
// fin qte accordee
v_msg="Confirmez-vous cet accord?";
v_msgEng="Do you confirm this agreement?";
if(confirm_ebene(v_msg, v_msgEng))
{
codePrestataire = $("#codePrestataire").val();
donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&prixAccorde='+prixAccorde+'&quantiteAccorde='+quantiteAccorde;
donnees += '&codePrestataire='+codePrestataire;
donnees_sav = donnees;
typeMail='accordententeprealablepha';
typeSms = "accordententeprealablepha";
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistreraccordententeprealablepha/",
type : 'post',
data: donnees,
success: function(data) {
preparesms(typeSms);
},
complete: function() {
v_msg="Accord envoyé avec succès!";
v_msgEng="Agreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_ententeprealables_pha();
}
});
}
}
function enregistrerrefusententepreslable_pha()
{
idDemandeententeprealable = $("#idDemandeententeprealable").val();
motifReel = $("#motifReel").val();
motifRefusAssure = $("#motifRefusAssure").val();
if (motifReel<=" ")
{
v_msg="Veuillez saisir le motif réel!";
v_msgEng="Please enter the real reason!";
alert_ebene(v_msg, v_msgEng);
$("#motifReel").focus();
return;
}
if (motifRefusAssure<=" ")
{
v_msg="Veuillez saisir un motif pour l\'assuré!";
v_msgEng="Please enter a reason for the insured!";
alert_ebene(v_msg, v_msgEng);
$("#motifRefusAssure").focus();
return;
}
v_msg="Confirmez-vous ce refus?";
v_msgEng="Do you confirm this refusal?";
if(confirm_ebene(v_msg, v_msgEng))
{
codePrestataire = $("#codePrestataire").val();
donnees = 'idDemandeententeprealable='+idDemandeententeprealable+'&motifReel='+motifReel+'&motifRefusAssure='+motifRefusAssure;
donnees += '&codePrestataire='+codePrestataire;
donnees_sav = donnees;
typeMail='refusententeprealablepha';
typeSms="refusententeprealablepha";
$.ajax({
url: $("#racineWeb").val()+"Ajaxententeprealablesbenficiaire/enregistrerrefusententeprealablepha/",
type : 'post',
data: donnees,
success: function(data) {
preparesms(typeSms);
},
complete: function() {
v_msg="Refus envoyé avec succès!";
v_msgEng="Disagreement sent successfully!";
alert_ebene(v_msg, v_msgEng);
liste_ententeprealables_pha();
}
});
}
}
function controle_longeur_passe(controle)
{
longueur = controle.value.length;
if(longueur==0)
{
return false;
}
if(longueur<6)
{
v_msg="6 caractères minimum exigé!";
v_msgEng="6 characters minmum required!";
alert_ebene(v_msg, v_msgEng);
controle.value="";
controle.focus();
return false;
}
}
// 14/05/2018
function modifier_parametresgeneraux()
{
window.location.assign($("#racineWeb" ).val()+"Modifierparametresgeneraux/");
}
function afficher_parametresgeneraux()
{
window.location.assign($("#racineWeb" ).val()+"Parametresgeneraux/");
}
function enregistrer_modif_parametresgeneraux()
{
idSocieteuser = $("#idSocieteuser").val();
donnees = 'idSocieteuser='+idSocieteuser;
emailMedecinConseil = $("#emailMedecinConseil").val();
emailGestionBon = $("#emailGestionBon").val();
donnees += '&emailMedecinConseil='+emailMedecinConseil+'&emailGestionBon='+emailGestionBon;
emailCcomptabilite = $("#emailCcomptabilite").val();
emailDerogation = $("#emailDerogation").val();
emailAccordPrealable = $("#emailAccordPrealable").val();
donnees += '&emailCcomptabilite='+emailCcomptabilite+'&emailDerogation='+emailDerogation+'&emailAccordPrealable='+emailAccordPrealable;
emailFraudeFinger = $("#emailFraudeFinger").val();
email_standard = $("#email_standard").val();
email_reply = $("#email_reply").val();
smsMedecinConseil = $("#smsMedecinConseil").val();
donnees += '&emailFraudeFinger='+emailFraudeFinger+'&email_standard='+email_standard+'&smsMedecinConseil='+smsMedecinConseil+'&email_reply='+email_reply;
smsGestionBon = $("#smsGestionBon").val();
smsDerogation = $("#smsDerogation").val();
smsAccordPrealable = $("#smsAccordPrealable").val();
donnees += '&smsGestionBon='+smsGestionBon+'&smsDerogation='+smsDerogation+'&smsAccordPrealable='+smsAccordPrealable;
/*
sms_standard = $("#sms_standard").val();
donnees += '&sms_standard='+sms_standard;
*/
codeLangueSociete = $("#codeLangueUser").val();
if(codeLangueSociete<=" ")
{
v_msg="Veuillez sélectionner une langue";
v_msgEng="Please select a language";
alert_ebene(v_msg, v_msgEng);
$("#codeLangueUser").focus();
return;
}
donnees += '&codeLangueSociete='+codeLangueSociete;
$.ajax({
url: $("#racineWeb").val()+"Ajaxparametresgeneraux/enregistrermodif/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
afficher_parametresgeneraux();
}
});
}
function changer_verificateur()
{
userCourant = $("#userCourant").val();
codeUtilisateur = $("#codeUtilisateur").val();
if(codeUtilisateur==userCourant)
{
v_msg="Vous êtes déjà le vérificateur!";
v_msgEng="You are already the auditor!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous être le vérificateur?";
v_msgEng="Do you confirm to be the auditor?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/changerverificateur/",
success: function(data) {
},
error: function(data) {
},
complete: function() {
codeUtilisateur = $("#userCourant").val();
$("#codeUtilisateur").val(codeUtilisateur);
v_msg="Opération effectuée avec succès!";
v_msgEng="Operation successfully completed";
alert_ebene(v_msg, v_msgEng);
}
});
return;
}
else
{
v_msg="Opération annulée!";
v_msgEng="Operation canceled!";
alert_ebene(v_msg, v_msgEng);
return;
}
}
function requetes_verification()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
codeExercice=$("#codeExercice").val();
codeMois=$("#codeMois").val();
donnees += 'codeExercice=' + codeExercice;
donnees += '&codeMois=' + codeMois;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_verificateur()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
codeExercice=$("#codeExercice").val();
codeMois=$("#codeMois").val();
donnees += 'codeExercice=' + codeExercice;
donnees += '&codeMois=' + codeMois;
// lert(donnees);
// return;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_verification_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
codeExercice=$("#codeExercice").val();
codeMois=$("#codeMois").val();
donnees += 'codeExercice=' + codeExercice;
donnees += '&codeMois=' + codeMois;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 requetes_verificateur_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
codeExercice=$("#codeExercice").val();
codeMois=$("#codeMois").val();
donnees += 'codeExercice=' + codeExercice;
donnees += '&codeMois=' + codeMois;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_rapport_sp_adheleve()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_detail_factures_famille(idAdherent)
{
$('#div_export_b').html("");
$("#idAdherent").val(idAdherent);
$("#btn_pop_detail").click();
}
function charger_detail_stat_adherent_facture_pdf()
{
$('#div_export_b').html("");
idAdherent = $("#idAdherent").val();
donnees = "idAdherent="+idAdherent;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportspfactureadhpdf/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function charger_detail_stat_adherent_garantie_pdf()
{
$('#div_export_b').html("");
idAdherent = $("#idAdherent").val();
donnees = "idAdherent="+idAdherent;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportspgarantieadhpdf/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function charger_detail_stat_adherent_facture()
{
$('#div_export_b').html("");
idAdherent = $("#idAdherent").val();
donnees = "idAdherent="+idAdherent;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportspfactureadh/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function charger_detail_stat_adherent_garantie()
{
$('#div_export_b').html("");
idAdherent = $("#idAdherent").val();
donnees = "idAdherent="+idAdherent;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportspgarantieadh/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$('#div_export_b').html(donnees_retour);
}
});
}
function etat_rapport_sp_adheleve_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxetat"+codeEtat+"export/";
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 users_prestataire()
{
codePrestataire = $("#codePrestataire").val();
if (codePrestataire>" ")
{
window.location.assign($("#racineWeb" ).val()+"Usersprestaire/");
}
}
function reinitpaswd_prestataire(codeUtilisateur)
{
v_msg="Confirmez-vous la réinitialisation?";
v_msgEng="Do you confirm the reset?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = "codeUtilisateur="+codeUtilisateur;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestataire/reinitpaswd/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
v_msg="Opération effectuée avec succès!";
v_msgEng="Operation successfully completed";
alert_ebene(v_msg, v_msgEng);
users_prestataire();
}
});
return;
}
else
{
v_msg="Opération annulée!";
v_msgEng="Operation canceled!";
alert_ebene(v_msg, v_msgEng);
return;
}
}
function ajouter_facture_dec()
{
codePrestataire = $("#codePrestataire").val();
$.ajax({
url: $("#racineWeb").val()+"Ajaxajoutactesdec/",
type : 'post',
success: function(data) {
$("#div_ajout_actes").html(data);
},
complete: function() {
}
});
}
function ajax_actes_possibles_selection_dec()
{
codeFamilleActe=$("#codeFamilleActe").val();
donnees = 'codeFamilleActe='+codeFamilleActe;
$("#listeacte").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxactespossiblesselectiondec/",
type : 'post',
data: donnees,
success: function(data) {
$("#listeacte").html(data);
},
complete: function() {
}
});
}
function recap_ajout_acte_dec()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherverifierfacture/",
type: 'POST',
success: function(data) {
$("#div_verification_facture").html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function ajouter_un_acte_selection_dec(codeActe, prixActe, montantTm, aRembourser, ententePrealable)
{
donnee_a_affciher = "";
codeFamilleActe=$("#codeFamilleActe").val();
donnees=""
donnees_sav="";
if (codeActe<=" ")
{
v_msg="Veuillez sélectionner un acte!";
v_msgEng="Please select an act!";
alert_ebene(v_msg, v_msgEng);
return;
}
if(ententePrealable==1)
{
ententePrealable = "2";
}
donnees = 'codeFamilleActe='+codeFamilleActe+'&codeActe='+codeActe+'&ententePrealable='+ententePrealable;
donnees += '&prixActe='+prixActe+'&montantTm='+montantTm+'&aRembourser='+aRembourser;
numeroFeuilleMaladie=$("#numeroFeuilleMaladie_C").val();
donnees_sav = 'codeActe='+codeActe+'&numeroFeuilleMaladie='+numeroFeuilleMaladie+'&typeMail=mailententeprealable';
$("#div_prestations").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherajoutactesdec/ajouteractedecompte/",
type : 'post',
data: donnees,
success: function(data) {
donnee_a_affciher = data;
},
complete: function() {
$("#div_prestations").html(donnee_a_affciher);
}
});
}
function retirer_un_acte_selection_dec(idActe)
{
donnee_a_affciher = "";
donnees = 'idActe='+idActe;
$("#div_prestations").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxafficherajoutactesdec/retireractedecompte/",
type: 'post',
data: donnees,
success: function(data) {
donnee_a_affciher = data;
},
error: function(data) {
},
complete: function() {
$("#div_prestations").html(donnee_a_affciher);
}
});
}
function mail_detail_stat_police()
{
$('#div_export_b').html("");
idPolice = $("#idPolice").val();
emailRapport = $("#emailRapport").val();
emailRapport = emailRapport.trim();
if (emailRapport<=" ")
{
v_msg="Veuillez indiques les destinataires!";
v_msgEng="Please indicate the recipients!";
alert_ebene(v_msg, v_msgEng);
$("#emailRapport").focus();
return;
}
mauvais_mail=false;
email_err = "";
var addr = emailRapport.split(";");
addr.forEach(function(element)
{
if (test_adresse_email(element)==false)
{
email_err = element;
mauvais_mail = true;
// break;
return;
}
});
if(mauvais_mail==true)
{
v_msg="Veuillez revoir cette adresse : "+email_err;
v_msgEng="Please review this address : "+email_err ;
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous cet envoi?";
v_msgEng="Do you confirm this sending?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = "idPolice="+idPolice+"&emailRapport="+emailRapport;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportmail/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
div_export.html(" ");
v_msg="Opération terminée avec succès!";
v_msgEng="Operation completed successfully!";
alert_ebene(v_msg, v_msgEng);
}
});
}
}
function mail_detail_stat_police_facture()
{
$('#div_export_b').html("");
idPolice = $("#idPolice").val();
emailRapport = $("#emailRapport").val();
emailRapport = emailRapport.trim();
if (emailRapport<=" ")
{
v_msg="Veuillez indiques les destinataires!";
v_msgEng="Please indicate the recipients!";
alert_ebene(v_msg, v_msgEng);
$("#emailRapport").focus();
return;
}
mauvais_mail=false;
email_err = "";
var addr = emailRapport.split(";");
addr.forEach(function(element)
{
if (test_adresse_email(element)==false)
{
email_err = element;
mauvais_mail = true;
// break;
return;
}
});
if(mauvais_mail==true)
{
v_msg="Veuillez revoir cette adresse : "+email_err;
v_msgEng="Please review this address : "+email_err ;
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous cet envoi?";
v_msgEng="Do you confirm this sending?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = "idPolice="+idPolice+"&emailRapport="+emailRapport;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportspfacturemail/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
div_export.html(" ");
v_msg="Opération terminée avec succès!";
v_msgEng="Operation completed successfully!";
alert_ebene(v_msg, v_msgEng);
}
});
}
}
function mail_detail_stat_police_garantie()
{
$('#div_export_b').html("");
idPolice = $("#idPolice").val();
emailRapport = $("#emailRapport").val();
emailRapport = emailRapport.trim();
if (emailRapport<=" ")
{
v_msg="Veuillez indiques les destinataires!";
v_msgEng="Please indicate the recipients!";
alert_ebene(v_msg, v_msgEng);
$("#emailRapport").focus();
return;
}
mauvais_mail=false;
email_err = "";
var addr = emailRapport.split(";");
addr.forEach(function(element)
{
if (test_adresse_email(element)==false)
{
email_err = element;
mauvais_mail = true;
// break;
return;
}
});
if(mauvais_mail==true)
{
v_msg="Veuillez revoir cette adresse : "+email_err;
v_msgEng="Please review this address : "+email_err ;
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous cet envoi?";
v_msgEng="Do you confirm this sending?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = "idPolice="+idPolice+"&emailRapport="+emailRapport;
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailrapportspgarantiemail/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
div_export.html(" ");
v_msg="Opération terminée avec succès!";
v_msgEng="Operation completed successfully!";
alert_ebene(v_msg, v_msgEng);
}
});
}
}
function test_adresse_email(email)
{
var reg = new RegExp('^[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*@[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*[\.]{1}[a-z]{2,6}$', 'i');
if(reg.test(email)==false)
{
return(false);
}
}
function reinitialiser_email_rapport()
{
emailRapport = $("#emailRapport_0").val();
$("#emailRapport").val(emailRapport);
}
function consulter_derogation_2(idDemandederogation)
{
window.location.assign($("#racineWeb" ).val()+"Consulterderogations/"+idDemandederogation+"/");
}
function consulter_derogation(idDemandederogation)
{
window.location.assign($("#racineWeb" ).val()+"Consulterderogation/"+idDemandederogation+"/");
}
function consulter_ententeprealable_2(idDemandeententeprealable)
{
window.location.assign($("#racineWeb" ).val()+"Consulterententeprealables/"+idDemandeententeprealable+"/");
}
function consulter_ententeprealable(idDemandeententeprealable)
{
window.location.assign($("#racineWeb" ).val()+"Consulterententeprealable/"+idDemandeententeprealable+"/");
}
function consulter_ententeprealable_pha_2(idDemandeententeprealable)
{
window.location.assign($("#racineWeb" ).val()+"Consulterententeprealablespha/"+idDemandeententeprealable+"/");
}
function pop_messagerie()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxmessagerieliste/",
success: function(data) {
$("#div_messagerie").html(data);
},
complete: function() {
$("#btn_pop_messagerie").click();
}
});
}
function marquer_message_comme_lu(idMessagerie, controle)
{
donnees = 'idMessagerie='+idMessagerie;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmessagerieliste/marquercommelu/",
type: 'POST',
data: donnees,
success: function(data) {
},
complete: function() {
controle.parentElement.removeChild(controle);
}
});
}
function envoyer_messagerie(textMessage, idParent)
{
codePrestataire=$("#codePrestataire").val();
donnees = 'textMessage='+textMessage+"&idParent="+idParent+"&codePrestataire="+codePrestataire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmessagerie/creermessage/",
type: 'POST',
data: donnees,
success: function(data) {
},
complete: function() {
}
});
}
// gestion messagerie
function repondre_message(idMessagerie, idParent, codePrestataire, controle)
{
donnees = 'idMessagerie='+idMessagerie+'&idParent='+idParent+'&codePrestataire='+codePrestataire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmessageriereponse/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_messagerie_reponse").html(data);
},
complete: function() {
repondu = $("#repondu").val();
if(repondu=="1")
{
v_msg="Déjà répondu!";
v_msgEng="Already answered!";
alert_ebene(v_msg, v_msgEng);
controle.parentElement.removeChild(controle);
return;
}
else
{
$("#btn_pop_messagerie_reponse").click();
}
}
});
}
function gerer_messagerie()
{
window.location.assign($("#racineWeb").val()+"Messagerie/");
}
function afficher_lite_messagerie()
{
donnees = "";
donnees_retour = "";
date1 = $("#date1").val();
date2 = $("#date2").val();
messageLu = $("#messageLu").val();
textMessage = $("#textMessage").val();
codePrestataire = $("#codePrestataire").val();
donnees += 'date1=' + date1;
donnees += '&date2=' + date2;
donnees += '&messageLu=' + messageLu;
donnees += '&textMessage=' + textMessage;
donnees += '&codePrestataire=' + codePrestataire;
$("#div_messagerie_gestion").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistemessagerie/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$("#div_messagerie_gestion").html(donnees_retour);
$("#nbligne").val("Lignes : "+$("#nbligne_info").val());
}
});
}
function enregistrer_repondre_message()
{
idMessagerie = $("#idMessagerie").val();
idParent = $("#idParentReponse").val();
textMessage = $("#textMessageReponse").val();
textMessage = textMessage.trim();
if (textMessage<=" ")
{
v_msg="Veuillez saisir la réponse!";
v_msgEng="Please enter the answer!";
alert_ebene(v_msg, v_msgEng);
$("#textMessageReponse").focus();
return;
}
donnees = 'idMessagerie='+idMessagerie+"&idParent="+idParent+"&textMessage="+textMessage;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmessagerie/repondremessage/",
type: 'POST',
data: donnees,
success: function(data) {
},
complete: function() {
$("#btn_pop_messagerie_reponse_quit").click();
}
});
}
function historique_message(idParent)
{
donnees = 'idParent='+idParent;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmessageriehistorique/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_messagerie_historique").html(data);
},
complete: function() {
$("#btn_pop_messagerie_historique").click();
}
});
}
// btn_pop_messagerie_new
function initiermessage()
{
codePrestataire = $("#codePrestataire").val();
if (codePrestataire<=" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
$("#btn_search_prestataire").click();
return;
}
donnees = "codePrestataire="+codePrestataire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmessagerienew/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_messagerie_new").html(data);
},
complete: function() {
$("#btn_pop_messagerie_new").click();
}
});
}
function enregistrer_new_message()
{
codePrestataire = $("#codePrestataire").val();
textMessage = $("#textMessageNew").val();
textMessage = textMessage.trim();
if (codePrestataire<=" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
$("#btn_pop_messagerie_new_quit").click();
return;
}
if (textMessage<=" ")
{
v_msg="Veuillez saisir le message!";
v_msgEng="Please enter the message!";
alert_ebene(v_msg, v_msgEng);
$("#textMessageNew").focus();
return;
}
donnees = "textMessage="+textMessage+"&idParent=0&codePrestataire="+codePrestataire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxmessagerie/creermessage/",
type: 'POST',
data: donnees,
success: function(data) {
},
complete: function() {
$("#btn_pop_messagerie_new_quit").click();
}
});
}
function imprimer_liste_assures_date()
{
dateAnalyse = $("#dateAnalyse").val();
if (dateAnalyse<=" ")
{
v_msg="Veuillez indiquer une date!";
v_msgEng="Please enter a date!";
alert_ebene(v_msg, v_msgEng);
$("#dateAnalyse").focus();
return;
}
donnees = 'dateAnalyse='+dateAnalyse;
var div_export = $('#div_export_assures');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerlisteassure/",
type: 'POST',
data: donnees,
success: function(data)
{
div_export.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function exporter_liste_assures_date()
{
dateAnalyse = $("#dateAnalyse_export").val();
if (dateAnalyse<=" ")
{
v_msg="Veuillez indiquer une date!";
v_msgEng="Please enter a date!";
alert_ebene(v_msg, v_msgEng);
$("#dateAnalyse").focus();
return;
}
donnees = 'dateAnalyse='+dateAnalyse;
var div_export = $('#div_exporter_liste_assures');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxexporterlisteassure/",
type: 'POST',
data: donnees,
success: function(data)
{
div_export.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function exporter_liste_assures_sans_format_date()
{
dateAnalyse = $("#dateAnalyse_sans_format").val();
if (dateAnalyse<=" ")
{
v_msg="Veuillez indiquer une date!";
v_msgEng="Please enter a date!";
alert_ebene(v_msg, v_msgEng);
$("#dateAnalyse").focus();
return;
}
donnees = 'dateAnalyse='+dateAnalyse;
var div_export = $('#div_export_assures_sans_format');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxexporterlisteassure/exportersansformat",
type: 'POST',
data: donnees,
success: function(data)
{
div_export.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function liste_assures_actifs()
{
dateAnalyse = $("#dateAnalyse").val();
if (dateAnalyse<=" ")
{
v_msg="Veuillez indiquer une date!";
v_msgEng="Please enter a date!";
alert_ebene(v_msg, v_msgEng);
$("#dateAnalyse").focus();
return;
}
donnees = 'dateAnalyse='+dateAnalyse;
var div_export = $('#div_assures_actifs');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxassuresactifs/",
type: 'POST',
data: donnees,
success: function(data)
{
div_export.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function liste_assures_actifs_export()
{
dateAnalyse = $("#dateAnalyse").val();
if (dateAnalyse<=" ")
{
v_msg="Veuillez indiquer une date!";
v_msgEng="Please enter a date!";
alert_ebene(v_msg, v_msgEng);
$("#dateAnalyse").focus();
return;
}
donnees = 'dateAnalyse='+dateAnalyse;
var div_export = $('#div_assures_actifs');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxassuresactifsexport/",
type: 'POST',
data: donnees,
success: function(data)
{
div_export.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
// RENOUVELLEMENT COURTE DUREE => 06/07/2018
/*
function CalculerEcheanceRen()
{
$("#dateEcheanceRen").disable();
codePeriodicite=$("#codePeriodicite").val();
var typdate = $("#dateAvenant").datepicker("getDate");
switch (codePeriodicite) {
case "A":
typdate.addMonths(12);
break;
case "L":
$("#dateEcheanceRen").enable();
typdate = $("#dateEcheanceRen").datepicker("getDate");
break;
default:
typdate.addMonths(12);
}
$( "#dateEcheanceRen").datepicker( "setDate", typdate );
}
*/
function CalculerEcheanceRen()
{
$("#dateEcheanceRen").disable();
codePeriodicite=$("#codePeriodicite").val();
var typdate = $("#dateAvenant").datepicker("getDate");
switch (codePeriodicite) {
case "A":
typdate.addMonths(12);
break;
case "S":
typdate.addMonths(6);
break;
case "T":
typdate.addMonths(3);
break;
case "M":
typdate.addMonths(1);
break;
case "L":
$("#dateEcheanceRen").enable();
typdate = $("#dateEcheanceRen").datepicker("getDate");
break;
default:
typdate.addMonths(12);
}
$( "#dateEcheanceRen" ).datepicker( "setDate", typdate );
}
function CalculerFinRen()
{
$("#dateFinRen").disable();
codeFractionnement=$("#codeFractionnement").val();
var typdate = $("#dateAvenant").datepicker("getDate");
var dtech = $("#dateEcheanceRen").datepicker("getDate");
switch (codeFractionnement) {
case "A":
typdate.addMonths(12);
break;
case "S":
typdate.addMonths(6);
break;
case "T":
typdate.addMonths(3);
break;
case "M":
typdate.addMonths(1);
break;
default:
typdate.addMonths(12);
}
if (typdate>dtech)
{
typdate=dtech;
}
$( "#dateFinRen" ).datepicker( "setDate", typdate );
}
function ControlerEcheanceRen()
{
codePeriodicite=$("#codePeriodicite").val();
if (codePeriodicite!="L") return true;
else {
var eff = $("#dateAvenant").datepicker("getDate");
var ech = $("#dateEcheanceRen").datepicker("getDate");
if (ech<eff) {
$("#dateEcheance").focus();
return false;
}
if (ech>eff.addMonths(12)) {
v_msg="Période supérieur à un an!";
v_msgEng="Period greater than one year!";
alert_ebene(v_msg, v_msgEng);
}
}
}
function verifier_Echeance_ren()
{
codeTypeAvenant=$("#codeTypeAvenant").val();
if(codeTypeAvenant!="REN")
{
return;
}
CalculerEcheanceRen();
CalculerFinRen();
}
function factures_famille()
{
window.location.assign($("#racineWeb" ).val()+"Facturesfamille/");
}
function factures_famille_2()
{
window.location.assign($("#racineWeb" ).val()+"Facturesfamilleadh/");
}
function listerfacturefamille()
{
d1=$("#d1").val();
d2=$("#d2").val();
donnees = 'd1='+d1+'&d2='+d2;
$("#div_dossiers").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxfacturesfamille/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_dossiers").html(data);
},
complete: function() {
}
});
}
function ctrlkeypress_lite_prestataire(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
afficher_lite_prestataire();
}
}
function desactiver_user_prestataire(codeUtilisateur)
{
v_msg="Confirmez-vous la désactivation?";
v_msgEng="Do you confirm the deactivation?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = "codeUtilisateur="+codeUtilisateur;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestataire/desactiver/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
v_msg="Opération effectuée avec succès!";
v_msgEng="Operation successfully completed";
alert_ebene(v_msg, v_msgEng);
users_prestataire();
}
});
return;
}
else
{
v_msg="Opération annulée!";
v_msgEng="Operation canceled!";
alert_ebene(v_msg, v_msgEng);
return;
}
}
function activer_user_prestataire(codeUtilisateur)
{
v_msg="Confirmez-vous l\'activation?";
v_msgEng="Do you confirm the activation?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = "codeUtilisateur="+codeUtilisateur;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestataire/activer/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
v_msg="Opération effectuée avec succès!";
v_msgEng="Operation successfully completed";
alert_ebene(v_msg, v_msgEng);
users_prestataire();
}
});
return;
}
else
{
v_msg="Opération annulée!";
v_msgEng="Operation canceled!";
alert_ebene(v_msg, v_msgEng);
return;
}
}
function consulter_une_factures()
{
window.location.assign($("#racineWeb" ).val()+"Facturecons/");
}
function ctrlkeypressfacture(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
$("#idFacture").blur();
}
}
function maj_date_reception_facture_decompte()
{
dateReception = $("#dateReception_pop").val();
if(dateReception<=" ")
{
v_msg="Veuillez indicquer la date de réception!";
v_msgEng="Please enter the date of receipt!";
alert_ebene(v_msg, v_msgEng);
return;
}
donnees = 'dateReception='+dateReception;
v_msg="Confirmez-vous cette date?";
v_msgEng="Do you confirm this date?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/majdatereception/",
type: 'POST',
data: donnees,
success: function(data) {
$("#btn_close_pop_reception").click();
},
error: function(data) {
},
complete: function() {
dateReception = $("#dateReception_pop").val();
$("#dateReception").val(dateReception);
$("#btn_dateReception").val(dateReception);
v_msg="Opération effectuée avec succès!";
v_msgEng="Operation successfully completed";
alert_ebene(v_msg, v_msgEng);
}
});
return;
}
else
{
v_msg="Opération annulée!";
v_msgEng="Operation canceled!";
alert_ebene(v_msg, v_msgEng);
return;
}
}
function etatsproduction()
{
window.location.assign($("#racineWeb" ).val()+"Etatsproduction/");
}
function etat_prod_par_client()
{
debutPeriode = $("#debutPeriode").val();
finPeriode = $("#finPeriode").val();
$('#div_export_a').html("");
donnees_retour = "";
donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_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('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_prod_par_mois()
{
debutPeriode = $("#debutPeriode").val();
finPeriode = $("#finPeriode").val();
$('#div_export_a').html("");
donnees_retour = "";
donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_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('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_prod_par_emission()
{
debutPeriode = $("#debutPeriode").val();
finPeriode = $("#finPeriode").val();
$('#div_export_a').html("");
donnees_retour = "";
donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_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('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 initiermessagecommun()
{
window.location.assign($("#racineWeb" ).val()+"Messageriecommun/");
}
function enregistrer_message_commun()
{
objet = $("#objet").val();
textMessage = $("#textMessageCommun").val();
textMessage = textMessage.trim();
if (objet<=" ")
{
v_msg="Veuillez saisir l\'objet!";
v_msgEng="Please enter the object!";
alert_ebene(v_msg, v_msgEng);
$("#objet").focus();
return;
}
if (textMessage<=" ")
{
v_msg="Veuillez saisir le message!";
v_msgEng="Please enter the message!";
alert_ebene(v_msg, v_msgEng);
$("#textMessageCommun").focus();
return;
}
donnees = "objet="+objet+"&textMessage="+textMessage;
var div_wait = $('#div_wait');
div_wait.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxmessageriecommun/creermessagecommun/",
type: 'POST',
data: donnees,
success: function(data) {
div_wait.html(data);
},
complete: function() {
div_wait.html('');
v_msg="Message envoyé avec succès!";
v_msgEng="Message sent successfully!";
alert_ebene(v_msg, v_msgEng);
gerer_messagerie();
}
});
}
//
function requetes_factures_mois()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
codePrestataire = $("#codePrestataire").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_mois_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
codePrestataire = $("#codePrestataire").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 desactiver_medicament(idDetail)
{
v_msg="Confirmez-vous cette désactivation?";
v_msgEng="Do you confirm this deactivation?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxtarifmedicament/desactivermedicament/",
type : 'post',
data: "idDetail="+idDetail,
success: function(data) {
},
complete: function()
{
afficher_tarifpharmacie();
}
});
}
}
function activer_medicament(idDetail)
{
v_msg="Confirmez-vous cette activation?";
v_msgEng="Do you confirm this activation?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxtarifmedicament/activermedicament/",
type : 'post',
data: "idDetail="+idDetail,
success: function(data) {
},
complete: function()
{
afficher_tarifpharmacie();
}
});
}
}
function init_supprimer_empreinte_digitale()
{
window.location.assign($("#racineWeb" ).val()+"Supprimerempreinte/");
}
function requetes_factures_jour()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
codePrestataire = $("#codePrestataire").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_jour_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
codePrestataire = $("#codePrestataire").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 ajax_liste_prestataires_messagerie()
{
codeTypePrestataire=$("#codeTypePrestataire").val();
donnees = 'codeTypePrestataire='+codeTypePrestataire;
$("#div_prestataires").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisteprestatairemessagerie/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_prestataires").html(data);
},
complete: function() {
}
});
}
function ajouter_un_prestataire_mess(idPrestataire)
{
donnees = 'idPrestataire='+idPrestataire;
$("#div_prestataires").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisteprestatairemessagerie/ajouterprestaire/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
ajax_liste_prestataires_messagerie();
}
});
}
function retirer_un_prestataire_mess(idPrestataire)
{
donnees = 'idPrestataire='+idPrestataire;
$("#div_prestataires").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisteprestatairemessagerie/retirerprestaire/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
ajax_liste_prestataires_messagerie();
}
});
}
function ajouter_tous_prestataire_mess()
{
codeTypePrestataire=$("#codeTypePrestataire").val();
donnees = 'codeTypePrestataire='+codeTypePrestataire;
$("#div_prestataires").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisteprestatairemessagerie/ajouterprestairetous/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
ajax_liste_prestataires_messagerie();
}
});
}
function retirer_tous_prestataire_mess()
{
codeTypePrestataire=$("#codeTypePrestataire").val();
donnees = 'codeTypePrestataire='+codeTypePrestataire;
$("#div_prestataires").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisteprestatairemessagerie/retirerprestairetous/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
ajax_liste_prestataires_messagerie();
}
});
}
//
function requetes_ententeprealable_pha()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
codePrestataire = $("#codePrestataire").val();
dateDemande1 = $("#dateDemande1").val();
dateDemande2 = $("#dateDemande2").val();
codeReponseEntentePrealable = $("#codeReponseEntentePrealable").val();
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateDemande1=' + dateDemande1;
donnees += '&dateDemande2=' + dateDemande2;
donnees += '&codeReponseEntentePrealable=' + codeReponseEntentePrealable;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_ententeprealable_pha_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
codePrestataire = $("#codePrestataire").val();
dateDemande1 = $("#dateDemande1").val();
dateDemande2 = $("#dateDemande2").val();
codeReponseEntentePrealable = $("#codeReponseEntentePrealable").val();
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateDemande1=' + dateDemande1;
donnees += '&dateDemande2=' + dateDemande2;
donnees += '&codeReponseEntentePrealable=' + codeReponseEntentePrealable;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 check_ged(idGed, cheminFichier, controle)
{
donnees = "idGed="+idGed+"&cheminFichier="+cheminFichier;
var ctrl_btn_ged = $("#btn_ged"+idGed);
var ctrl_mess_not_found= $("#mess_not_found"+idGed);
var ctrl_check = $("#ctrl_check"+idGed);
$.ajax({
url: $("#racineWeb").val()+"Ajaxged/verifierexistancefichier/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
if(donnees_retour=="1")
{
ctrl_btn_ged.show();
}
else
{
ctrl_mess_not_found.html("Not found");
}
},
complete: function()
{
controle.style.display = 'none';
ctrl_check.show();
}
});
}
function lister_ged_feuille_maladie()
{
d1 = $("#d1").val();
d2 = $("#d2").val();
nomOrigine = $("#nomOrigine").val();
donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
$("#div_ged").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistegedfeuillemaladie/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_ged").html(data);
},
complete: function() {
}
});
}
function afficher_lite_messagerie_commun()
{
donnees = "";
donnees_retour = "";
date1 = $("#date1").val();
date2 = $("#date2").val();
textMessage = $("#textMessage").val();
donnees += 'date1=' + date1;
donnees += '&date2=' + date2;
donnees += '&textMessage=' + textMessage;
$("#div_messagerie_gestion").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistemessageriecommun/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$("#div_messagerie_gestion").html(donnees_retour);
$("#nbligne").val("Lignes : "+$("#nbligne_info").val());
}
});
}
function afficher_lite_messagerie_form_me()
{
donnees = "";
donnees_retour = "";
date1 = $("#date1").val();
date2 = $("#date2").val();
messageLu = $("#messageLu").val();
textMessage = $("#textMessage").val();
codePrestataire = $("#codePrestataire").val();
donnees += 'date1=' + date1;
donnees += '&date2=' + date2;
donnees += '&messageLu=' + messageLu;
donnees += '&textMessage=' + textMessage;
donnees += '&codePrestataire=' + codePrestataire;
$("#div_messagerie_gestion").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistemessagerieforme/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$("#div_messagerie_gestion").html(donnees_retour);
$("#nbligne").val("Lignes : "+$("#nbligne_info").val());
}
});
}
function lister_ged_beneficiaire_prest()
{
d1 = $("#d1").val();
d2 = $("#d2").val();
nomOrigine = $("#nomOrigine").val();
donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
$("#div_ged").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistegedbeneficiaireprest/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_ged").html(data);
},
complete: function() {
}
});
}
function lister_ged_beneficiaire_prod()
{
d1 = $("#d1").val();
d2 = $("#d2").val();
nomOrigine = $("#nomOrigine").val();
donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
$("#div_ged").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistegedbeneficiaireprod/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_ged").html(data);
},
complete: function() {
}
});
}
function lister_ged_adherent()
{
d1 = $("#d1").val();
d2 = $("#d2").val();
nomOrigine = $("#nomOrigine").val();
donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
$("#div_ged").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistegedadherent/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_ged").html(data);
},
complete: function() {
}
});
}
function lister_ged_police()
{
d1 = $("#d1").val();
d2 = $("#d2").val();
nomOrigine = $("#nomOrigine").val();
donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
$("#div_ged").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistegedpolice/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_ged").html(data);
},
complete: function() {
}
});
}
function lister_ged()
{
d1 = $("#d1").val();
d2 = $("#d2").val();
nomOrigine = $("#nomOrigine").val();
donnees = 'd1='+d1+'&d2='+d2+'&nomOrigine='+nomOrigine;
$("#div_ged").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisteged/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_ged").html(data);
},
complete: function() {
}
});
}
function ctrlkeypress_lister_ged(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
lister_ged();
}
}
function ajaxenteteetatsynthese()
{
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
donnees = 'codeEtat='+codeEtat;
v_url = $("#racineWeb").val()+"Ajaxentete"+codeEtat+"/";
$("#div_ente_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#div_ente_requete").html(data);
$(".datepicker" ).datepicker();
}
});
}
function etat_synthese_par_mois()
{
debutPeriode = $("#debutPeriode").val();
finPeriode = $("#finPeriode").val();
$('#div_export_a').html("");
donnees_retour = "";
donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_synthese_par_mois_export()
{
debutPeriode = $("#debutPeriode").val();
finPeriode = $("#finPeriode").val();
$('#div_export_a').html("");
donnees_retour = "";
donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
$('#div_export_a').html("");
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 pop_ged_pharmacie()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistegedpharmacie/",
success: function(data)
{
$("#div_ged").html(data);
},
complete: function() {
$("#btn_pop_ged_pharmacie").click();
}
});
}
function etat_synthese_par_mois_acqu()
{
debutPeriode = $("#debutPeriode").val();
finPeriode = $("#finPeriode").val();
$('#div_export_a').html("");
donnees_retour = "";
donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"/";
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_synthese_par_mois_acqu_export()
{
debutPeriode = $("#debutPeriode").val();
finPeriode = $("#finPeriode").val();
$('#div_export_a').html("");
donnees_retour = "";
donnees = 'debutPeriode='+debutPeriode+"&finPeriode="+finPeriode;
$('#div_export_a').html("");
codeEtat=$("#codeEtat").val();
if (codeEtat<=" ")
{
v_msg="Veuillez sélectionner un état!";
v_msgEng="Please select a state!";
alert_ebene(v_msg, v_msgEng);
$("#codeEtat").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajax"+codeEtat+"export/";
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 demandesdecomptes()
{
codePrestataire = $("#codePrestataire").val();
codeExercice = $("#codeExercice").val();
codeMois = $("#codeMois").val();
if (codeExercice<=" ")
{
v_msg="Veuillez sélectionner un exercice!";
v_msgEng="Please select an exercise!";
alert_ebene(v_msg, v_msgEng);
$("#codeExercice").focus();
return;
}
if (codeMois<=" ")
{
v_msg="Veuillez sélectionner une période!";
v_msgEng="Please select a period!";
alert_ebene(v_msg, v_msgEng);
$("#codeMois").focus();
return;
}
donnees = 'codePrestataire='+codePrestataire+'&codeExercice='+codeExercice+'&codeMois='+codeMois;
$("#div_detail").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdemandesdecomptes/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_detail").html(data);
},
complete: function() {
}
});
}
function detail_demande_decompte(idDemandeDecompte, numeroDemandeDecompte)
{
donnees = 'numeroDemandeDecompte='+numeroDemandeDecompte+'&idDemandeDecompte='+idDemandeDecompte;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextdemandedecompte/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Detaildemandedecompte/");
}
});
}
function imprimerbordereaudemandedecompte()
{
}
function initierdecompte_demande_decompte()
{
codePrestataire=$("#codePrestataire").val();
codeExercice=$("#codeExercice").val();
codeMois=$("#codeMois").val();
if (codePrestataire<=" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
$("#codePrestataire").focus();
return;
}
if (codeExercice<=" ")
{
v_msg="Veuillez sélectionner un exercice!";
v_msgEng="Please select an exercise!";
alert_ebene(v_msg, v_msgEng);
$("#codeExercice").focus();
return;
}
if (codeMois<=" ")
{
v_msg="Veuillez sélectionner une période!";
v_msgEng="Please select a period!";
alert_ebene(v_msg, v_msgEng);
$("#codeMois").focus();
return;
}
donnees = 'codePrestataire='+codePrestataire+'&codeExercice='+codeExercice+'&codeMois='+codeMois;
var div_wait = $('#div_wait');
div_wait.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/initierdecompte/",
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 || regle==2 || regle==3)
{
afficherdecompte();
}
else
{
// 9 => Décompte validé mais en attente de règlemen
// 1 => Décompte réglé
consulterdecompte();
}
}
});
}
function requetes_factures_police()
{
}
function requetes_factures_police_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
numeroPolice = $("#numeroPolice").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'numeroPolice=' + numeroPolice;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
var div_export = $('#div_export_a');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
div_export.html(donnees_retour);
}
});
}
function requetes_factures_adherent_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
numeroAdherent = $("#numeroAdherent").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'numeroAdherent=' + numeroAdherent;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 requetes_factures_beneficiaire_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
numeroBeneficiaire = $("#numeroBeneficiaire").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'numeroBeneficiaire=' + numeroBeneficiaire;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 requetes_factures_police_gar()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"gar/";
numeroPolice = $("#numeroPolice").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'numeroPolice=' + numeroPolice;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
var div_export = $('#div_export_a');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
div_export.html(donnees_retour);
}
});
}
function requetes_factures_adherent_gar()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"gar/";
numeroAdherent = $("#numeroAdherent").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'numeroAdherent=' + numeroAdherent;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 requetes_factures_beneficiaire_gar()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"gar/";
numeroBeneficiaire = $("#numeroBeneficiaire").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'numeroBeneficiaire=' + numeroBeneficiaire;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 appliquer_taux_ristourne()
{
tauxRistourne = $("#tauxRistourne").val();
donnees = 'tauxRistourne=' + tauxRistourne;
var div_assure_a_retirer = $('#div_assure_a_retirer');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailretrait/appliquertauxristourne/",
type : 'post',
data : donnees,
success: function(data) {
div_assure_a_retirer.html(data);
},
error: function(data) {
},
complete: function() {
}
});
}
function afficher_gc_assureur(idGc)
{
if (idGc <=" ")
{
v_msg="Veuillez sélectionner un assureur!";
v_msgEng="Please select an insurer!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Fichegcassureur/"+idGc+"/");
}
function modifier_gc_assureur()
{
idGc = $("#idGc" ).val()
if (idGc>"0")
{
window.location.assign($("#racineWeb" ).val()+"Modifiergcassureur/"+idGc+"/");
}
}
function retour_gc_assureur()
{
idGc = $("#idGc" ).val()
if (idGc>"0")
{
window.location.assign($("#racineWeb" ).val()+"Fichegcassureur/"+idGc+"/");
}
}
function enregistrer_modif_gc_assureur()
{
idGc = $("#idGc").val();
codeGcAssureur = $("#codeGcAssureur").val();
libelle = $("#libelle").val();
email = $("#emailGcAssureur").val();
gcTauxFraisReel = $("#gcTauxFraisReel").val();
gcTauxRedressement = $("#gcTauxRedressement").val();
gcTauxTva = $("#gcTauxTva").val();
fraisCarteAfn = $("#fraisCarteAfn").val();
fraisCarteRen = $("#fraisCarteRen").val();
fraisCarteImp = $("#fraisCarteImp").val();
fraisGestion = $("#fraisGestion").val();
codeGestionCarte = $("#codeGestionCarte").val();
if(libelle<=" ")
{
v_msg="Veuillez indiquer le nom!";
v_msgEng="Please enter the name!";
alert_ebene(v_msg, v_msgEng);
$("#libelle").focus();
return;
}
if(gcTauxFraisReel<"0")
{
v_msg="Veuillez indiquer le taux frais réel!";
v_msgEng="Please indicate the charge rate";
alert_ebene(v_msg, v_msgEng);
$("#gcTauxFraisReel").focus();
return;
}
gcTauxFraisReel=gcTauxFraisReel.replace(",",".");
if(isNaN(gcTauxFraisReel))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#gcTauxFraisReel").val("0");
$("#gcTauxFraisReel").focus();
return;
}
if(gcTauxRedressement<"0")
{
v_msg="Veuillez indiquer le taux redressement!";
v_msgEng="Please indicate the recovery rate!";
alert_ebene(v_msg, v_msgEng);
$("#gcTauxRedressement").focus();
return;
}
gcTauxRedressement=gcTauxRedressement.replace(",",".");
if(isNaN(gcTauxRedressement))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#gcTauxRedressement").val("0");
$("#gcTauxRedressement").focus();
return;
}
if(gcTauxTva<"0")
{
v_msg="Veuillez indiquer le taux de TVA!";
v_msgEng="Please indicate the VAT rate!";
alert_ebene(v_msg, v_msgEng);
$("#gcTauxTva").focus();
return;
}
gcTauxTva=gcTauxTva.replace(",",".");
$("#gcTauxTva").val(gcTauxTva);
if(isNaN(gcTauxTva))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#gcTauxTva").val("0");
$("#gcTauxTva").focus();
return;
}
if(fraisCarteAfn<"0")
{
v_msg="Veuillez indiquer les frais pour une nouvelle carte!";
v_msgEng="Please indicate the fees for a new card!";
alert_ebene(v_msg, v_msgEng);
$("#fraisCarteAfn").focus();
return;
}
if(fraisCarteRen<"0")
{
v_msg="Veuillez indiquer les frais pour un renouvellement de carte!";
v_msgEng="Please indicate the fees for a card renewal!";
alert_ebene(v_msg, v_msgEng);
$("#fraisCarteRen").focus();
return;
}
if(fraisCarteImp<"0")
{
v_msg="Veuillez indiquer les frais pour une ré-impression de carte!";
v_msgEng="Please indicate the fees for a re-printing of the card!";
alert_ebene(v_msg, v_msgEng);
$("#fraisCarteImp").focus();
return;
}
donnees = 'idGc='+idGc+'&libelle='+libelle+'&codeGcAssureur='+codeGcAssureur;
donnees += '&email='+email+'&gcTauxFraisReel='+gcTauxFraisReel+'&gcTauxRedressement='+gcTauxRedressement +'&gcTauxTva='+gcTauxTva;
donnees += '&fraisCarteAfn='+fraisCarteAfn+'&fraisCarteRen='+fraisCarteRen+'&fraisCarteImp='+fraisCarteImp;
donnees += '&fraisGestion='+fraisGestion+'&codeGestionCarte='+codeGestionCarte;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgcassureur/enregistrermodif/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
retour_gc_assureur();
}
});
}
function creer_gc_assureur()
{
codeGcAssureur = $("#codeGcAssureur").val();
libelle = $("#libelle").val();
email = $("#emailGcAssureur").val();
gcTauxFraisReel = $("#gcTauxFraisReel").val();
gcTauxRedressement = $("#gcTauxRedressement").val();
gcTauxTva = $("#gcTauxTva").val();
fraisCarteAfn = $("#fraisCarteAfn").val();
fraisCarteRen = $("#fraisCarteRen").val();
fraisCarteImp = $("#fraisCarteImp").val();
fraisGestion = $("#fraisGestion").val();
codeGestionCarte = $("#codeGestionCarte").val();
if(libelle<=" ")
{
v_msg="Veuillez indiquer le nom!";
v_msgEng="Please enter the name!";
alert_ebene(v_msg, v_msgEng);
$("#libelle").focus();
return;
}
if(gcTauxFraisReel<"0")
{
v_msg="Veuillez indiquer le taux frais réel!";
v_msgEng="Please indicate the charge rate";
alert_ebene(v_msg, v_msgEng);
$("#gcTauxFraisReel").focus();
return;
}
gcTauxFraisReel=gcTauxFraisReel.replace(",",".");
if(isNaN(gcTauxFraisReel))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#gcTauxFraisReel").val("0");
$("#gcTauxFraisReel").focus();
return;
}
if(gcTauxRedressement<"0")
{
v_msg="Veuillez indiquer le taux redressement!";
v_msgEng="Please indicate the recovery rate!";
alert_ebene(v_msg, v_msgEng);
$("#gcTauxRedressement").focus();
return;
}
gcTauxRedressement=gcTauxRedressement.replace(",",".");
// $("#gcTauxRedressement").val(gcTauxRedressement);
if(isNaN(gcTauxRedressement))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#gcTauxRedressement").val("0");
$("#gcTauxRedressement").focus();
return;
}
if(gcTauxTva<"0")
{
v_msg="Veuillez indiquer le taux de TVA!";
v_msgEng="Please indicate the VAT rate!";
alert_ebene(v_msg, v_msgEng);
$("#gcTauxTva").focus();
return;
}
gcTauxTva=gcTauxTva.replace(",",".");
if(isNaN(gcTauxTva))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#gcTauxTva").val("0");
$("#gcTauxTva").focus();
return;
}
if(fraisCarteAfn<"0")
{
v_msg="Veuillez indiquer les frais pour une nouvelle carte!";
v_msgEng="Please indicate the fees for a new card!";
alert_ebene(v_msg, v_msgEng);
$("#fraisCarteAfn").focus();
return;
}
if(fraisCarteRen<"0")
{
v_msg="Veuillez indiquer les frais pour un renouvellement de carte!";
v_msgEng="Please indicate the fees for a card renewal!";
alert_ebene(v_msg, v_msgEng);
$("#fraisCarteRen").focus();
return;
}
if(fraisCarteImp<"0")
{
v_msg="Veuillez indiquer les frais pour une ré-impression de carte!";
v_msgEng="Please indicate the fees for a re-printing of the card!";
alert_ebene(v_msg, v_msgEng);
$("#fraisCarteImp").focus();
return;
}
donnees = 'libelle='+libelle+'&codeGcAssureur='+codeGcAssureur;
donnees += '&email='+email+'&gcTauxFraisReel='+gcTauxFraisReel+'&gcTauxRedressement='+gcTauxRedressement +'&gcTauxTva='+gcTauxTva;
donnees += '&fraisCarteAfn='+fraisCarteAfn+'&fraisCarteRen='+fraisCarteRen+'&fraisCarteImp='+fraisCarteImp;
donnees += '&fraisGestion='+fraisGestion+'&codeGestionCarte='+codeGestionCarte;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgcassureur/ajouter/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
retour_liste_gc_assureur();
}
});
}
function retour_liste_gc_assureur()
{
window.location.assign($("#racineWeb" ).val()+"Gcassureur/");
}
function activer_gestion_confiee()
{
etat=$("#codeEtatPolice_C").val();
if (etat=="RE")
{
v_msg="Attention! Police résiliée!";
v_msgEng="Warning! Terminated policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (etat=="AN")
{
v_msg="Attention! Police annulée!";
v_msgEng="Warning! Canceled policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
gestionConfiee=$("#gestionConfiee").val();
if (gestionConfiee=="1")
{
v_msg="Gestion confiée déjà activée!";
v_msgEng="Management entrusted already activated!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous la gestion confiée pour cette police?";
v_msgEng="Do you confirm the management entrusted for this policy?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Fichepolice/activergc/"+$("#idPolice_C").val()+"/");
}
}
function afficher_gc_police(idPolice, idGcpolice)
{
if (idPolice <=" ")
{
v_msg="Veuillez sélectionner une police!";
v_msgEng="Please select a policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (idGcpolice=="0")
{
window.location.assign($("#racineWeb" ).val()+"Creergcpolice/"+idPolice+"/");
}
else
{
window.location.assign($("#racineWeb" ).val()+"Fichegcpolice/"+idPolice+"/");
}
}
function retour_liste_gc_police()
{
window.location.assign($("#racineWeb" ).val()+"Gcpolices/");
}
function creer_gc_police()
{
idPolice = $("#idPolice").val();
codeGcAssureur = $("#codeGcAssureur").val();
tauxFraisReel = $("#tauxFraisReel").val();
tauxRedressement = $("#tauxRedressement").val();
tauxTva = $("#tauxTva").val();
fraisCarteAfn = $("#fraisCarteAfn").val();
fraisCarteRen = $("#fraisCarteRen").val();
fraisCarteImp = $("#fraisCarteImp").val();
if(codeGcAssureur<=" ")
{
v_msg="Veuillez sélectionner un assureur!";
v_msgEng="Please select an insurer!";
alert_ebene(v_msg, v_msgEng);
$("#codeGcAssureur").focus();
return;
}
if(tauxFraisReel<"0")
{
v_msg="Veuillez indiquer le taux frais réel!";
v_msgEng="Please indicate the charge rate";
alert_ebene(v_msg, v_msgEng);
$("#tauxFraisReel").focus();
return;
}
tauxFraisReel=tauxFraisReel.replace(",",".");
if(isNaN(tauxFraisReel))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#tauxFraisReel").val("0");
$("#tauxFraisReel").focus();
return;
}
if(tauxRedressement<"0")
{
v_msg="Veuillez indiquer le taux redressement!";
v_msgEng="Please indicate the recovery rate!";
alert_ebene(v_msg, v_msgEng);
$("#tauxRedressement").focus();
return;
}
tauxRedressement=tauxRedressement.replace(",",".");
if(isNaN(tauxRedressement))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#tauxRedressement").val("0");
$("#tauxRedressement").focus();
return;
}
if(tauxTva<"0")
{
v_msg="Veuillez indiquer le taux de TVA!";
v_msgEng="Please indicate the VAT rate!";
alert_ebene(v_msg, v_msgEng);
$("#tauxTva").focus();
return;
}
tauxTva=tauxTva.replace(",",".");
if(isNaN(tauxTva))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#tauxTva").val("0");
$("#tauxTva").focus();
return;
}
if(fraisCarteAfn<"0")
{
v_msg="Veuillez indiquer les frais pour une nouvelle carte!";
v_msgEng="Please indicate the fees for a new card!";
alert_ebene(v_msg, v_msgEng);
$("#fraisCarteAfn").focus();
return;
}
if(fraisCarteRen<"0")
{
v_msg="Veuillez indiquer les frais pour un renouvellement de carte!";
v_msgEng="Please indicate the fees for a card renewal!";
alert_ebene(v_msg, v_msgEng);
$("#fraisCarteRen").focus();
return;
}
if(fraisCarteImp<"0")
{
v_msg="Veuillez indiquer les frais pour une ré-impression de carte!";
v_msgEng="Please indicate the fees for a re-printing of the card!";
alert_ebene(v_msg, v_msgEng);
$("#fraisCarteImp").focus();
return;
}
donnees = 'idPolice='+idPolice+'&codeGcAssureur='+codeGcAssureur;
donnees += '&tauxFraisReel='+tauxFraisReel+'&tauxRedressement='+tauxRedressement +'&tauxTva='+tauxTva;
donnees += '&fraisCarteAfn='+fraisCarteAfn+'&fraisCarteRen='+fraisCarteRen+'&fraisCarteImp='+fraisCarteImp;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcreergcpolice/creerpolicegc/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
retour_liste_gc_police();
}
});
}
function choisir_gc_assureur()
{
idPolice=$("#idPolice").val();
codeGcAssureur=$("#codeGcAssureur").val();
if (codeGcAssureur<=" ")
{
v_msg="Veuillez sélectionner un assureur!";
v_msgEng="Please select an insurer!";
alert_ebene(v_msg, v_msgEng);
return;
}
donnees = 'idPolice='+idPolice+'&codeGcAssureur='+codeGcAssureur;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcreergcpolice/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_gc").html(data);
},
complete: function() {
}
});
}
function modifier_gc_police(idPolice)
{
idPolice = $("#idPolice").val();
if (idPolice <=" ")
{
v_msg="Veuillez sélectionner une police!";
v_msgEng="Please select a policy!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Modifiergcpolice/"+idPolice+"/");
}
function enregistrer_modif_gc_police()
{
idPolice = $("#idPolice").val();
tauxFraisReel = $("#tauxFraisReel").val();
tauxRedressement = $("#tauxRedressement").val();
tauxTva = $("#tauxTva").val();
fraisCarteAfn = $("#fraisCarteAfn").val();
fraisCarteRen = $("#fraisCarteRen").val();
fraisCarteImp = $("#fraisCarteImp").val();
if(tauxFraisReel<"0")
{
v_msg="Veuillez indiquer le taux frais réel!";
v_msgEng="Please indicate the charge rate";
alert_ebene(v_msg, v_msgEng);
$("#tauxFraisReel").focus();
return;
}
tauxFraisReel=tauxFraisReel.replace(",",".");
$("#tauxFraisReel").val(tauxFraisReel);
if(isNaN(tauxFraisReel))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#tauxFraisReel").val("0");
$("#tauxFraisReel").focus();
return;
}
if(tauxRedressement<"0")
{
v_msg="Veuillez indiquer le taux redressement!";
v_msgEng="Please indicate the recovery rate!";
alert_ebene(v_msg, v_msgEng);
$("#tauxRedressement").focus();
return;
}
tauxRedressement=tauxRedressement.replace(",",".");
$("#tauxRedressement").val(tauxRedressement);
if(isNaN(tauxRedressement))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#tauxRedressement").val("0");
$("#tauxRedressement").focus();
return;
}
if(tauxTva<"0")
{
v_msg="Veuillez indiquer le taux de TVA!";
v_msgEng="Please indicate the VAT rate!";
alert_ebene(v_msg, v_msgEng);
$("#tauxTva").focus();
return;
}
tauxTva=tauxTva.replace(",",".");
$("#tauxTva").val(tauxTva);
if(isNaN(tauxTva))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#tauxTva").val("0");
$("#tauxTva").focus();
return;
}
if(fraisCarteAfn<"0")
{
v_msg="Veuillez indiquer les frais pour une nouvelle carte!";
v_msgEng="Please indicate the fees for a new card!";
alert_ebene(v_msg, v_msgEng);
$("#fraisCarteAfn").focus();
return;
}
if(fraisCarteRen<"0")
{
v_msg="Veuillez indiquer les frais pour un renouvellement de carte!";
v_msgEng="Please indicate the fees for a card renewal!";
alert_ebene(v_msg, v_msgEng);
$("#fraisCarteRen").focus();
return;
}
if(fraisCarteImp<"0")
{
v_msg="Veuillez indiquer les frais pour une ré-impression de carte!";
v_msgEng="Please indicate the fees for a re-printing of the card!";
alert_ebene(v_msg, v_msgEng);
$("#fraisCarteImp").focus();
return;
}
donnees = 'idPolice='+idPolice;
donnees += '&tauxFraisReel='+tauxFraisReel+'&tauxRedressement='+tauxRedressement +'&tauxTva='+tauxTva;
donnees += '&fraisCarteAfn='+fraisCarteAfn+'&fraisCarteRen='+fraisCarteRen+'&fraisCarteImp='+fraisCarteImp;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcreergcpolice/modifierpolicegc/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
retour_fiche_gc_police();
}
});
}
function retour_fiche_gc_police()
{
idPolice = $("#idPolice").val();
window.location.assign($("#racineWeb" ).val()+"Fichegcpolice/"+idPolice+"/");
}
function desactiver_gestion_confiee()
{
idPolice = $("#idPolice").val();
nbFactureGc = $("#nbFactureGc").val();
if (nbFactureGc!=0)
{
v_msg="Cette police possède des factures dejà traitées en gestion confiée!";
v_msgEng="This policy has invoices already processed in entrusted management!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous le retrait de cette police de la gestion confiée?";
v_msgEng="Do you confirm the withdrawal of this policy from the entrusted management?";
if(confirm_ebene(v_msg, v_msgEng))
{
window.location.assign($("#racineWeb" ).val()+"Fichepolice/desactivergc/"+idPolice+"/");
}
}
function requetes_factures_gc()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeGcAssureur = $("#codeGcAssureur").val();
if(codeGcAssureur<=" ")
{
v_msg="Veuillez sélectionner un assureur!";
v_msgEng="Please select an insurer!";
alert_ebene(v_msg, v_msgEng);
$("#codeGcAssureur").focus();
return;
}
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'codeGcAssureur=' + codeGcAssureur;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxrequetefacturegc/";
$.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_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('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxrequetefacturegcexport/";
$.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_facture_gc(idFacture)
{
}
//
function affciher_factures_gc_payable()
{
}
function initier_gc_reglement()
{
codeGcAssureur = $("#codeGcAssureur").val();
if(codeGcAssureur<=" ")
{
v_msg="Veuillez sélectionner un assureur!";
v_msgEng="Please select an insurer!";
alert_ebene(v_msg, v_msgEng);
$("#codeGcAssureur").focus();
return;
}
donnees = 'codeGcAssureur='+codeGcAssureur;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgcregelement/gcinitreglement/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
afficher_new_gc_reglement();
}
});
}
function afficher_new_gc_reglement()
{
window.location.assign($("#racineWeb" ).val()+"Gcnewfacturation/");
}
function confirmer_new_facturation_gc()
{
observations = $("#observations").val();
if (observations<=" ")
{
v_msg="Veuillez saisir quelque chose!";
v_msgEng="Please enter something!";
alert_ebene(v_msg, v_msgEng);
$("#observations").focus();
return;
}
donnees = 'observations='+observations;
v_msg="Confirmez-vous la nouvelle facturation?";
v_msgEng="Do you confirm the new billing?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxgcregelement/confirminitreglement/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
afficher_gc_reglement();
}
});
}
}
function lister_reglements_gc()
{
codeGcAssureur = $("#codeGcAssureur").val();
if(codeGcAssureur<=" ")
{
v_msg="Veuillez sélectionner un assureur!";
v_msgEng="Please select an insurer!";
alert_ebene(v_msg, v_msgEng);
$("#codeGcAssureur").focus();
return;
}
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees = 'codeGcAssureur=' + codeGcAssureur;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
$("#div_detail").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistereglementsgc/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_detail").html(data);
},
complete: function() {
}
});
}
function aller_a_gcfacturation()
{
window.location.assign($("#racineWeb" ).val()+"Gcfacturation/");
}
//
function recalculer_solde_famille()
{
var div_test = $('#div_test');
div_test.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxadherent/recalculersoldefamille/",
type: 'POST',
success: function(data)
{
div_test.html("");
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
window.location.assign($("#racineWeb" ).val()+"Plafondadherent/");
}
});
}
function ajax_context_gc_reglement_id(idGcReglement)
{
donnees = 'idGcReglement='+idGcReglement;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextfeuillemaladie/getcontextbayid/",
type : 'post',
data: donnees,
complete: function() {
}
});
}
function afficher_gc_reglement_id(idGcReglement, valide)
{
donnees = 'idGcReglement='+idGcReglement;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextgcreglement/getcontextbyid/",
type : 'post',
data: donnees,
complete: function() {
if (valide!="1")
{
window.location.assign($("#racineWeb" ).val()+"Gcreglement/");
}
else
{
window.location.assign($("#racineWeb" ).val()+"Gcreglementcons/");
}
}
});
}
function afficher_gc_reglement()
{
window.location.assign($("#racineWeb" ).val()+"Gcreglement/");
}
function ajaxchangercompsantegcreglement()
{
$("#detail_facture").html('');
$("#div_entete_sel").html('');
codeComposante=$("#codeComposante").val();
if(codeComposante<=" ")
{
v_msg="Veuillez sélectionner une compsante!";
v_msgEng="Please select a compsante!";
alert_ebene(v_msg, v_msgEng);
$("#codeComposante").focus();
return;
}
donnees = 'codeComposante='+codeComposante;
if(codeComposante=="SFACT")
{
v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/";
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#detail_facture").html(data);
}
});
}
else
if(codeComposante=="SNFACT")
{
v_url = $("#racineWeb").val()+"Ajaxfacturegcnonselentete/";
$("#div_entete_sel").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#div_entete_sel").html(data);
$(".datepicker" ).datepicker();
}
});
}
else
if(codeComposante=="CFACT")
{
v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcsel/";
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#detail_facture").html(data);
}
});
}
else
if(codeComposante=="CNFACT")
{
v_url = $("#racineWeb").val()+"Ajaxfraisgestiongcnonselentete/";
$("#div_entete_sel").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#div_entete_sel").html(data);
$(".datepicker" ).datepicker();
}
});
}
}
function recharger_factures_gc_non_sel()
{
$("#detail_facture").html('');
// $("#div_entete_sel").html('');
codeGcAssureur = $("#codeGcAssureur").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees = 'codeGcAssureur=' + codeGcAssureur;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxfacturegcnonsel/";
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#detail_facture").html(data);
$(".datepicker" ).datepicker();
}
});
}
function valider_selection_factures_gc()
{
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxfacturegcnonsel/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_factures_gc_non_sel();
}
});
}
function selectionner_facture_gc(idFactureTemp, choix)
{
donnees = 'idFactureTemp='+idFactureTemp+'&choix='+choix;
if(choix==0)
{
v_url = $("#racineWeb").val()+"Ajaxfacturegcnonsel/deselectionner/";
}
else
{
v_url = $("#racineWeb").val()+"Ajaxfacturegcnonsel/selectionner/";
}
$.ajax({
url: v_url,
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
}
});
}
function reafficher_factures_gc_non_sel()
{
$("#detail_facture").html('');
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxfacturegcnonsel/reafficher/";
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#detail_facture").html(data);
$(".datepicker" ).datepicker();
}
});
}
//
function selectionner_facture_sel_gc(idFactureTemp, choix)
{
donnees = 'idFactureTemp='+idFactureTemp+'&choix='+choix;
if(choix==0)
{
v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/deselectionner/";
}
else
{
v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/selectionner/";
}
$.ajax({
url: v_url,
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
}
});
}
function recharger_factures_gc_sel()
{
v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/";
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#detail_facture").html(data);
}
});
}
function reafficher_factures_gc_sel()
{
$("#detail_facture").html('');
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/reafficher/";
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#detail_facture").html(data);
$(".datepicker" ).datepicker();
}
});
}
function valider_selection_factures_gc_sel()
{
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/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_factures_gc_sel();
}
});
}
//
function requetes_cartes_gc()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeGcAssureur = $("#codeGcAssureur").val();
if(codeGcAssureur<=" ")
{
v_msg="Veuillez sélectionner un assureur!";
v_msgEng="Please select an insurer!";
alert_ebene(v_msg, v_msgEng);
$("#codeGcAssureur").focus();
return;
}
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'codeGcAssureur=' + codeGcAssureur;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxrequetecartegc/";
$.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_cartes_gc_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeGcAssureur = $("#codeGcAssureur").val();
if(codeGcAssureur<=" ")
{
v_msg="Veuillez sélectionner un assureur!";
v_msgEng="Please select an insurer!";
alert_ebene(v_msg, v_msgEng);
$("#codeGcAssureur").focus();
return;
}
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'codeGcAssureur=' + codeGcAssureur;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxrequetecartegcexport/";
$.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 ged_carte_gc(idGcCarte)
{
if (idGcCarte>"0")
{
}
}
//
function recharger_cartes_gc_non_sel()
{
$("#detail_facture").html('');
codeGcAssureur = $("#codeGcAssureur").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees = 'codeGcAssureur=' + codeGcAssureur;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxcartegcnonsel/";
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#detail_facture").html(data);
$(".datepicker" ).datepicker();
}
});
}
function valider_selection_cartes_gc()
{
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxcartegcnonsel/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_cartes_gc_non_sel();
}
});
}
function reafficher_cartes_gc_non_sel()
{
$("#detail_facture").html('');
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxcartegcnonsel/reafficher/";
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#detail_facture").html(data);
$(".datepicker" ).datepicker();
}
});
}
function selectionner_carte_gc(idCarteTemp, choix)
{
donnees = 'idCarteTemp='+idCarteTemp+'&choix='+choix;
if(choix==0)
{
v_url = $("#racineWeb").val()+"Ajaxcartegcnonsel/deselectionner/";
}
else
{
v_url = $("#racineWeb").val()+"Ajaxcartegcnonsel/selectionner/";
}
$.ajax({
url: v_url,
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
}
});
}
function selectionner_carte_sel_gc(idCarteTemp, choix)
{
donnees = 'idCarteTemp='+idCarteTemp+'&choix='+choix;
if(choix==0)
{
v_url = $("#racineWeb").val()+"Ajaxcartegcsel/deselectionner/";
}
else
{
v_url = $("#racineWeb").val()+"Ajaxcartegcsel/selectionner/";
}
$.ajax({
url: v_url,
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
}
});
}
function recharger_cartes_gc_sel()
{
v_url = $("#racineWeb").val()+"Ajaxcartegcsel/";
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#detail_facture").html(data);
}
});
}
function reafficher_cartes_gc_sel()
{
$("#detail_facture").html('');
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxcartegcsel/reafficher/";
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#detail_facture").html(data);
$(".datepicker" ).datepicker();
}
});
}
function valider_selection_cartes_gc_sel()
{
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxcartegcsel/validerselection";
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#reglement_gc").html(data);
},
complete: function() {
$("#detail_facture").html('');
v_msg="Validation terminée avec succès!";
v_msgEng="Validation successfully completed";
alert_ebene(v_msg, v_msgEng);
reafficher_cartes_gc_sel();
}
});
}
function selectionner_carte_sel_gc_tout(choix)
{
donnees = 'choix='+choix;
v_url = $("#racineWeb").val()+"Ajaxcartegcsel/selectionnertout/";
$.ajax({
url: v_url,
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
reafficher_cartes_gc_sel();
}
});
}
function selectionner_carte_gc_tout(choix)
{
donnees = 'choix='+choix;
v_url = $("#racineWeb").val()+"Ajaxcartegcnonsel/selectionnertout/";
$.ajax({
url: v_url,
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
reafficher_cartes_gc_non_sel();
}
});
}
// factures
function selectionner_facture_sel_gc_tout(choix)
{
donnees = 'choix='+choix;
v_url = $("#racineWeb").val()+"Ajaxfacturegcsel/selectionnertout/";
$.ajax({
url: v_url,
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
reafficher_factures_gc_sel();
}
});
}
function selectionner_facture_gc_tout(choix)
{
donnees = 'choix='+choix;
v_url = $("#racineWeb").val()+"Ajaxfacturegcnonsel/selectionnertout/";
$.ajax({
url: v_url,
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(data) {
},
complete: function() {
reafficher_factures_gc_non_sel();
}
});
}
function modifier_facturation_gc()
{
observations = $("#observations").val();
if (observations<=" ")
{
v_msg="Veuillez saisir quelque chose!";
v_msgEng="Please enter something!";
alert_ebene(v_msg, v_msgEng);
$("#observations").focus();
return;
}
donnees = 'observations='+observations;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgcregelement/enregistrermodificationgcreglement/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
afficher_gc_reglement();
}
});
}
function valider_gc_rglement_premier()
{
valide0=$("#valide0").val();
valide0 = parseInt(valide0);
if (valide0==1)
{
v_msg="1ère validation déjà effectuée!";
v_msgEng="1st validation already done!";
alert_ebene(v_msg, v_msgEng);
return;
}
montantDu=$("#montantDu").val();
montantDu = parseInt(montantDu);
if (montantDu<=0)
{
v_msg="Rien à valider, revoir le total de la facture!";
v_msgEng="Nothing to validate, review the total bill!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (valide0==0)
{
v_msg="quesConfirmez-vous la 1ère validation de cette facturation?tion";
v_msgEng="Do you confirm the 1st validation of this billing?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#detail_reglement").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxgcregelement/validerdecomptepremier/",
type : 'post',
error: function(errorData) {
},
success: function(data) {
v_msg="1ère validation effectuée avec succès!";
v_msgEng="1st validation done successfully!";
alert_ebene(v_msg, v_msgEng);
},
complete: function() {
afficher_gc_reglement();
}
});
}
}
}
//
function valider_gc_rglement()
{
valide0=$("#valide0").val();
valide0 = parseInt(valide0);
if (valide0!=1)
{
v_msg="Veuillez procéder à la 1ère validation!";
v_msgEng="Please proceed to the 1st validation!";
alert_ebene(v_msg, v_msgEng);
return;
}
valideAs=$("#valideAs").val();
valideAs = parseInt(valideAs);
if (valideAs!=1)
{
v_msg="En attente de la validation de l\'assureur!";
v_msgEng="Waiting for the validation of the insurer!";
alert_ebene(v_msg, v_msgEng);
return;
}
montantDu=$("#montantDu").val();
montantDu = parseInt(montantDu);
if (montantDu<=0)
{
v_msg="Rien à valider, revoir le total de la facture!";
v_msgEng="Nothing to validate, review the total bill!";
alert_ebene(v_msg, v_msgEng);
return;
}
valide=$("#valide").val();
valide = parseInt(valide);
if (valide==0)
{
v_msg="Confirmez-vous la 2ème validation de cette facturation?";
v_msgEng="Do you confirm the 2nd validation of this billing?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#detail_reglement").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxgcregelement/validerdecompte/",
type : 'post',
error: function(errorData) {
},
success: function(data) {
v_msg="2ème validation effectuée avec succès!";
v_msgEng="2nd validation done successfully!";
alert_ebene(v_msg, v_msgEng);
},
complete: function() {
consulter_gc_reglement();
}
});
}
}
}
function consulter_gc_reglement()
{
window.location.assign($("#racineWeb" ).val()+"Gcreglementcons/");
}
function consulter_gc_reglement_id(idGcReglement)
{
donnees = 'idGcReglement='+idGcReglement;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextgcreglement/getcontextbyid/",
type : 'post',
data: donnees,
complete: function() {
window.location.assign($("#racineWeb" ).val()+"Gcreglementcons/");
}
});
}
function encaisser_gc()
{
regle=$("#regle").val();
if (regle==1)
{
v_msg="Déjà encaissé!";
v_msgEng="Already cashed!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Encaissergc/");
}
function imprimer_detail_cartes_gc()
{
}
function imprimer_detail_factures_gc()
{
}
function ajaxchangercompsantegcreglementcons()
{
$("#detail_facture").html('');
codeComposante=$("#codeComposante").val();
if(codeComposante<=" ")
{
v_msg="Veuillez sélectionner une compsante!";
v_msgEng="Please select a compsante!";
alert_ebene(v_msg, v_msgEng);
$("#codeComposante").focus();
return;
}
donnees = 'codeComposante='+codeComposante;
if(codeComposante=="SFACT")
{
v_url = $("#racineWeb").val()+"Ajaxfacturegccons/";
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#detail_facture").html(data);
}
});
}
else
if(codeComposante=="CFACT")
{
v_url = $("#racineWeb").val()+"Ajaxfraisgestiongccons/";
$("#detail_facture").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
$("#detail_facture").html(data);
}
});
}
}
function enregistrer_encaissement_gc()
{
codeModePaiement = $("#codeModePaiement").val();
referencePaiement = $("#referencePaiement").val();
nomTireur = $("#nomTireur").val();
banquePayeur = $("#banquePayeur").val();
montantDu = $("#montantDu").val();
dateComptable = $("#dateComptable").val();
if (codeModePaiement<=" ")
{
v_msg="Veuillez sélectionner le mode de paiement!";
v_msgEng="Please select the payment method!";
alert_ebene(v_msg, v_msgEng);
$("#codeModePaiement").focus();
return;
}
if (referencePaiement<=" ")
{
v_msg="Veuillez indiquer la référence du paiement!";
v_msgEng="Please enter the payment reference!";
alert_ebene(v_msg, v_msgEng);
$("#referencePaiement").focus();
return;
}
if (nomTireur<=" ")
{
v_msg="Veuillez saisir le tireur!";
v_msgEng="Please enter the issuer of the check! ";
alert_ebene(v_msg, v_msgEng);
$("#nomTireur").focus();
return;
}
if (banquePayeur<=" ")
{
v_msg="Veuillez saisir la banque payeur!";
v_msgEng="Please enter the paying bank!";
alert_ebene(v_msg, v_msgEng);
$("#banquePayeur").focus();
return;
}
if (dateComptable<=" ")
{
v_msg="Veuillez saisir la date comptable!";
v_msgEng="Please enter the posting date!";
alert_ebene(v_msg, v_msgEng);
$("#dateComptable").focus();
return;
}
if(montantDu<=" ")
{
montantDu = "0";
}
if(montantDu==0)
{
v_msg="Rien à régler!";
v_msgEng="Nothing to pay!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous cet encaissement?";
v_msgEng="Do you confirm this receipt?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'codeModePaiement='+codeModePaiement+'&referencePaiement='+referencePaiement;
donnees += '&nomTireur='+nomTireur+'&banquePayeur='+banquePayeur;
donnees += '&montantDu='+montantDu+'&dateComptable='+dateComptable;
$.ajax({
url: $("#racineWeb").val()+"Ajaxgcregelement/enregistrerencaissementgc/",
type : 'post',
data: donnees,
success: function(data) {
consulter_gc_reglement();
},
complete: function() {
}
});
}
}
function imprimer_detail_facture_gc()
{
$('#div_export_b').html("");
$("#btn_pop_imprimer_detail_gc").click();
}
/*
function reinitialiser_emailgcassureur)
{
emailgcassureur = $("#emailgcassureur_0").val();
$("#emailgcassureur").val(emailgcassureur);
}
*/
function charger_detail_facture_gc_pdf()
{
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailfacturegcpdf/",
type : 'post',
success: function(data) {
donnees_retour = data;
},
complete: function() {
div_export.html(donnees_retour);
}
});
}
function ctrlkeypress_liste_carte_gc(ev)
{
var keycode = (ev.keyCode ? ev.keyCode : ev.which);
if(keycode == '13')
{
afficher_liste_carte_gc();
}
}
function afficher_liste_carte_gc()
{
donnees = "";
donnees_retour = "";
numeroBeneficiaire = $("#numeroBeneficiaire_gc").val();
numeroBeneficiaire = numeroBeneficiaire.trim();
donnees = 'numeroBeneficiaire=' + numeroBeneficiaire;
$("#div_liste_carte_gc").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisterecherchecartegc/",
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
$("#div_liste_carte_gc").html(donnees_retour);
}
});
}
function init_creer_carte_gc(idBeneficiaire)
{
$("#idBeneficiaire_gc").val(idBeneficiaire);
$("#btn_new_carte").click();
}
function creer_carte_gc()
{
v_msg="Confirmez-vous cette opération?";
v_msgEng="Do you confirm this operation?";
if(confirm_ebene(v_msg, v_msgEng))
{
idBeneficiaire = $("#idBeneficiaire_gc").val();
dateCarte = $("#dateCarte").val();
donnees = 'idBeneficiaire=' + idBeneficiaire+"&dateCarte="+dateCarte;
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisterecherchecartegc/creercarte/",
type : 'post',
data: donnees,
success: function(data) {
$("#btn_close_pop_carte").click();
},
complete: function() {
afficher_liste_carte_gc();
}
});
}
}
function supprimer_carte_gc(idGcCarte, facture)
{
if (facture==1)
{
v_msg="Carte déjà facturée!";
v_msgEng="Card already billed!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous cette suppression?";
v_msgEng="Do you confirm this deletion?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idGcCarte=' + idGcCarte;
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisterecherchecartegc/supprimercarte/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
afficher_liste_carte_gc();
}
});
}
}
function init_modif_carte_gc(idGcCarte, dateCarte, montantCarte, montantCarte_f, facture)
{
if (facture==1)
{
v_msg="Carte déjà facturée!";
v_msgEng="Card already billed!";
alert_ebene(v_msg, v_msgEng);
return;
}
$("#idGcCarte_gc").val(idGcCarte);
$("#dateCarte_gc").val(dateCarte);
$("#montantCarte_gc").val(montantCarte);
$("#montantCarte_f").val(montantCarte_f);
$("#btn_modif_carte").click();
}
function modifier_carte_gc()
{
v_msg="Confirmez-vous cette modification?";
v_msgEng="Do you confirm this change?";
if(confirm_ebene(v_msg, v_msgEng))
{
idGcCarte = $("#idGcCarte_gc").val();
dateCarte = $("#dateCarte_gc").val();
montantCarte = $("#montantCarte_gc").val();
donnees = 'idGcCarte='+idGcCarte+"&dateCarte="+dateCarte+"&montantCarte="+montantCarte;
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisterecherchecartegc/modifiercarte/",
type : 'post',
data: donnees,
success: function(data) {
$("#btn_close_pop_modif_carte").click();
},
complete: function() {
afficher_liste_carte_gc();
}
});
}
}
function charger_detail_carte_gc_pdf()
{
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailcartegcpdf/",
type : 'post',
success: function(data) {
donnees_retour = data;
},
complete: function() {
div_export.html(donnees_retour);
}
});
}
function charger_detail_tous_gc_pdf()
{
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailtousgcpdf/",
type : 'post',
// data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
div_export.html(donnees_retour);
}
});
}
//
function selectionner_tous_compte()
{
v_msg="Validation des factures non traitées. Confirmez-vous cette opération?";
v_msgEng="Validation of unprocessed invoices. Do you confirm this operation?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#detail_reglement").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/validertouteslesfacturesdecompte/",
type : 'post',
success: function(data) {
afficherdecompte();
},
complete: function() {
}
});
}
}
function charger_detail_facture_gc_xls()
{
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailfacturegcxls/",
type : 'post',
success: function(data) {
donnees_retour = data;
},
complete: function() {
div_export.html(donnees_retour);
}
});
}
function charger_detail_carte_gc_xls()
{
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailcartegcxls/",
type : 'post',
success: function(data) {
donnees_retour = data;
},
complete: function() {
div_export.html(donnees_retour);
}
});
}
function charger_detail_tous_gc_xls()
{
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdetailtousgcxls/",
type : 'post',
success: function(data) {
donnees_retour = data;
},
complete: function() {
div_export.html(donnees_retour);
}
});
}
function imprimer_recu_gc()
{
regle=$("#regle").val();
if (regle!=1)
{
v_msg="Pas encore encaissé!";
v_msgEng="Not yet cashed!";
alert_ebene(v_msg, v_msgEng);
return;
}
donnees_retour = "";
var div_export = $('#div_export_b');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxrecugc/",
type : 'post',
success: function(data) {
donnees_retour = data;
},
complete: function() {
div_export.html(donnees_retour);
}
});
}
function cartes_beneficiaire()
{
window.location.assign($("#racineWeb" ).val()+"Cartesbenficiaire/");
}
function afficher_liste_carte_beneficiaire()
{
donnees_retour = "";
$("#div_liste_carte").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisterecherchecartebeneficiaire/",
type : 'post',
success: function(data) {
donnees_retour = data;
},
complete: function() {
$("#div_liste_carte").html(donnees_retour);
}
});
}
function init_modif_carte_beneficiaire(idBeneficiaireCarte, dateCarte, montantCarte, montantCarte_f, facture)
{
if (facture==1)
{
v_msg="Carte déjà facturée!";
v_msgEng="Card already billed!";
alert_ebene(v_msg, v_msgEng);
return;
}
$("#idBeneficiaireCarte").val(idBeneficiaireCarte);
$("#dateCarteModif").val(dateCarte);
$("#montantCarteModif").val(montantCarte);
$("#montantCarte_f").val(montantCarte_f);
$("#btn_modif_carte").click();
}
// maintenant
function init_creer_carte()
{
$("#btn_new_carte").click();
}
function creer_carte()
{
v_msg="Confirmez-vous cette opération?";
v_msgEng="Do you confirm this operation?";
if(confirm_ebene(v_msg, v_msgEng))
{
montantCarte = $("#montantCarteNew").val();
dateCarte = $("#dateCarteNew").val();
donnees = 'dateCarte='+dateCarte+"&montantCarte="+montantCarte;
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisterecherchecartebeneficiaire/creercarte/",
type : 'post',
data: donnees,
success: function(data) {
$("#btn_close_pop_carte").click();
},
complete: function() {
afficher_liste_carte_beneficiaire();
}
});
}
}
function supprimer_carte(idBeneficiaireCarte, facture)
{
if (facture==1)
{
v_msg="Carte déjà facturée!";
v_msgEng="Card already billed!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous cette suppression?";
v_msgEng="Do you confirm this deletion?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idBeneficiaireCarte=' + idBeneficiaireCarte;
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisterecherchecartebeneficiaire/supprimercarte/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
afficher_liste_carte_beneficiaire();
}
});
}
}
function modifier_carte_beneficiaire()
{
v_msg="Confirmez-vous cette modification?";
v_msgEng="Do you confirm this change?";
if(confirm_ebene(v_msg, v_msgEng))
{
idBeneficiaireCarte = $("#idBeneficiaireCarte").val();
dateCarte = $("#dateCarteModif").val();
montantCarte = $("#montantCarteModif").val();
donnees = 'idBeneficiaireCarte='+idBeneficiaireCarte+"&dateCarte="+dateCarte+"&montantCarte="+montantCarte;
$.ajax({
url: $("#racineWeb").val()+"Ajaxlisterecherchecartebeneficiaire/modifiercarte/",
type : 'post',
data: donnees,
success: function(data) {
$("#btn_close_pop_modif_carte").click();
},
complete: function() {
afficher_liste_carte_beneficiaire();
}
});
}
}
function maj_champ_application_plafond(idGarantie, choix)
{
donnees = 'idGarantie='+idGarantie+'&choix='+choix;
v_msg = "Vous venez de conformer que cette limite est par tête!";
v_msgEng="You just complied that this limit is per head!";
if(choix=="0")
{
v_msg = "Vous venez de conformer que cette limite est par famille!";
v_msgEng="You have just complied that this limit is per family!";
}
v_url = $("#racineWeb").val()+"Ajaxgarantiescollege/majchampapplicationplafond/";
$.ajax({
url: v_url,
type: 'POST',
data: donnees,
success: function(data) {
},
error: function(errordata) {
},
complete: function() {
alert_ebene(v_msg, v_msgEng);
}
});
}
function requetes_factures_accident()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"/";
codePrestataire = $("#codePrestataire").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
$("#div_detail_requete").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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_accident_export()
{
$('#div_export_a').html("");
donnees = "";
donnees_retour = "";
codeRequete=$("#codeRequete").val();
if (codeRequete<=" ")
{
v_msg="Veuillez sélectionner une requête!";
v_msgEng="Please select a query!";
alert_ebene(v_msg, v_msgEng);
$("#codeRequete").focus();
return;
}
v_url = $("#racineWeb").val()+"Ajaxrequete"+codeRequete+"export/";
codePrestataire = $("#codePrestataire").val();
dateFacture1 = $("#dateFacture1").val();
dateFacture2 = $("#dateFacture2").val();
donnees += 'codePrestataire=' + codePrestataire;
donnees += '&dateFacture1=' + dateFacture1;
donnees += '&dateFacture2=' + dateFacture2;
var div_export = $('#div_detail_requete');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.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 init_imprimer_demande_decompte()
{
regle=$("#regle").val();
regle = parseInt(regle);
if (regle==0)
{
v_msg="Veuillez procéder à la 1ère validation!";
v_msgEng="Please proceed to the 1st validation!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (regle==2)
{
v_msg="En attente de la validation du prestataire!";
v_msgEng="Waiting for the validation of the provider!";
alert_ebene(v_msg, v_msgEng);
return;
}
if ($("#montantApayer").val()<="0")
{
v_msg="Rien à payer!";
v_msgEng="Nothing to pay!";
alert_ebene(v_msg, v_msgEng);
return;
}
demandeReglement=$("#demandeReglement").val();
demandeReglement = parseInt(demandeReglement);
if (regle==1)
{
v_msg="Déjà réglé!";
v_msgEng="Already paid!";
alert_ebene(v_msg, v_msgEng);
return;
}
$('#div_export_demande_reglement').html('');
$("#btn_demande_reglement").click();
}
function imprimer_demande_reglement()
{
codePrestataire = $("#codePrestataire").val();
a_enreg = $("#a_enreg").val();
codeBanque = $("#codeBanque").val();
numeroCompteBancaire = $("#numeroCompteBancaire").val();
intituleCompteBancaire = $("#intituleCompteBancaire").val();
if (codeBanque<=" ")
{
v_msg="Veuillez sélectionner une banque!";
v_msgEng="Please select a bank!";
alert_ebene(v_msg, v_msgEng);
$("#codeBanque").focus();
return;
}
if (numeroCompteBancaire<=" ")
{
v_msg="Veuillez indiquer le No de compte bancaire!";;
v_msgEng="Please enter the bank account No";
alert_ebene(v_msg, v_msgEng);
$("#numeroCompteBancaire").focus();
return;
}
if (intituleCompteBancaire<=" ")
{
v_msg="Veuillez indiquer intitulé du compte!";
v_msgEng="Please enter the owner of the account!";
alert_ebene(v_msg, v_msgEng);
$("#intituleCompteBancaire").focus();
return;
}
idReglement = $("#idReglement").val();
if (idReglement>"0")
{
var div_export_demande_reglement = $('#div_export_demande_reglement');
div_export_demande_reglement.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
if (a_enreg=="1")
{
codePrestataire = $("#codePrestataire").val();
codeBanque = $("#codeBanque").val();
codeBanqueInterne = $("#codeBanqueInterne").val();
codeGuichet = $("#codeGuichet").val();
numeroCompteBancaire = $("#numeroCompteBancaire").val();
cleRib = $("#cleRib").val();
iban = $("#iban").val();
intituleCompteBancaire = $("#intituleCompteBancaire").val();
donnees = 'codePrestataire='+codePrestataire;
donnees += '&codeBanque='+codeBanque+'&codeBanqueInterne='+codeBanqueInterne+'&codeGuichet='+codeGuichet;
donnees += '&numeroCompteBancaire='+numeroCompteBancaire+'&cleRib='+cleRib+'&iban='+iban+'&intituleCompteBancaire='+intituleCompteBancaire ;
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/majcomptebancaire/",
type : 'post',
data: donnees,
success: function(data)
{
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/",
type: 'POST',
success: function(data)
{
div_export_demande_reglement.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
});
}
else
{
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerdemandereglement/",
type: 'POST',
success: function(data)
{
div_export_demande_reglement.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
}
}
function novalidprestataire()
{
/*
0 Décompte en cours
2 Attente Valid. prestat. / Waiting for provider s valid.
3 Validé par le prestataire
8 Pas besoin de valid prestat / Provid valid not needed
9 En attente de règelment
1 Réglé / Payé
*/
regle=$("#regle").val();
regle = parseInt(regle);
if (regle==0)
{
v_msg="Veuillez procéder à la 1ère validation!";
v_msgEng="Please proceed to the 1st validation!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (regle==3)
{
v_msg="Déjà validé par le prestataire!";
v_msgEng="Already validated by the provider!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (regle==8)
{
v_msg="Déjà effectué!";
v_msgEng="Already done!";
alert_ebene(v_msg, v_msgEng);
return;
}
if ($("#montantApayer").val()<="0")
{
v_msg="Rien à valider!";
v_msgEng="Nothing to validate!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (regle==2)
{
v_msg="Confirmez-vous que la validation du prestataire n\'est pas nécessaire?";
v_msgEng="Do you confirm that provider validation is not necessary?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#detail_reglement").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/novalidprestataire/",
type : 'post',
error: function(errorData) {
},
success: function(data) {
},
complete: function()
{
v_msg="Validation terminée avec succès!";
v_msgEng="Validation successfully completed";
alert_ebene(v_msg, v_msgEng);
afficherdecompte();
}
});
}
}
}
function listerdecomptes()
{
codePrestataire = $("#codePrestataire").val();
codeExercice1 = $("#codeExercice1").val();
codeMois1 = $("#codeMois1").val();
codeExercice2 = $("#codeExercice2").val();
codeMois2 = $("#codeMois2").val();
codeEtatDecompte = $("#codeEtatDecompte").val();
if (codeMois1<=" ")
{
v_msg="Veuillez sélectionner le mois de départ!";
v_msgEng="Please select the month of start!";
alert_ebene(v_msg, v_msgEng);
$("#codeMois1").focus();
return;
}
if (codeExercice1<=" ")
{
v_msg="Veuillez sélectionner exercice de départ!";
v_msgEng="Please select the exercise of start!";
alert_ebene(v_msg, v_msgEng);
$("#codeExercice1").focus();
return;
}
if (codeMois2<=" ")
{
v_msg="Veuillez sélectionner le mois de fin!";
v_msgEng="Please select the month of end!";
alert_ebene(v_msg, v_msgEng);
$("#codeMois2").focus();
return;
}
if (codeExercice2<=" ")
{
v_msg="Veuillez sélectionner exercice de fin!";
v_msgEng="Please select the exercise of end!";
alert_ebene(v_msg, v_msgEng);
$("#codeExercice2").focus();
return;
}
codePerdiode1 = codeExercice1+codeMois1;
codePerdiode2 = codeExercice2+codeMois2;
donnees = 'codePrestataire='+codePrestataire+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2+'&codeEtatDecompte='+codeEtatDecompte;
$("#div_detail").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxlistedecomptes/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_detail").html(data);
},
complete: function() {
$("#nbligne").val("Lignes : "+$("#nbligne_info").val());
}
});
}
function listerdecomptes_export()
{
codePrestataire = $("#codePrestataire").val();
codeExercice1 = $("#codeExercice1").val();
codeMois1 = $("#codeMois1").val();
codeExercice2 = $("#codeExercice2").val();
codeMois2 = $("#codeMois2").val();
codeEtatDecompte = $("#codeEtatDecompte").val();
if (codeMois1<=" ")
{
v_msg="Veuillez sélectionner le mois de départ!";
v_msgEng="Please select the month of start!";
alert_ebene(v_msg, v_msgEng);
$("#codeMois1").focus();
return;
}
if (codeExercice1<=" ")
{
v_msg="Veuillez sélectionner exercice de départ!";
v_msgEng="Please select the exercise of start!";
alert_ebene(v_msg, v_msgEng);
$("#codeExercice1").focus();
return;
}
if (codeMois2<=" ")
{
v_msg="Veuillez sélectionner le mois de fin!";
v_msgEng="Please select the month of end!";
alert_ebene(v_msg, v_msgEng);
$("#codeMois2").focus();
return;
}
if (codeExercice2<=" ")
{
v_msg="Veuillez sélectionner exercice de fin!";
v_msgEng="Please select the exercise of end!";
alert_ebene(v_msg, v_msgEng);
$("#codeExercice2").focus();
return;
}
codePerdiode1 = codeExercice1+codeMois1;
codePerdiode2 = codeExercice2+codeMois2;
donnees = 'codePrestataire='+codePrestataire+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2+'&codeEtatDecompte='+codeEtatDecompte;
var div_export = $('#div_detail');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxlistedecomptesexport/";
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
div_export.html(donnees_retour);
}
});
}
function maj_reception_facture_decompte()
{
dateReception = $("#dateReception_pop").val();
montantPrestataire = $("#montantPrestataire_pop").val();
if(dateReception<=" ")
{
v_msg="Veuillez indicquer la date de réception!";
v_msgEng="Please enter the date of receipt!";
alert_ebene(v_msg, v_msgEng);
$("#dateReception_pop").focus();
return;
}
if (montantPrestataire<=" ")
{
montantPrestataire = "0";
}
montantPrestataire = montantPrestataire.replace(" ", "");
montantPrestataire = parseInt(montantPrestataire);
if (montantPrestataire=="0")
{
v_msg="Veuillez indicquer le montant de la facture du prestataire!";
v_msgEng="Please enter the invoice amount of the service provider!";
alert_ebene(v_msg, v_msgEng);
$("#montantPrestataire_pop").focus();
return;
}
donnees = 'dateReception='+dateReception+'&montantPrestataire='+montantPrestataire;
v_msg="Confirmez-vous ces informations?";
v_msgEng="Do you confirm this information?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/majreceptionfactureprestataire/",
type: 'POST',
data: donnees,
success: function(data) {
$("#btn_close_pop_reception").click();
},
error: function(erreur) {
},
complete: function() {
dateReception = $("#dateReception_pop").val();
$("#dateReception").val(dateReception+" / "+montantPrestataire);
$("#btn_dateReception").val(dateReception+" / "+montantPrestataire);
v_msg="Opération effectuée avec succès!";
v_msgEng="Operation successfully completed";
alert_ebene(v_msg, v_msgEng);
re_afficherdecompte();
}
});
return;
}
else
{
v_msg="Opération annulée!";
v_msgEng="Operation canceled!";
alert_ebene(v_msg, v_msgEng);
return;
}
}
//
function imprimer_lite_prestataire()
{
donnees = "";
donnees_retour = "";
codeTypePrestataire = $("#codeTypePrestataire").val();
codeReseau = $("#codeReseau").val();
libelle = $("#libelle").val();
donnees += 'codeTypePrestataire=' + codeTypePrestataire;
donnees += '&codeReseau=' + codeReseau;
donnees += '&libelle=' + libelle;
$("#div_liste_prestataire").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerdlisteprestataireparametrage/",
type: 'POST',
data: donnees,
success: function(data)
{
$("#div_liste_prestataire").html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function exporter_lite_prestataire()
{
donnees = "";
donnees_retour = "";
codeTypePrestataire = $("#codeTypePrestataire").val();
codeReseau = $("#codeReseau").val();
libelle = $("#libelle").val();
donnees += 'codeTypePrestataire=' + codeTypePrestataire;
donnees += '&codeReseau=' + codeReseau;
donnees += '&libelle=' + libelle;
$("#div_liste_prestataire").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerdlisteprestataireparametrageexport/",
type: 'POST',
data: donnees,
success: function(data)
{
$("#div_liste_prestataire").html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function exporter_lite_prestataire_actif()
{
/*
donnees = "";
donnees_retour = "";
codeTypePrestataire = $("#codeTypePrestataire").val();
codeReseau = $("#codeReseau").val();
libelle = $("#libelle").val();
donnees += 'codeTypePrestataire=' + codeTypePrestataire;
donnees += '&codeReseau=' + codeReseau;
donnees += '&libelle=' + libelle;
*/
donnees = "";
donnees_retour = "";
codeTypePrestataire = $("#codeTypePrestataire").val();
codeReseau = $("#codeReseau").val();
libelle = $("#libelle").val();
codePays = $("#codePays").val();
codeVille = $("#codeVille").val();
codeLocalite = $("#codeLocalite").val();
donnees += 'codeTypePrestataire=' + codeTypePrestataire;
donnees += '&codeReseau=' + codeReseau;
donnees += '&libelle=' + libelle;
donnees += '&codePays=' + codePays;
donnees += '&codeVille=' + codeVille;
donnees += '&codeLocalite=' + codeLocalite;
// alert(donnees);
// return;
$("#div_liste_prestataire").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerdlisteprestataireparametrageexport/actif/",
type: 'POST',
data: donnees,
success: function(data)
{
$("#div_liste_prestataire").html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function creer_prestataire()
{
idPrestataire = $("#idPrestataire").val();
libelle = $("#libelle").val();
codeTypePrestataire = $("#codeTypePrestataire").val();
codeReseau = $("#codeReseau").val();
codeTarifActe = $("#codeTarifActe").val();
codeTarifMedicament = $("#codeTarifMedicament").val();
codeTarifOptique = $("#codeTarifOptique").val();
codePays = $("#codePays").val();
villeSignature = $("#villeSignature").val();
codeTypeDecompte = $("#codeTypeDecompte").val();
adresseGeo = $("#adresseGeo").val();
numeroCompte = $("#numeroCompte").val();
adressePost = $("#adressePost").val();
conventionne = $("#conventionne").val();
gestionreseau = $("#gestionreseau").val();
emailGestionPrestataire = $("#emailGestionPrestataire").val();
// Prise en compte des comptes bancaires prestataire
codeBanque = $("#codeBanque").val();
codeBanqueInterne = $("#codeBanqueInterne").val();
codeGuichet = $("#codeGuichet").val();
numeroCompteBancaire = $("#numeroCompteBancaire").val();
cleRib = $("#cleRib").val();
iban = $("#iban").val();
intituleCompteBancaire = $("#intituleCompteBancaire").val();
//
codeVille = $("#codeVille").val();
codeLocalite = $("#codeLocalite").val();
smsGestionPrestataire = $("#smsGestionPrestataire").val();
registreCommerce = $("#registreCommerce").val();
codeLanguePrestataire = $("#codeLangueUser").val();
rdvPossible = $("#rdvPossible").val();
if(libelle<=" ")
{
v_msg="Veuillez indiquer le nom du prestataire!";
v_msgEng="Please enter the name of the provider";
alert_ebene(v_msg, v_msgEng);
$("#libelle").focus();
return;
}
if(codeTypePrestataire<=" ")
{
v_msg="Veuillez indiquer le type de prestataire!";
v_msgEng="Please indicate the type of provider!";
alert_ebene(v_msg, v_msgEng);
$("#codeTypePrestataire").focus();
return;
}
if(codeReseau<=" ")
{
v_msg="Veuillez indiquer le réseau!";
v_msgEng="Please indicate the care network!";
alert_ebene(v_msg, v_msgEng);
$("#codeReseau").focus();
return;
}
if (codeTypePrestataire=="CSO" || codeTypePrestataire=="DEN" || codeTypePrestataire=="HRW" || codeTypePrestataire=="LAB"|| codeTypePrestataire=="SEA")
{
if (codeTarifActe<" ")
{
v_msg="Veuillez fournir le tarif des actes!";
v_msgEng="Please provide the rates of the acts!";
alert_ebene(v_msg, v_msgEng);
$("#codeTarifActe").focus();
return;
}
}
// if (codeTypePrestataire=="PHA")
if (codeTypePrestataire=="CSO" || codeTypePrestataire=="PHA")
{
if (codeTarifMedicament<" ")
{
v_msg="Veuillez fournir le tarif des médicaments!";
v_msgEng="Please provide the price of the drugs!";
alert_ebene(v_msg, v_msgEng);
$("#codeTarifMedicament").focus();
return;
}
}
if (codeTypePrestataire=="OPT")
{
if (codeTarifOptique<" ")
{
v_msg="Veuillez fournir le tarif optique!";
v_msgEng="Please provide the optical rate!";
alert_ebene(v_msg, v_msgEng);
$("#codeTarifOptique").focus();
return;
}
}
if(codePays<=" ")
{
v_msg="Veuillez indiquer le pays!";
v_msgEng="Please indicate the country!";
alert_ebene(v_msg, v_msgEng);
$("#codePays").focus();
return;
}
if (codeVille<=" ")
{
v_msg="Veuillez préciser la localisation!";
v_msgEng="Please specify the location!";
alert_ebene(v_msg, v_msgEng);
$("#codeVille").focus();
return;
}
if (codeLocalite<=" ")
{
v_msg="Veuillez préciser la localisation!";
v_msgEng="Please specify the location!";
alert_ebene(v_msg, v_msgEng);
$("#codeLocalite").focus();
return;
}
if(villeSignature<=" ")
{
v_msg="Veuillez indiquer la ville de signature!";
v_msgEng="Please indicate the city of signature!";
alert_ebene(v_msg, v_msgEng);
$("#villeSignature").focus();
return;
}
if(codeTypeDecompte<=" ")
{
v_msg="Veuillez indiquer la type de décompte!";
v_msgEng="Please indicate the type of count!";
alert_ebene(v_msg, v_msgEng);
$("#codeTypeDecompte").focus();
return;
}
if(conventionne<=" ")
{
v_msg="Le prestataire est-il conventionné ou pas?";
v_msgEng="Do the provider have an convetion or not?";
alert_ebene(v_msg, v_msgEng);
$("#conventionne").focus();
return;
}
if(gestionreseau<=" ")
{
v_msg="Tenir compte des réseaux de soins ou pas?";
v_msgEng="Consider care networks or not?";
alert_ebene(v_msg, v_msgEng);
$("#gestionreseau").focus();
return;
}
if(codeLanguePrestataire<=" ")
{
v_msg="Veuillez sélectionner une langue";
v_msgEng="Please select a language";
alert_ebene(v_msg, v_msgEng);
$("#codeLangueUser").focus();
return;
}
if(registreCommerce.length<9)
{
v_msg="Veuillez revoir le TIN";
v_msgEng="Please review the TIN";
alert_ebene(v_msg, v_msgEng);
$("#registreCommerce").focus();
return;
}
donnees = 'libelle='+libelle+'&codeTypePrestataire='+codeTypePrestataire;
donnees += '&codeReseau='+codeReseau+'&codeTarifActe='+codeTarifActe+'&codeTarifMedicament='+codeTarifMedicament;
donnees += '&codeTarifOptique='+codeTarifOptique+'&codePays='+codePays+'&villeSignature='+villeSignature;
donnees += '&codeTypeDecompte='+codeTypeDecompte+'&adresseGeo='+adresseGeo+'&numeroCompte='+numeroCompte;
donnees += '&adressePost='+adressePost+'&conventionne='+conventionne+'&gestionreseau='+gestionreseau+'&emailGestionPrestataire='+emailGestionPrestataire;
donnees += '&codeBanque='+codeBanque+'&codeBanqueInterne='+codeBanqueInterne+'&codeGuichet='+codeGuichet;
donnees += '&numeroCompteBancaire='+numeroCompteBancaire+'&cleRib='+cleRib+'&iban='+iban+'&intituleCompteBancaire='+intituleCompteBancaire;
donnees += '&codeVille='+codeVille+'&codeLocalite='+codeLocalite+'&smsGestionPrestataire='+smsGestionPrestataire+'&registreCommerce='+registreCommerce;
donnees += '&codeLanguePrestataire='+codeLanguePrestataire;
donnees += '&rdvPossible='+rdvPossible;
// alert(donnees);
// return;
v_msg="Confirmez-vous ce nouveau prestataire?";
v_msgEng="Do you confirm this new provider?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestataire/creerprestataire/",
type : 'post',
data: donnees,
success: function(data) {
$('#div_idPrestataire').html(data);
},
complete: function()
{
idPrestataire = $("#idPrestataire").val();
afficher_prestataire_id(idPrestataire);
}
});
}
}
function param_prestataire()
{
window.location.assign($("#racineWeb" ).val()+"Prestataires/");
}
function creer_user_prestataire()
{
nom = $("#nom").val();
prenoms = $("#prenoms").val();
telephone = $("#telephone").val();
email = $("#email").val();
codeLangue = $("#codeLangueUser").val();
actVisible = $("#actVisibleUser").val();
AffectionVisible = $("#AffectionVisible").val();
nvmdp = $("#nvmdp").val();
cfnvmdp = $("#cfnvmdp").val();
if(nom<=" ")
{
v_msg="Veuillez indiquer le nom!";
v_msgEng="Please enter the name!";
alert_ebene(v_msg, v_msgEng);
$("#nom").focus();
return;
}
if(codeLangue<=" ")
{
v_msg="Veuillez indiquer la langue!";
v_msgEng="Please select the language";
alert_ebene(v_msg, v_msgEng);
$("#codeLangueUser").focus();
return;
}
if (actVisible<=" ")
{
v_msg="Actes visbles oui ou non?";
v_msgEng="Acts are visible yes or no?";
alert_ebene(v_msg, v_msgEng);
$("#actVisibleUser").focus();
return;
}
if (AffectionVisible<=" ")
{
v_msg="Affections visbles oui ou non?";
v_msgEng="Affections are visible yes or no?";
alert_ebene(v_msg, v_msgEng);
$("#AffectionVisible").focus();
return;
}
if(nvmdp<=" ")
{
v_msg="Veuillez indiquer le mot de passe!";
v_msgEng="Please enter the password!";
alert_ebene(v_msg, v_msgEng);
$("#nvmdp").focus();
return;
}
if(nvmdp != cfnvmdp)
{
v_msg="Veuillez confirmer votre mot de passe!";
v_msgEng="Please confirm your password!";
alert_ebene(v_msg, v_msgEng);
$("#cfnvmdp").focus();
return;
}
motPass = nvmdp;
donnees = 'nom='+nom+'&prenoms='+prenoms;
donnees += '&telephone='+telephone+'&email='+email+'&motPass='+motPass;
donnees += '&codeLangue='+codeLangue+'&actVisible='+actVisible+'&AffectionVisible='+AffectionVisible;
v_msg="Confirmez-vous ce nouvel utilisateur?";
v_msgEng="Do you confirm this new user?";
if(confirm_ebene(v_msg, v_msgEng))
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestataire/creeruserprestataire/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function()
{
users_prestataire();
}
});
}
}
function controle_new_pass()
{
if ($("#nvmdp" ).val()<=' ')
{
v_msg="Veuillez saisir un mot de passe!";
v_msgEng="Please enter a password!";
alert_ebene(v_msg, v_msgEng);
$("#nvmdp").focus();
return false;
}
longueur = $("#nvmdp").val().length;
if(longueur>0 && longueur<6)
{
v_msg="6 caractères minimum exigé!";
v_msgEng="6 characters minmum required!";
alert_ebene(v_msg, v_msgEng);
$("#nvmdp").focus();
return false;
}
if ($("#cfnvmdp" ).val()!=$("#nvmdp" ).val())
{
v_msg="Veuillez confirmer votre mot de passe!";
v_msgEng="Please confirm your password!";
alert_ebene(v_msg, v_msgEng);
$("#nvmdp").focus();
return false;
}
}
//
function desactiver_prestataire(codePrestataire)
{
v_msg="Confirmez-vous la désactivation?";
v_msgEng="Do you confirm the deactivation?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = "codePrestataire="+codePrestataire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestataire/desactiverprestataire/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
v_msg="Opération effectuée avec succès!";
v_msgEng="Operation successfully completed";
alert_ebene(v_msg, v_msgEng);
retour_prestataire_id();
}
});
return;
}
else
{
v_msg="Opération annulée!";
v_msgEng="Operation canceled!";
alert_ebene(v_msg, v_msgEng);
return;
}
}
function activer_prestataire(codePrestataire)
{
v_msg="Confirmez-vous l\'activation?";
v_msgEng="Do you confirm the activation?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = "codePrestataire="+codePrestataire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxprestataire/activerprestataire/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
v_msg="Opération effectuée avec succès!";
v_msgEng="Operation successfully completed";
alert_ebene(v_msg, v_msgEng);
retour_prestataire_id();
}
});
return;
}
else
{
v_msg="Opération annulée!";
v_msgEng="Operation canceled!";
alert_ebene(v_msg, v_msgEng);
return;
}
}
function demander_reglement()
{
regle=$("#regle").val();
regle = parseInt(regle);
demandeReglement=$("#demandeReglement").val();
demandeReglement = parseInt(demandeReglement);
if (demandeReglement==1)
{
v_msg="Demande déjà effectuée!";
v_msgEng="Request already made!";
alert_ebene(v_msg, v_msgEng);
return;
}
if (regle==1)
{
v_msg="Déjà réglé!";
v_msgEng="Already paid!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous la demande de règlement?";
v_msgEng="Do you confirm the request of payment?";
if(confirm_ebene(v_msg, v_msgEng))
{
$("#detail_reglement").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/demanderreglement/",
type : 'post',
success: function(data) {
consulterdecompte();
},
complete: function() {
}
});
}
}
function demandesreglement()
{
$("#div_detail").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxldemandesteglement/",
type : 'post',
success: function(data) {
$("#div_detail").html(data);
},
complete: function() {
$("#nbligne").val("Lignes : "+$("#nbligne_info").val());
}
});
}
function demandesreglement_export()
{
$('#div_detail').html("");
var div_export = $('#div_export_a');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxldemandesteglementexport/";
$.ajax({
url: v_url,
type : 'post',
success: function(data) {
donnees_retour = data;
},
complete: function() {
div_export.html(donnees_retour);
}
});
}
//
function initierdecompte_liste(codePrestataire, codeExercice, codeMois)
{
donnees = 'codePrestataire='+codePrestataire+'&codeExercice='+codeExercice+'&codeMois='+codeMois;
$.ajax({
url: $("#racineWeb").val()+"Ajaxdecompte/initierdecompte/",
type : 'post',
data: donnees,
success: function(data) {
$("#inforegle").html(data);
},
complete: function() {
regle=$("#regle").val();
if(regle==-1)
{
v_msg="Problème lors de l\'initialisation!";
v_msgEng="Problem during initialization!";
alert_ebene(v_msg, v_msgEng);
return;
}
else if(regle==0 || regle==2 || regle==3 || regle==8)
{
afficherdecompte();
}
else
{
// 9 => Décompte validé mais en attente de règlemen
// 1 => Décompte réglé
consulterdecompte();
}
}
});
}
function releve_compte_prestataire()
{
codePrestataire = $("#codePrestataire").val();
if (codePrestataire>" ")
{
window.location.assign($("#racineWeb" ).val()+"Relevecompteprestaire/");
}
}
function detail_releve_compte_prestataire()
{
codePrestataire = $("#codePrestataire").val();
codeExercice1 = $("#codeExercice1").val();
codeMois1 = $("#codeMois1").val();
codeExercice2 = $("#codeExercice2").val();
codeMois2 = $("#codeMois2").val();
if (codeMois1<=" ")
{
v_msg="Veuillez sélectionner le mois de départ!";
v_msgEng="Please select the month of start!";
alert_ebene(v_msg, v_msgEng);
$("#codeMois1").focus();
return;
}
if (codeExercice1<=" ")
{
v_msg="Veuillez sélectionner exercice de départ!";
v_msgEng="Please select the exercise of start!";
alert_ebene(v_msg, v_msgEng);
$("#codeExercice1").focus();
return;
}
if (codeMois2<=" ")
{
v_msg="Veuillez sélectionner le mois de fin!";
v_msgEng="Please select the month of end!";
alert_ebene(v_msg, v_msgEng);
$("#codeMois2").focus();
return;
}
if (codeExercice2<=" ")
{
v_msg="Veuillez sélectionner exercice de fin!";
v_msgEng="Please select the exercise of end!";
alert_ebene(v_msg, v_msgEng);
$("#codeExercice2").focus();
return;
}
codePerdiode1 = codeExercice1+codeMois1;
codePerdiode2 = codeExercice2+codeMois2;
donnees = 'codePrestataire='+codePrestataire+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2;
$("#div_detail").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxrelevecompteprestaire/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_detail").html(data);
},
complete: function() {
$("#nbligne").val("Lignes : "+$("#nbligne_info").val());
}
});
}
function detail_releve_compte_prestataire_export()
{
codePrestataire = $("#codePrestataire").val();
codeExercice1 = $("#codeExercice1").val();
codeMois1 = $("#codeMois1").val();
codeExercice2 = $("#codeExercice2").val();
codeMois2 = $("#codeMois2").val();
if (codeMois1<=" ")
{
v_msg="Veuillez sélectionner le mois de départ!";
v_msgEng="Please select the month of start!";
alert_ebene(v_msg, v_msgEng);
$("#codeMois1").focus();
return;
}
if (codeExercice1<=" ")
{
v_msg="Veuillez sélectionner exercice de départ!";
v_msgEng="Please select the exercise of start!";
alert_ebene(v_msg, v_msgEng);
$("#codeExercice1").focus();
return;
}
if (codeMois2<=" ")
{
v_msg="Veuillez sélectionner le mois de fin!";
v_msgEng="Please select the month of end!";
alert_ebene(v_msg, v_msgEng);
$("#codeMois2").focus();
return;
}
if (codeExercice2<=" ")
{
v_msg="Veuillez sélectionner exercice de fin!";
v_msgEng="Please select the exercise of end!";
alert_ebene(v_msg, v_msgEng);
$("#codeExercice2").focus();
return;
}
codePerdiode1 = codeExercice1+codeMois1;
codePerdiode2 = codeExercice2+codeMois2;
donnees = 'codePrestataire='+codePrestataire+'&codePerdiode1='+codePerdiode1+'&codePerdiode2='+codePerdiode2;
var div_export = $('#div_detail');
div_export.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
v_url = $("#racineWeb").val()+"Ajaxrelevecompteprestaireexport/";
$.ajax({
url: v_url,
type : 'post',
data: donnees,
success: function(data) {
donnees_retour = data;
},
complete: function() {
div_export.html(donnees_retour);
}
});
}
function detail_releve_compte_prestataire_global()
{
codePrestataire = $("#codePrestataire").val();
if (codePrestataire<=" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
$("#codePrestataire").focus();
return;
}
detail_releve_compte_prestataire();
}
function detail_releve_compte_prestataire_export_global()
{
codePrestataire = $("#codePrestataire").val();
if (codePrestataire<=" ")
{
v_msg="Veuillez sélectionner un prestataire!";
v_msgEng="Please select a provider!";
alert_ebene(v_msg, v_msgEng);
$("#codePrestataire").focus();
return;
}
detail_releve_compte_prestataire_export();
}
function imprimer_demande_reglement_ff()
{
fraisFuneraireDemande=$("#fraisFuneraireDemande_C").val();
fraisFunerairePaye=$("#fraisFunerairePaye_C").val();
if (fraisFuneraireDemande!=1)
{
v_msg="Aucune demande en cours!";
v_msgEng="No request in progress!";
alert_ebene(v_msg, v_msgEng);
return;
}
demandeReglement=$("#demandeReglement").val();
demandeReglement = parseInt(demandeReglement);
if (fraisFunerairePaye==1)
{
v_msg="Déjà payé!";
v_msgEng="Already paid!";
alert_ebene(v_msg, v_msgEng);
return;
}
var div_export_demande_reglement = $('#div_export_demande_reglement');
div_export_demande_reglement.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerdemandereglementff/",
type: 'POST',
success: function(data)
{
div_export_demande_reglement.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function imprimer_releve_ff()
{
fraisFuneraireDemande=$("#fraisFuneraireDemande_C").val();
fraisFunerairePaye=$("#fraisFunerairePaye_C").val();
if (fraisFuneraireDemande!=1)
{
v_msg="Aucune demande en cours!";
v_msgEng="No request in progress!";
alert_ebene(v_msg, v_msgEng);
return;
}
var div_export_demande_reglement = $('#div_export_demande_reglement');
div_export_demande_reglement.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerdemandereglementff/imprimerreleve/",
type: 'POST',
success: function(data)
{
div_export_demande_reglement.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function enregistrer_dossier_classique()
{
enVigueur=$("#enVigueur_C").val();
codeEtatBeneficiaire=$("#codeEtatBeneficiaire_C").val();
etatbeneficiaire=$("#etatbeneficiaire_C").val();
if (enVigueur!="1")
{
v_msg="Attention! cette personne n'est pas en vigueur";
v_msgEng="Warning! This person is not in force";
alert_ebene(v_msg, v_msgEng);
return;
}
if (codeEtatBeneficiaire!="V")
{
v_msg="Attention! "+etatbeneficiaire;
v_msgEng="Warning! "+etatbeneficiaire;
alert_ebene(v_msg, v_msgEng);
return;
}
demandeur = $("#demandeur").val();
codeLienDemandeur = $("#codeLienDemandeur").val();
beneficiaireReglement = $("#beneficiaireReglement").val();
codeLienBeneficiaire = $("#codeLienBeneficiaire").val();
observations = $("#observations").val();
codeModePaiementDemande = $("#codeModePaiementDemande").val();
codeBanqueBeneficiaire = $("#codeBanqueBeneficiaire").val();
numeroCompteBeneficiaire = $("#numeroCompteBeneficiaire").val();
if (demandeur<=" ")
{
v_msg="Veuillez saisir le nom du demandeur!";
v_msgEng="Please enter the name of the payment requestor";
alert_ebene(v_msg, v_msgEng);
$("#demandeur").focus();
return;
}
if (codeLienDemandeur<=" ")
{
v_msg="Veuillez sélectionner le lien de parenté avec le demandeur!";
v_msgEng="Please select the relationship with the requestor!";
alert_ebene(v_msg, v_msgEng);
$("#codeLienDemandeur").focus();
return;
}
prestataireConsultation = $("#prestataireConsultation").val();
if (prestataireConsultation<=" ")
{
v_msg="Veuillez indiquer le prestataire qui a consulté!";
v_msgEng="Please indicate the provider who consulted!";
alert_ebene(v_msg, v_msgEng);
$("#prestataireConsultation").focus();
return;
}
dateConsultation=$("#dateConsultation").val();
if (dateConsultation<=" ")
{
v_msg="Veuillez saisir la date de la facture!";
v_msgEng="Please enter the date of the invoice!";
alert_ebene(v_msg, v_msgEng);
$("#dateConsultation").focus();
return;
}
codeRaisonConsultation = $("#codeRaisonConsultation").val();
if (codeRaisonConsultation<=" ")
{
v_msg="Veuillez sélectionner une raison pour la consultation!";
v_msgEng="Please select a reason for the consultation!";
alert_ebene(v_msg, v_msgEng);
$("#codeRaisonConsultation").focus();
return;
}
hospitalisation = $("#hospitalisation").val();
if (hospitalisation<=" ")
{
v_msg="Veuillez indiquer si hospitalisation ou pas!";
v_msgEng="Please indicate whether hospitalization or not!";
alert_ebene(v_msg, v_msgEng);
$("#hospitalisation").focus();
return;
}
if (beneficiaireReglement<=" ")
{
v_msg="Veuillez saisir le nom du bénéficiaire du règlement!";
v_msgEng="Please enter the name of the payee!";
alert_ebene(v_msg, v_msgEng);
$("#beneficiaireReglement").focus();
return;
}
if (codeLienBeneficiaire<=" ")
{
v_msg="Veuillez sélectionner le lien avec le bénéficiaire du règlement!";
v_msgEng="Please select the relationship with the payee!";
alert_ebene(v_msg, v_msgEng);
$("#codeLienBeneficiaire").focus();
return;
}
if (codeModePaiementDemande<=" ")
{
v_msg="Veuillez sélectionner le mode de paiement!";
v_msgEng="Please select the payment method!";
alert_ebene(v_msg, v_msgEng);
$("#codeModePaiementDemande").focus();
return;
}
if (codeModePaiementDemande=="VR")
{
if (codeBanqueBeneficiaire<=" ")
{
v_msg="Veuillez sélectionner la banque du bénéficiaire!";
v_msgEng="Please select the beneficiary\'s bank!";
alert_ebene(v_msg, v_msgEng);
$("#codeBanqueBeneficiaire").focus();
return;
}
if (numeroCompteBeneficiaire<=" ")
{
v_msg="Veuillez saisir le No de compte du bénéficiaire!";
v_msgEng="Please enter the beneficiary\'s account number";
alert_ebene(v_msg, v_msgEng);
$("#numeroCompteBeneficiaire").focus();
return;
}
}
dateEffetPolice = $("#dateEffetPolice_C").val();
dateEcheancePolice = $("#dateEcheancePolice_C").val();
// var td0 = new Date(dateEffetPolice);
dateEntreeBeneficiaire= $("#dateEntreeBeneficiaire_C").val();
var td0 = new Date(dateEntreeBeneficiaire);
var td1 = $("#dateConsultation").datepicker("getDate");
var td2 = $("#datejourfr_C").datepicker("getDate");
var td3 = new Date(dateEcheancePolice);
dt0=Math.round(Date.parse(td0)/(1000*3600*24));
dt1=Math.round(Date.parse(td1)/(1000*3600*24));
dt2=Math.round(Date.parse(td2)/(1000*3600*24));
dt3=Math.round(Date.parse(td3)/(1000*3600*24));
if (dt1>dt2)
{
v_msg="Veuillez revoir la date de consultation!";
v_msgEng="Please review the date!";
alert_ebene(v_msg, v_msgEng);
$("#dateConsultation").focus();
return;
}
if (dt1>dt3 || dt1<dt0)
// if (dt1>dt3)
{
v_msg="Attention! cette police n'est pas couverte à cette date!";
v_msgEng="Warning! This insurance policy is not valid on this date!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous ce dossier hors tiers payant?";
v_msgEng="Do you confirm this claim?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'demandeur='+demandeur+'&codeLienDemandeur='+codeLienDemandeur;
donnees += '&beneficiaireReglement='+beneficiaireReglement+'&codeLienBeneficiaire='+codeLienBeneficiaire;
donnees += '&codeModePaiementDemande='+codeModePaiementDemande;
donnees += '&codeBanqueBeneficiaire='+codeBanqueBeneficiaire+'&numeroCompteBeneficiaire='+numeroCompteBeneficiaire;
donnees += '&prestataireConsultation=' +prestataireConsultation;
donnees += '&dateConsultation=' +dateConsultation;
donnees += '&codeRaisonConsultation=' +codeRaisonConsultation;
donnees += '&hospitalisation=' +hospitalisation;
donnees += '&observations=' +observations;
$.ajax({
url: $("#racineWeb").val()+"Ajaxdossierclassique/enregistrerdossierclassique/",
type : 'post',
data: donnees,
success: function(data) {
v_msg="Opération effectuée avec succès!";
v_msgEng="Operation successfully completed";
alert_ebene(v_msg, v_msgEng);
},
complete: function() {
afficher_dossier_classique();
}
});
}
}
function lister_dossiers_classiques()
{
d1=$("#d1").val();
d2=$("#d2").val();
donnees = 'd1='+d1+'&d2='+d2;
$("#div_dossiers").html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaxfacturesclassiques/",
type : 'post',
data: donnees,
success: function(data) {
$("#div_dossiers").html(data);
},
complete: function() {
}
});
}
function afficher_dossier_classique()
{
window.location.assign($("#racineWeb" ).val()+"Dossierclassique/");
}
function consulter_dossier_classique(idDossierClassique)
{
donnees = 'idDossierClassique='+idDossierClassique;
$.ajax({
url: $("#racineWeb").val()+"Ajaxdossierclassique/getcontextbyid/",
type : 'post',
data: donnees,
complete: function() {
afficher_dossier_classique();
}
});
}
function payerdossierclassique()
{
regle=$("#regle").val();
if (regle==1)
{
v_msg="Déjà payé!";
v_msgEng="Already paid!";
alert_ebene(v_msg, v_msgEng);
return;
}
fraisRetenu=$("#fraisRetenu").val();
if (fraisRetenu<=0)
{
v_msg="Rien à payer!";
v_msgEng="Nothing to pay!";
alert_ebene(v_msg, v_msgEng);
return;
}
demandeReglement=$("#demandeReglement").val();
demandeReglement = parseInt(demandeReglement);
if (demandeReglement==0)
{
v_msg="Aucune Demande de Règlement!";
v_msgEng="No request in progress!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Payerdossierclassique/");
}
function modifierdossierclassique()
{
regle=$("#regle").val();
if (regle==1)
{
v_msg="Déjà payé!";
v_msgEng="Already paid!";
alert_ebene(v_msg, v_msgEng);
return;
}
demandeReglement=$("#demandeReglement").val();
demandeReglement = parseInt(demandeReglement);
if (demandeReglement==1)
{
v_msg="Demande de règlement déjà effectuée!";
v_msgEng="Request for payment already made!";
alert_ebene(v_msg, v_msgEng);
return;
}
window.location.assign($("#racineWeb" ).val()+"Modifierdossierclassique/");
}
function imprimer_releve_dc()
{
fraisRetenu=$("#fraisRetenu").val();
if (fraisRetenu<=0)
{
v_msg="Rien à imprimer!";
v_msgEng="Nothing to print!";
alert_ebene(v_msg, v_msgEng);
return;
}
var div_export_demande_reglement = $('#div_export_demande_reglement');
div_export_demande_reglement.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerdemandereglementdc/imprimerreleve/",
type: 'POST',
success: function(data)
{
div_export_demande_reglement.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function imprimer_demande_reglement_dc()
{
regle=$("#regle").val();
if (regle==1)
{
v_msg="Déjà payé!";
v_msgEng="Already paid!";
alert_ebene(v_msg, v_msgEng);
return;
}
fraisRetenu=$("#fraisRetenu").val();
if (fraisRetenu<=0)
{
v_msg="Rien à imprimer!";
v_msgEng="Nothing to print!";
alert_ebene(v_msg, v_msgEng);
return;
}
var div_export_demande_reglement = $('#div_export_demande_reglement');
div_export_demande_reglement.html('<div style="padding-top:80px;"><img src="Bootstrap/images/loading.gif"/>&nbsp;&nbsp;<span style="font-size:15pt;">' + 'Veuillez patienter... / Please wait...' + '</span></div>');
$.ajax({
url: $("#racineWeb").val()+"Ajaximprimerdemandereglementdc/",
type: 'POST',
success: function(data)
{
div_export_demande_reglement.html(data);
},
error : function(resultat, statut, erreur)
{
},
complete: function(data)
{
}
});
}
function enregistrermodificationsdossierclassique()
{
enVigueur=$("#enVigueur_C").val();
codeEtatBeneficiaire=$("#codeEtatBeneficiaire_C").val();
etatbeneficiaire=$("#etatbeneficiaire_C").val();
if (enVigueur!="1")
{
v_msg="Attention! cette personne n'est pas en vigueur";
v_msgEng="Warning! This person is not in force";
alert_ebene(v_msg, v_msgEng);
return;
}
if (codeEtatBeneficiaire!="V")
{
v_msg="Attention! "+etatbeneficiaire;
v_msgEng="Warning! "+etatbeneficiaire;
alert_ebene(v_msg, v_msgEng);
return;
}
demandeur = $("#demandeur").val();
codeLienDemandeur = $("#codeLienDemandeur").val();
beneficiaireReglement = $("#beneficiaireReglement").val();
codeLienBeneficiaire = $("#codeLienBeneficiaire").val();
observations = $("#observations").val();
codeModePaiementDemande = $("#codeModePaiementDemande").val();
codeBanqueBeneficiaire = $("#codeBanqueBeneficiaire").val();
numeroCompteBeneficiaire = $("#numeroCompteBeneficiaire").val();
if (demandeur<=" ")
{
v_msg="Veuillez saisir le nom du demandeur!";
v_msgEng="Please enter the name of the payment requestor";
alert_ebene(v_msg, v_msgEng);
$("#demandeur").focus();
return;
}
if (codeLienDemandeur<=" ")
{
v_msg="Veuillez sélectionner le lien de parenté avec le demandeur!";
v_msgEng="Please select the relationship with the requestor!";
alert_ebene(v_msg, v_msgEng);
$("#codeLienDemandeur").focus();
return;
}
prestataireConsultation = $("#prestataireConsultation").val();
if (prestataireConsultation<=" ")
{
v_msg="Veuillez indiquer le prestataire qui a consulté!";
v_msgEng="Please indicate the provider who consulted!";
alert_ebene(v_msg, v_msgEng);
$("#prestataireConsultation").focus();
return;
}
dateConsultation=$("#dateConsultation").val();
if (dateConsultation<=" ")
{
v_msg="Veuillez saisir la date de la facture!";
v_msgEng="Please enter the date of the invoice!";
alert_ebene(v_msg, v_msgEng);
$("#dateConsultation").focus();
return;
}
codeRaisonConsultation = $("#codeRaisonConsultation").val();
if (codeRaisonConsultation<=" ")
{
v_msg="Veuillez sélectionner une raison pour la consultation!";
v_msgEng="Please select a reason for the consultation!";
alert_ebene(v_msg, v_msgEng);
$("#codeRaisonConsultation").focus();
return;
}
hospitalisation = $("#hospitalisation").val();
if (hospitalisation<=" ")
{
v_msg="Veuillez indiquer si hospitalisation ou pas!";
v_msgEng="Please indicate whether hospitalization or not!";
alert_ebene(v_msg, v_msgEng);
$("#hospitalisation").focus();
return;
}
if (beneficiaireReglement<=" ")
{
v_msg="Veuillez saisir le nom du bénéficiaire du règlement!";
v_msgEng="Please enter the name of the payee!";
alert_ebene(v_msg, v_msgEng);
$("#beneficiaireReglement").focus();
return;
}
if (codeLienBeneficiaire<=" ")
{
v_msg="Veuillez sélectionner le lien avec le bénéficiaire du règlement!";
v_msgEng="Please select the relationship with the payee!";
alert_ebene(v_msg, v_msgEng);
$("#codeLienBeneficiaire").focus();
return;
}
if (codeModePaiementDemande<=" ")
{
v_msg="Veuillez sélectionner le mode de paiement!";
v_msgEng="Please select the payment method!";
alert_ebene(v_msg, v_msgEng);
$("#codeModePaiementDemande").focus();
return;
}
if (codeModePaiementDemande=="VR")
{
if (codeBanqueBeneficiaire<=" ")
{
v_msg="Veuillez sélectionner la banque du bénéficiaire!";
v_msgEng="Please select the beneficiary\'s bank!";
alert_ebene(v_msg, v_msgEng);
$("#codeBanqueBeneficiaire").focus();
return;
}
if (numeroCompteBeneficiaire<=" ")
{
v_msg="Veuillez saisir le No de compte du bénéficiaire!";
v_msgEng="Please enter the beneficiary\'s account number";
alert_ebene(v_msg, v_msgEng);
$("#numeroCompteBeneficiaire").focus();
return;
}
}
dateEffetPolice = $("#dateEffetPolice_C").val();
dateEcheancePolice = $("#dateEcheancePolice_C").val();
// var td0 = new Date(dateEffetPolice);
dateEntreeBeneficiaire= $("#dateEntreeBeneficiaire_C").val();
var td0 = new Date(dateEntreeBeneficiaire);
var td1 = $("#dateConsultation").datepicker("getDate");
var td2 = $("#datejourfr_C").datepicker("getDate");
var td3 = new Date(dateEcheancePolice);
dt0=Math.round(Date.parse(td0)/(1000*3600*24));
dt1=Math.round(Date.parse(td1)/(1000*3600*24));
dt2=Math.round(Date.parse(td2)/(1000*3600*24));
dt3=Math.round(Date.parse(td3)/(1000*3600*24));
if (dt1>dt2)
{
v_msg="Veuillez revoir la date de consultation!";
v_msgEng="Please review the date!";
alert_ebene(v_msg, v_msgEng);
$("#dateConsultation").focus();
return;
}
if (dt1>dt3 || dt1<dt0)
// if (dt1>dt3)
{
v_msg="Attention! cette police n'est pas couverte à cette date!";
v_msgEng="Warning! This insurance policy is not valid on this date!";
alert_ebene(v_msg, v_msgEng);
return;
}
v_msg="Confirmez-vous ces modificatons?";
v_msgEng="Do you confirm these changes?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'demandeur='+demandeur+'&codeLienDemandeur='+codeLienDemandeur;
donnees += '&beneficiaireReglement='+beneficiaireReglement+'&codeLienBeneficiaire='+codeLienBeneficiaire;
donnees += '&codeModePaiementDemande='+codeModePaiementDemande;
donnees += '&codeBanqueBeneficiaire='+codeBanqueBeneficiaire+'&numeroCompteBeneficiaire='+numeroCompteBeneficiaire;
donnees += '&prestataireConsultation=' +prestataireConsultation;
donnees += '&dateConsultation=' +dateConsultation;
donnees += '&codeRaisonConsultation=' +codeRaisonConsultation;
donnees += '&hospitalisation=' +hospitalisation;
donnees += '&observations=' +observations;
$.ajax({
url: $("#racineWeb").val()+"Ajaxdossierclassique/enregistrermodificationsdossierclassique/",
type : 'post',
data: donnees,
success: function(data) {
v_msg="Modifications effectuées avec succès!";
v_msgEng="Changes made successfully!";
alert_ebene(v_msg, v_msgEng);
},
complete: function() {
afficher_dossier_classique();
}
});
}
}
function enregistrerpaiementfraisfuneraire()
{
idFraisfuneraire = $("#idFraisfuneraire").val();
dateComptable = $("#dateComptable").val();
montantPaye = $("#montantPaye").val();
codeModePaiement = $("#codeModePaiement").val();
referencePaiement = $("#referencePaiement").val();
codeBanquePayeur = $("#codeBanquePayeur").val();
if (codeModePaiement<=" ")
{
v_msg="Veuillez sélectionner le mode de paiement!";
v_msgEng="Please select the payment method!";
alert_ebene(v_msg, v_msgEng);
$("#codeModePaiement").focus();
return;
}
if (codeBanquePayeur<=" ")
{
v_msg="Veuillez sélectionner la banque de paiement!";
v_msgEng="Please select the payment bank!";
alert_ebene(v_msg, v_msgEng);
$("#codeBanquePayeur").focus();
return;
}
if (referencePaiement<=" ")
{
v_msg="Veuillez indiquer la référence du paiement!";
v_msgEng="Please enter the payment reference!";
alert_ebene(v_msg, v_msgEng);
$("#referencePaiement").focus();
return;
}
if (dateComptable<=" ")
{
v_msg="Veuillez saisir la date comptable!";
v_msgEng="Please enter the posting date!";
alert_ebene(v_msg, v_msgEng);
$("#dateComptable").focus();
return;
}
if(montantPaye<=" ")
{
montantPaye = "0";
}
if(montantPaye==0)
{
v_msg="Veuillez revoir le montant!";
v_msgEng="Please review the amount!";
alert_ebene(v_msg, v_msgEng);
$("#montantPaye").focus();
return;
}
v_msg="Confirmez-vous ce paiement?";
v_msgEng="Do you confirm this payment?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idFraisfuneraire='+idFraisfuneraire+'&codeModePaiement='+codeModePaiement;
donnees += '&referencePaiement='+referencePaiement+'&montantPaye='+montantPaye;
donnees += '&dateComptable='+dateComptable;
donnees += '&codeBanquePayeur='+codeBanquePayeur;
$.ajax({
url: $("#racineWeb").val()+"Ajaxenregistrerdemandefraisfuneraire/enregistrerpaiementfraisfuneraire/",
type : 'post',
data: donnees,
success: function(data) {
v_msg="Opération effectuée avec succès!";
v_msgEng="Operation successfully completed";
alert_ebene(v_msg, v_msgEng);
},
complete: function() {
fraisfuneraire();
}
});
}
}
function enregistrer_paiement_dossier_classique()
{
idDossierClassique = $("#idDossierClassique").val();
dateComptable = $("#dateComptable").val();
montantPaye = $("#montantPaye").val();
codeModePaiement = $("#codeModePaiement").val();
referencePaiement = $("#referencePaiement").val();
codeBanquePayeur = $("#codeBanquePayeur").val();
if (codeModePaiement<=" ")
{
v_msg="Veuillez sélectionner le mode de paiement!";
v_msgEng="Please select the payment method!";
alert_ebene(v_msg, v_msgEng);
$("#codeModePaiement").focus();
return;
}
if (codeBanquePayeur<=" ")
{
v_msg="Veuillez sélectionner la banque de paiement!";
v_msgEng="Please select the payment bank!";
alert_ebene(v_msg, v_msgEng);
$("#codeBanquePayeur").focus();
return;
}
if (referencePaiement<=" ")
{
v_msg="Veuillez indiquer la référence du paiement!";
v_msgEng="Please enter the payment reference!";
alert_ebene(v_msg, v_msgEng);
$("#referencePaiement").focus();
return;
}
if (dateComptable<=" ")
{
v_msg="Veuillez saisir la date comptable!";
v_msgEng="Please enter the posting date!";
alert_ebene(v_msg, v_msgEng);
$("#dateComptable").focus();
return;
}
if(montantPaye<=" ")
{
montantPaye = "0";
}
if(montantPaye==0)
{
v_msg="Veuillez revoir le montant!";
v_msgEng="Please review the amount!";
alert_ebene(v_msg, v_msgEng);
$("#montantPaye").focus();
return;
}
v_msg="Confirmez-vous ce paiement?";
v_msgEng="Do you confirm this payment?";
if(confirm_ebene(v_msg, v_msgEng))
{
donnees = 'idDossierClassique='+idDossierClassique+'&codeModePaiement='+codeModePaiement;
donnees += '&referencePaiement='+referencePaiement+'&montantPaye='+montantPaye;
donnees += '&dateComptable='+dateComptable;
donnees += '&codeBanquePayeur='+codeBanquePayeur;
$.ajax({
url: $("#racineWeb").val()+"Ajaxdossierclassique/enregistrerpaiementdossierclassique/",
type : 'post',
data: donnees,
success: function(data) {
v_msg="Opération effectuée avec succès!";
v_msgEng="Operation successfully completed";
alert_ebene(v_msg, v_msgEng);
},
complete: function() {
afficher_dossier_classique();
}
});
}
}
function rechercher_dossier_classique(numeroDecompte, idBeneficiaire)
{
donnees = "numeroDecompte="+numeroDecompte+"&idBeneficiaire="+idBeneficiaire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxdossierclassique/getcontextbyidreglement/",
type : 'post',
data: donnees,
success: function(data) {
},
complete: function() {
afficher_dossier_classique();
}
});
}
function rechercher_frais_funeraire(idReglement, idBeneficiaire)
{
donnees = "idReglement="+idReglement+"&idBeneficiaire="+idBeneficiaire;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontextfraisfuneraire/",
type : 'post',
data: donnees,
success: function(data) {
},
comple