This commit is contained in:
2026-01-02 11:50:57 +00:00
parent 4819206442
commit 3115ef3f7b
12 changed files with 278 additions and 2 deletions

View File

@@ -1185,4 +1185,119 @@ function changer_avenant_incorporation()
prorater_prime_adherent();
}
});
}
}
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;
}
function controler_piece_beneficiaire()
{
v_codeNaturePiece = $("#codeNaturePiece").val();
if(v_codeNaturePiece<=' ')
{
v_msg="Veuillez sélection la nature de la pièce!";
v_msgEng="Please select the type of document!";
alert_ebene(v_msg, v_msgEng);
$("#codeNaturePiece").focus();
return;
}
$('#numeroPiece').removeAttr('minlength');
if(v_codeNaturePiece=="CNI")
{
$('#div_controle_piece').html("");
v_numeroPiece = $("#numeroPiece").val();
$('#numeroPiece').attr('minlength', 13);
donnees = "numeroPiece="+v_numeroPiece;
$.ajax({
url: $("#racineWeb").val()+"Ajaxcontrolepiece/",
type: 'POST',
data: donnees,
success: function(data) {
$('#div_controle_piece').html(data);
var resultatPiece = $("#resultatPiece").val();
if(resultatPiece!="0")
{
$("#numeroPiece").focus();
return;
}
},
error: function(data) {
},
complete: function()
{
}
});
}
}
function ajaxListerVille()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxville/",
type : 'post',
data: "codePays="+$("#codePays").val(),
error: function(errorData) {
},
success: function(data) {
$("#listeville").html(data);
},
complete: function() {
}
});
}
function ajaxListerLocalite()
{
$.ajax({
url: $("#racineWeb").val()+"Ajaxlocalite/",
type : 'post',
data: "codePays="+$("#codePays").val()+"&codeVille="+$("#codeVille").val(),
error: function(errorData) {
},
success: function(data) {
$("#listelocalite").html(data);
}
});
}