This commit is contained in:
KANE LAZENI 2026-01-04 06:48:46 +00:00
parent 9f1cad2494
commit 7f006e3409
3 changed files with 22 additions and 7 deletions

View File

@ -1717,8 +1717,7 @@ function creer_beneficiaires()
// etatadh=$("#codeEtatAdherent_C").val();
etatadh=$("#codeEtatAdherent").val();
alert("etatadh = "+etatadh);
if (etatadh != "V" && etatadh != "W")
if (etatadh != "V" && etatadh != "W")
{
v_msg="Attention! cette famille n\'est pas en vigueur!";
v_msgEng="Warning! this family is not in force!";
@ -1729,3 +1728,12 @@ function creer_beneficiaires()
window.location.assign($("#racineWeb" ).val()+"Creerbeneficiaire/");
}
function afficher_adherent_id()
{
idAdherent = $("#idAdherent_C" ).val();
if (idAdherent>"0")
{
window.location.assign($("#racineWeb" ).val()+"Ficheadherent/"+$("#idAdherent_C" ).val()+"/");
}
}

View File

@ -523,9 +523,10 @@ class Beneficiaire extends Modele {
public function getBeneficiairesId($id)
{
$sql = 'call sp_get_beneficiaires_adherent(?, ?);';
// $sql = 'call sp_get_beneficiaires_adherent(?, ?);';
$sql = 'call sp_get_beneficiaires_adherent_client(?, ?);';
$beneficiaires = $this->executerRequete($sql, array($_SESSION['codeSociete'], $id));
$beneficiaires = $this->executerRequete($sql, array($_SESSION['idClient_C'], $id));
return $beneficiaires->fetchAll(PDO::FETCH_ASSOC);
}
@ -671,13 +672,18 @@ class Beneficiaire extends Modele {
}
public function getTotalBeneficiairesId($idAdherent) {
/*
$sql = 'select IFNULL(sum(primeNette),"0") as primeNette, IFNULL(sum(commission),"0") as commission,
IFNULL(sum(primeHt),"0") as primeHt, IFNULL(sum(taxe),"0") as taxe, IFNULL(sum(primeBase),"0") as primeBase,
IFNULL(sum(fraisCarte),"0") as fraisCarte, IFNULL(sum(primeTtc),"0") as primeTtc
FROM beneficiaire A WHERE (idAdherent=?) and (A.supprime!="1")';
$resultat = $this->executerRequete($sql, array($idAdherent));
// return $resultat->fetch(PDO::FETCH_ASSOC);
*/
$sql = 'call sp_get_total_beneficiaires_adherent_client(?, ?);';
$beneficiaires = $this->executerRequete($sql, array($_SESSION['idClient_C'], $idAdherent));
return $resultat->fetch(PDO::FETCH_ASSOC);
}

View File

@ -71,7 +71,8 @@
</thead>
<tbody>
<?php foreach ($adherents as $adherent):
$idAdh = $adherent['id'];
$idAdh = $adherent['id'];
$idAdherent = $adherent['id'];
$noAdh = $this->nettoyer($adherent['numeroAdherent']);
$libelleColl = $this->nettoyer($adherent['libelleCollege']);
$estsupprimable = ($this->nettoyer($adherent['primeArchive']) == "0");
@ -97,7 +98,7 @@
</div>
</td>
<td class="text-center">
<button class="btn btn-sm btn-white border shadow-sm" onclick="afficher_adherent_id_plus(<?= $idAdh ?>);">
<button class="btn btn-sm btn-white border shadow-sm" onClick="javascript:selectionner_adherent(<?= $idAdherent ?>,'<?= $noAdh ?>'); afficher_adherent_id();">
<i class="fas fa-user-edit text-primary"></i>
</button>
</td>