Va
This commit is contained in:
parent
4819206442
commit
3115ef3f7b
61
Controleur/ControleurAjaxcontrolepiece.php
Normal file
61
Controleur/ControleurAjaxcontrolepiece.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Beneficiaire.php';
|
||||
|
||||
class ControleurAjaxcontrolepiece extends Controleur {
|
||||
private $ben;
|
||||
|
||||
public function __construct() {
|
||||
$this->ben = new Beneficiaire();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$numeroPiece = $this->requete->getParametreFormulaire("numeroPiece");
|
||||
|
||||
$controle_piece = $this->ben->controlenopieceglobal($numeroPiece);
|
||||
|
||||
$resultatPiece = $controle_piece['resultatPiece'];
|
||||
$nomBeneficiaire = $controle_piece['nomBeneficiaire'];
|
||||
|
||||
/*
|
||||
var_dump
|
||||
(
|
||||
array
|
||||
(
|
||||
"numeroPiece" => $numeroPiece,
|
||||
"controle_piece" => $controle_piece,
|
||||
// "resultatPiece" => $resultatPiece,
|
||||
)
|
||||
);
|
||||
exit();
|
||||
|
||||
/*
|
||||
- Longueur < 13 => 1
|
||||
- Doublon => 2
|
||||
- OK, Bon => 0
|
||||
*/
|
||||
$MessagePiece = "";
|
||||
|
||||
// Un autre bénéficiaire possède déjà le même numéro d’identification : $nomBeneficiaire.
|
||||
|
||||
switch ($resultatPiece)
|
||||
{
|
||||
case "1":
|
||||
$MessagePiece = (est_anglophone()) ? "Length shorter than the standard!" : "Longueur inférieur à la norme!";
|
||||
break;
|
||||
case "2":
|
||||
$MessagePiece = (est_anglophone()) ? "Length shorter than the standard!" : "Un autre bénéficiaire possède déjà le même numéro d’identification : $nomBeneficiaire .";
|
||||
break;
|
||||
case "0":
|
||||
$MessagePiece = (est_anglophone()) ? "Numberr OK!" : "Numéro OK!";
|
||||
break;
|
||||
default:
|
||||
$MessagePiece = (est_anglophone()) ? "Numberr OK!" : "Numéro OK!";
|
||||
}
|
||||
|
||||
$this->genererVueAjax(array('resultatPiece' => $resultatPiece, 'MessagePiece' => $MessagePiece));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
43
Controleur/ControleurAjaxlocalite.php
Normal file
43
Controleur/ControleurAjaxlocalite.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Localite.php';
|
||||
|
||||
|
||||
class ControleurAjaxlocalite extends Controleur {
|
||||
|
||||
public function __construct() {
|
||||
}
|
||||
|
||||
public function index() {
|
||||
$codeSociete = $this->requete->getSession()->getAttribut('codeSociete');
|
||||
|
||||
$codePays = $this->requete->getParametreFormulaire("codePays");
|
||||
$codeVille = $this->requete->getParametreFormulaire("codeVille");
|
||||
|
||||
$listelocalite = (new Localite())->getListe($codePays, $codeVille);
|
||||
$this->genererVueAjax(array('listelocalite' => $listelocalite));
|
||||
}
|
||||
|
||||
public function consultation()
|
||||
{
|
||||
$codeSociete = $this->requete->getSession()->getAttribut('codeSociete');
|
||||
|
||||
$codePays = $this->requete->getParametreFormulaire("codePays");
|
||||
$codeVille = $this->requete->getParametreFormulaire("codeVille");
|
||||
|
||||
$listelocalite = (new Localite())->getListe($codePays, $codeVille);
|
||||
$this->genererVueAjax(array('listelocalite' => $listelocalite));
|
||||
}
|
||||
|
||||
public function filtreadherentlocalite()
|
||||
{
|
||||
$codeSociete = $this->requete->getSession()->getAttribut('codeSociete');
|
||||
|
||||
$codePays = $this->requete->getParametreFormulaire("codePays");
|
||||
$codeVille = $this->requete->getParametreFormulaire("codeVille");
|
||||
|
||||
$listelocalite = (new Localite())->getListe($codePays, $codeVille);
|
||||
$this->genererVueAjax(array('listelocalite' => $listelocalite));
|
||||
}
|
||||
|
||||
}
|
||||
27
Controleur/ControleurAjaxville.php
Normal file
27
Controleur/ControleurAjaxville.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Ville.php';
|
||||
|
||||
|
||||
class ControleurAjaxville extends Controleur {
|
||||
|
||||
public function __construct() {
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$codeSociete = $this->requete->getSession()->getAttribut('codeSociete');
|
||||
$codePays = $this->requete->getParametreFormulaire("codePays");
|
||||
$listeville = (new Ville())->getListe($codePays);
|
||||
$this->genererVueAjax(array('listeville' => $listeville));
|
||||
}
|
||||
|
||||
public function consultation()
|
||||
{
|
||||
$codeSociete = $this->requete->getSession()->getAttribut('codeSociete');
|
||||
$codePays = $this->requete->getParametreFormulaire("codePays");
|
||||
$listeville = (new Ville())->getListe($codePays);
|
||||
$this->genererVueAjax(array('listeville' => $listeville));
|
||||
}
|
||||
|
||||
}
|
||||
115
Js/fonctions.js
115
Js/fonctions.js
|
|
@ -1186,3 +1186,118 @@ function changer_avenant_incorporation()
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ class Avenant extends Modele {
|
|||
JOIN typeavenant B ON (B.codeTypeAvenant=A.codeTypeAvenant)
|
||||
JOIN police P ON (P.id=A.idPolice)
|
||||
WHERE (A.idPolice=?) AND (B.ajoutAliment="1")
|
||||
AND (A.codeTypeAvenant IN ("AFN","INC","RET"))
|
||||
AND (A.dateEffet>=P.dateEffet)
|
||||
ORDER BY A.numeroAvenant DESC;';
|
||||
}
|
||||
|
|
@ -73,6 +74,7 @@ class Avenant extends Modele {
|
|||
JOIN typeavenant B ON (B.codeTypeAvenant=A.codeTypeAvenant)
|
||||
JOIN police P ON (P.id=A.idPolice)
|
||||
WHERE (A.idPolice=?) AND (B.ajoutAliment="1")
|
||||
AND (A.codeTypeAvenant IN ("AFN","INC","RET"))
|
||||
AND (A.dateEffet>=P.dateEffet)
|
||||
ORDER BY A.numeroAvenant DESC;';
|
||||
}
|
||||
|
|
|
|||
13
Vue/Ajaxcontrolepiece/index.php
Normal file
13
Vue/Ajaxcontrolepiece/index.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<INPUT class="sr-only" TYPE="text" id="resultatPiece" name="resultatPiece" value="<?= $resultatPiece ?>">
|
||||
<INPUT class="sr-only" TYPE="text" id="MessagePiece" name="MessagePiece" value="<?= $MessagePiece ?>">
|
||||
<?php if($resultatPiece!="0"):?>
|
||||
<marquee behavior="scroll" direction="left" scrollamount="15" style="background-color:red;color:white; font-weight:bold; font-size:14pt">
|
||||
<?= $MessagePiece ?>
|
||||
</marquee>
|
||||
<?php else: ?>
|
||||
<marquee behavior="scroll" direction="left" scrollamount="15" style="background-color:green;color:white; font-weight:bold; font-size:14pt">
|
||||
<?= $MessagePiece ?>
|
||||
</marquee>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
3
Vue/Ajaxlocalite/consultation.php
Normal file
3
Vue/Ajaxlocalite/consultation.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<SELECT class="form-control" id="codeLocalite" NAME="codeLocalite" style='font-size:10pt;'>
|
||||
<?php liste_options_consultation($listelocalite,""); ?>
|
||||
</SELECT>
|
||||
3
Vue/Ajaxlocalite/filtreadherentlocalite.php
Normal file
3
Vue/Ajaxlocalite/filtreadherentlocalite.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<SELECT onChange="afficher_adherents_localite();" class="form-control" id="codeLocalite" NAME="codeLocalite" style='font-size:10pt;'>
|
||||
<?php liste_options_consultation($listelocalite,""); ?>
|
||||
</SELECT>
|
||||
3
Vue/Ajaxlocalite/index.php
Normal file
3
Vue/Ajaxlocalite/index.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<SELECT style='font-size:10pt;' class="form-control" id="codeLocalite" NAME="codeLocalite" required>
|
||||
<?php liste_options($listelocalite,""); ?>
|
||||
</SELECT>
|
||||
3
Vue/Ajaxville/consultation.php
Normal file
3
Vue/Ajaxville/consultation.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<SELECT onChange="ajaxListerLocaliteConsultation();" class="form-control" id="codeVille" NAME="codeVille" style='font-size:10pt;' >
|
||||
<?php liste_options_consultation($listeville,""); ?>
|
||||
</SELECT>
|
||||
3
Vue/Ajaxville/index.php
Normal file
3
Vue/Ajaxville/index.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<SELECT style='font-size:10pt;' onChange="ajaxListerLocalite();" class="form-control" id="codeVille" NAME="codeVille" required>
|
||||
<?php liste_options($listeville,""); ?>
|
||||
</SELECT>
|
||||
|
|
@ -595,7 +595,7 @@ $activeChildId = $menuData['child'];
|
|||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
<!-- Application Scripts -->
|
||||
<script src="/Js/fonctions.js?ver=2026.01.02.01"></script>
|
||||
<script src="/Js/fonctions.js?ver=2026.01.02.02"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
setInterval(function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user