a
This commit is contained in:
parent
d5f31a760a
commit
c1282a0e7e
|
|
@ -19,7 +19,8 @@ class ControleurAjaxavenantincorporation extends Controleurrequete
|
|||
$idAvenant = $this->requete->getParametreFormulaire("idAvenant");
|
||||
|
||||
$entetecp = $this->avenant->getUnAvenant($idAvenant);
|
||||
$listeassures = $this->avenant->getListeassuresAvenant($idAvenant);
|
||||
// $listeassures = $this->avenant->getListeassuresAvenant($idAvenant);
|
||||
$listeadherents = $this->avenant->getListeAdherentsAvenant($idAvenant);
|
||||
|
||||
$pdf = new FPDF();
|
||||
$pdf->AliasNbPages();
|
||||
|
|
@ -61,6 +62,15 @@ We are pleased to confirm that they have been incorporated into the current poli
|
|||
$pdf->SetFont('Arial','BU', 15);
|
||||
$pdf->Cell(50,$ht,convertirc("1. Insured Members and Premium"),0,1,'L',false);
|
||||
|
||||
foreach ($listeadherents as $adherent)
|
||||
{
|
||||
$idAdherent = $adherent['idAdherent'];
|
||||
$idEntetecontrat = $adherent['idEntetecontrat'];
|
||||
|
||||
$pdf->Cell(50,$ht,convertirc("Family : ".$adherent['nomAdherent']),0,1,'L',false);
|
||||
|
||||
$listeassures = $this->avenant->getListeAssuresAvenantAdherent($idAvenant, $idAdherent);
|
||||
|
||||
$pdf->SetFont('Arial','B', 8);
|
||||
|
||||
$pdf->Cell(20,$ht,convertirc('S / N'),1,0,'C',false);
|
||||
|
|
@ -77,17 +87,6 @@ We are pleased to confirm that they have been incorporated into the current poli
|
|||
$pdf->SetFont('Arial','', 8);
|
||||
foreach ($listeassures as $assure)
|
||||
{
|
||||
/*
|
||||
20
|
||||
45
|
||||
45
|
||||
10
|
||||
20
|
||||
15
|
||||
15
|
||||
20
|
||||
190
|
||||
*/
|
||||
$pdf->Cell(20,$ht,convertirc($assure['numeroBeneficiaire']),1,0,'C',false);
|
||||
$pdf->Cell(45,$ht,convertirc($assure['nomBeneficiaire']),1,0,'C',false);
|
||||
$pdf->Cell(45,$ht,convertirc($assure['prenomsBeneficiaire']),1,0,'C',false);
|
||||
|
|
@ -100,6 +99,24 @@ We are pleased to confirm that they have been incorporated into the current poli
|
|||
$pdf->Cell(20,$ht,format_N($assure['primeTtc']),1,1,'C',false);
|
||||
}
|
||||
|
||||
$pdf->SetFont('Arial','BU', 15);
|
||||
$pdf->Cell(50,$ht,convertirc("LISTE DES GARANTIES"),0,1,'L',false);
|
||||
|
||||
$garanties = $this->avenant->getListeGarantieAvenantAdherent($idAdherent, $idEntetecontrat);
|
||||
|
||||
$pdf->SetFont('Arial','B', 8);
|
||||
|
||||
$pdf->Cell(100,$ht,convertirc('BENEFITS'),1,0,'C',false);
|
||||
$pdf->Cell(90,$ht,convertirc('LIMITS'),1,1,'C',false);
|
||||
|
||||
$pdf->SetFont('Arial','', 8);
|
||||
foreach ($garanties as $garantie)
|
||||
{
|
||||
$pdf->Cell(20,$ht,convertirc($garantie['garantieEng']),1,0,'C',false);
|
||||
$pdf->Cell(20,$ht,format_N($garantie['plafond']),1,1,'C',false);
|
||||
}
|
||||
}
|
||||
|
||||
$pdf->Ln(5);
|
||||
|
||||
$pdf->SetFont('Arial','BI', 10);
|
||||
|
|
|
|||
|
|
@ -100,4 +100,30 @@ class Avenant extends Modele {
|
|||
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getListeAdherentsAvenant($idAvenant)
|
||||
{
|
||||
$sql = 'call sp_get_liste_adherents_avenant(?);';
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($idAvenant));
|
||||
|
||||
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getListeAssuresAvenantAdherent($idAvenant, $idAdherent)
|
||||
{
|
||||
$sql = 'call sp_get_liste_assures_avenant_adherent(?, ?);';
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($idAvenant, $idAdherent));
|
||||
|
||||
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getListeGarantieAvenantAdherent($idAdherent, $idEntetecontrat)
|
||||
{
|
||||
$sql = 'call sp_garanties_adherent_avenant(?, ?);';
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($idAdherent, $idEntetecontrat));
|
||||
|
||||
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user