a
This commit is contained in:
parent
d5f31a760a
commit
c1282a0e7e
|
|
@ -19,7 +19,8 @@ class ControleurAjaxavenantincorporation extends Controleurrequete
|
||||||
$idAvenant = $this->requete->getParametreFormulaire("idAvenant");
|
$idAvenant = $this->requete->getParametreFormulaire("idAvenant");
|
||||||
|
|
||||||
$entetecp = $this->avenant->getUnAvenant($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 = new FPDF();
|
||||||
$pdf->AliasNbPages();
|
$pdf->AliasNbPages();
|
||||||
|
|
@ -61,43 +62,59 @@ We are pleased to confirm that they have been incorporated into the current poli
|
||||||
$pdf->SetFont('Arial','BU', 15);
|
$pdf->SetFont('Arial','BU', 15);
|
||||||
$pdf->Cell(50,$ht,convertirc("1. Insured Members and Premium"),0,1,'L',false);
|
$pdf->Cell(50,$ht,convertirc("1. Insured Members and Premium"),0,1,'L',false);
|
||||||
|
|
||||||
$pdf->SetFont('Arial','B', 8);
|
foreach ($listeadherents as $adherent)
|
||||||
|
|
||||||
$pdf->Cell(20,$ht,convertirc('S / N'),1,0,'C',false);
|
|
||||||
$pdf->Cell(45,$ht,convertirc('Surname'),1,0,'C',false);
|
|
||||||
$pdf->Cell(45,$ht,convertirc('Other name'),1,0,'C',false);
|
|
||||||
$pdf->Cell(10,$ht,convertirc('Relat'),1,0,'C',false);
|
|
||||||
$pdf->Cell(20,$ht,convertirc('Net Premium'),1,0,'C',false);
|
|
||||||
|
|
||||||
$pdf->Cell(15,$ht,convertirc('Mutualm F'),1,0,'C',false);
|
|
||||||
$pdf->Cell(15,$ht,convertirc('Access'),1,0,'C',false);
|
|
||||||
|
|
||||||
$pdf->Cell(20,$ht,convertirc('Total Premium'),1,1,'C',false);
|
|
||||||
|
|
||||||
$pdf->SetFont('Arial','', 8);
|
|
||||||
foreach ($listeassures as $assure)
|
|
||||||
{
|
{
|
||||||
/*
|
$idAdherent = $adherent['idAdherent'];
|
||||||
20
|
$idEntetecontrat = $adherent['idEntetecontrat'];
|
||||||
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);
|
|
||||||
$pdf->Cell(10,$ht,convertirc($assure['codeLienParente']),1,0,'C',false);
|
|
||||||
$pdf->Cell(20,$ht,format_N($assure['primeNette']),1,0,'C',false);
|
|
||||||
|
|
||||||
$pdf->Cell(15,$ht,format_N($assure['taxe']),1,0,'C',false);
|
$pdf->Cell(50,$ht,convertirc("Family : ".$adherent['nomAdherent']),0,1,'L',false);
|
||||||
$pdf->Cell(15,$ht,format_N($assure['fraisCarte']),1,0,'C',false);
|
|
||||||
|
|
||||||
$pdf->Cell(20,$ht,format_N($assure['primeTtc']),1,1,'C',false);
|
$listeassures = $this->avenant->getListeAssuresAvenantAdherent($idAvenant, $idAdherent);
|
||||||
|
|
||||||
|
$pdf->SetFont('Arial','B', 8);
|
||||||
|
|
||||||
|
$pdf->Cell(20,$ht,convertirc('S / N'),1,0,'C',false);
|
||||||
|
$pdf->Cell(45,$ht,convertirc('Surname'),1,0,'C',false);
|
||||||
|
$pdf->Cell(45,$ht,convertirc('Other name'),1,0,'C',false);
|
||||||
|
$pdf->Cell(10,$ht,convertirc('Relat'),1,0,'C',false);
|
||||||
|
$pdf->Cell(20,$ht,convertirc('Net Premium'),1,0,'C',false);
|
||||||
|
|
||||||
|
$pdf->Cell(15,$ht,convertirc('Mutualm F'),1,0,'C',false);
|
||||||
|
$pdf->Cell(15,$ht,convertirc('Access'),1,0,'C',false);
|
||||||
|
|
||||||
|
$pdf->Cell(20,$ht,convertirc('Total Premium'),1,1,'C',false);
|
||||||
|
|
||||||
|
$pdf->SetFont('Arial','', 8);
|
||||||
|
foreach ($listeassures as $assure)
|
||||||
|
{
|
||||||
|
$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);
|
||||||
|
$pdf->Cell(10,$ht,convertirc($assure['codeLienParente']),1,0,'C',false);
|
||||||
|
$pdf->Cell(20,$ht,format_N($assure['primeNette']),1,0,'C',false);
|
||||||
|
|
||||||
|
$pdf->Cell(15,$ht,format_N($assure['taxe']),1,0,'C',false);
|
||||||
|
$pdf->Cell(15,$ht,format_N($assure['fraisCarte']),1,0,'C',false);
|
||||||
|
|
||||||
|
$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->Ln(5);
|
||||||
|
|
|
||||||
|
|
@ -100,4 +100,30 @@ class Avenant extends Modele {
|
||||||
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
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