309 lines
13 KiB
PHP
Executable File
309 lines
13 KiB
PHP
Executable File
<?php
|
|
|
|
$idPolice = $_SESSION['idPolice_C'];
|
|
|
|
require_once $_SESSION['dossierSociete'].'/Tarifs/Modele/Police_sodciete.php';
|
|
|
|
|
|
$this->police_societe = new Police_sodciete();
|
|
|
|
$idAvenant = $this->requete->getParametreFormulaire("idAvenant");
|
|
$numeroAvenant_cp=0;
|
|
$numeroAvenant = $_SESSION['numeroAvenant_cp'] ;
|
|
$p_emission = $numeroAvenant['numeroAvenant'];
|
|
|
|
$entetecp = $this->police_societe->getEnteteCP($idPolice,$p_emission);
|
|
//highlight_string("<?php\n\$datas =\n" . var_export($numeroAvenant, true) . ";\n>");
|
|
|
|
$collegecps = $this->police_societe->getCollegesCpLienParente($idPolice);
|
|
//$collegecp2s = $this->police_societe->getCollegesCpLienParente($idPolice);
|
|
$garantiescollegecps = $this->police_societe->getGarantiesCollegesCpLienParente($idPolice);
|
|
$tableaupretationcps = $this->police_societe->gettableauPrestationsCpLienParente($idPolice);
|
|
$conditionsparticuliers = $this->police_societe->getconditionsparticuliers($idPolice);
|
|
$codeGarant = $this->police_societe->getcodeGarant($idPolice);
|
|
|
|
$codeGcAssureur = $codeGarant['codeGcAssureur'];
|
|
$infosDuGarant = $this->police_societe->getInfosGarant($codeGcAssureur);
|
|
|
|
$pdf = new FPDF_Protection();
|
|
$pdf->SetAuthor('EBENE SOLUTIONS INFORMATIQUES');
|
|
$userPassword = '';
|
|
$ownerPassword = null;
|
|
$pdf->SetProtection(['print'], $userPassword, $ownerPassword);
|
|
|
|
$pdf->AliasNbPages();
|
|
$pdf->AddPage();
|
|
|
|
$ht=10;
|
|
$htext=6;
|
|
// Logo
|
|
//$pdf->Image($_SESSION['lienLogo'],10,6,30);
|
|
if ($infosDuGarant['typeGarant']=="1"){
|
|
if (file_exists($_SESSION['dossierSociete'].'/Tarifs/Img/garants/logo_'.strtolower($codeGcAssureur).'.png')){
|
|
$pdf->Image($_SESSION['dossierSociete'].'/Tarifs/Img/garants/logo_'.strtolower($codeGcAssureur).'.png',10,5,30);
|
|
}else{
|
|
$pdf->Image($_SESSION['lienLogo'],10,6,30);
|
|
}
|
|
}else{
|
|
$pdf->Image($_SESSION['lienLogo'],10,6,30);
|
|
}
|
|
// Police Arial gras 15
|
|
$pdf->SetFont('Arial','B',12);
|
|
|
|
|
|
|
|
// Décalage à droite
|
|
$pdf->Cell(30);
|
|
|
|
$pdf->SetFont('Arial','B',11);
|
|
|
|
$pdf->SetFillColor(153,255,153); // bleu
|
|
// Titre
|
|
$text = convertirc("SUITE DES CONDITIONS PARTICULIERES DE L'AVENANT N° ".$numeroAvenant['numeroAvenant']);
|
|
$text .= convertirc(" A LA POLICE N° ".$entetecp['numeroPoliceGarant']." SOUCRITE PAR LA SOCIETE ".$entetecp['libellePolice']);
|
|
$text .= convertirc("AUPRES DE ".$entetecp['garant']);
|
|
$pdf->MultiCell(150,5, $text,1,'C',true);
|
|
|
|
/*$pdf->Cell(30,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(0,5,convertirc(""),'LTR',1,'C',true);
|
|
$pdf->Cell(30,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(0,5,convertirc("SUITE DES CONDITIONS PARTICULIERES DE L'AVENANT N°".$numeroAvenant['numeroAvenant']),'LR',1,'C',true);
|
|
$pdf->Cell(30,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(0,5,convertirc("A LA POLICE N°".$entetecp['numeroPoliceGarant']." SOUCRITE PAR LA SOCIETE ".$entetecp['libellePolice']),'LR',1,'C',true);
|
|
$pdf->Cell(30,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(0,5,convertirc("AUPRES DE ".$entetecp['garant']),'LR',1,'C',true);
|
|
$pdf->Cell(30,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(0,5,convertirc(""),'LBR',1,'C',true);*/
|
|
|
|
$pdf->Ln(10);
|
|
|
|
$pdf->SetFont('Arial','BU',13);
|
|
|
|
$pdf->Cell(50,8,convertirc("OBJET DE L'AVENANT"),0,1,'L',false);
|
|
|
|
$pdf->SetFont('Arial','',11);
|
|
|
|
$pdf->Cell(50,8,convertirc("Le présent avenant a pour objet de régulariser les mouvements d'effectifs listés sur les états en annexe."),0,1,'L',false);
|
|
|
|
$pdf->SetFont('Arial','BUI',13);
|
|
|
|
$pdf->Cell(50,8,convertirc("PRIME NETTE ANNUELLE"),0,1,'L',false);
|
|
$pdf->Ln(5);
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(10,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(65,5,convertirc("Colleges"),'LTR',0,'C',false);
|
|
$pdf->Cell(30,5,convertirc("Nombre de"),'LTR',0,'C',false);
|
|
$pdf->Cell(40,5,convertirc("Prime nette annuelle"),'LTR',0,'C',false);
|
|
$pdf->Cell(35,5,convertirc("TOTAL"),'LTR',1,'C',false);
|
|
$pdf->Cell(10,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(65,5,convertirc(""),'LBR',0,'C',false);
|
|
$pdf->Cell(30,5,convertirc("famille(s)"),'LBR',0,'C',false);
|
|
$pdf->Cell(40,5,convertirc("par famille"),'LBR',0,'C',false);
|
|
$pdf->Cell(35,5,convertirc(""),'LBR',1,'C',false);
|
|
foreach($conditionsparticuliers as $conditionsparticulier){
|
|
|
|
$pdf->Cell(10,5,convertirc(""),0,0,'C',false);
|
|
$pdf->SetFont('Arial','', 8);
|
|
$pdf->Cell(65,5,convertirc(substr($conditionsparticulier['libelleCollege'] ,0,40)),'LBR',0,'C',false);
|
|
$pdf->SetFont('Arial','', 8);
|
|
$pdf->Cell(30,5,convertirc(format_N($conditionsparticulier['nbPersonneCol'])),'LBR',0,'C',false);
|
|
$pdf->Cell(40,5,convertirc(format_N($conditionsparticulier['primeHt'])),'LBR',0,'C',false);
|
|
$pdf->Cell(35,5,convertirc(format_N($conditionsparticulier['primeHtTCol'])),'LBR',1,'C',false);
|
|
|
|
}
|
|
$pdf->Cell(10,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(125,5,convertirc("Total Prime nette Annuelle"),'LBR',0,'C',false);
|
|
$pdf->Cell(45,5,convertirc(format_N($conditionsparticulier['@primeTotaleHT'])),'LBR',1,'C',false);
|
|
// Saut de ligne
|
|
$pdf->Ln(10);
|
|
$pdf->SetFont('Arial','BUI',13);
|
|
|
|
$pdf->Cell(0,8,convertirc("PRIME A REGLER A LA SIGNATURE DE L'AVENANT"),0,1,'L',false);
|
|
$pdf->SetFont('Arial','',11);
|
|
$pdf->Cell(10,2,convertirc(""),0,0,'L',false);
|
|
$pdf->Cell(50,8,convertirc("La prime est payable au comptant une seule fois."),0,1,'L',false);
|
|
$pdf->Cell(10,2,convertirc(""),0,0,'L',false);
|
|
$pdf->Cell(135,8,convertirc("Le souscripteur réglera à la signature du présent avenant la somme totale de "),0,0,'L',false);
|
|
$pdf->SetFont('Arial','BU',11);
|
|
$pdf->Cell(20,8,convertirc(format_N($conditionsparticulier['@primeTotaleHT'])." F CFA "),0,1,'L',false);
|
|
$pdf->SetFont('Arial','',11);
|
|
$pdf->Cell(10,2,convertirc(""),0,0,'L',false);
|
|
$pdf->Cell(50,8,convertirc("pour la période d'assurance du ".dateToFrench($entetecp['dateEffetPolice'],'j F Y')." au ".dateToFrench($entetecp['dateEcheancePolice'],'j F Y')." décomptée ci-dessous."),0,1,'L',false);
|
|
$pdf->Ln(5);
|
|
|
|
|
|
$pdf->Cell(10,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(125,5,convertirc("Prime nette d'incorporation du ".dateToFrench($entetecp['dateEffetPolice'],'j F Y')." au ".dateToFrench($entetecp['dateEcheancePolice'],'j F Y')),1,0,'C',false);
|
|
$pdf->Cell(45,5,convertirc(format_N($conditionsparticulier[''])),1,1,'C',false);
|
|
$pdf->Cell(10,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(125,5,convertirc("Prime nette de retrait du ".dateToFrench($entetecp['dateEffetPolice'],'j F Y')." au ".dateToFrench($entetecp['dateEcheancePolice'],'j F Y')),1,0,'C',false);
|
|
$pdf->Cell(45,5,convertirc(format_N($conditionsparticulier[''])),1,1,'C',false);
|
|
$pdf->Cell(10,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(125,5,convertirc("Prime nette à percevoir "),1,0,'C',false);
|
|
$pdf->Cell(45,5,convertirc(format_N($conditionsparticulier['@primeTotaleHT'])),1,1,'C',false);
|
|
$pdf->Cell(10,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(125,5,convertirc("Accessoires"),1,0,'C',false);
|
|
$pdf->Cell(45,5,convertirc(format_N($conditionsparticulier['@accessoireTSC'])),1,1,'C',false);
|
|
$pdf->Cell(10,5,convertirc(""),0,0,'C',false);
|
|
$pdf->Cell(125,5,convertirc("Taxes d'enregistrement"),1,0,'C',false);
|
|
$pdf->Cell(45,5,convertirc(format_N($conditionsparticulier['@taxe'])),1,1,'C',false);
|
|
$pdf->Cell(10,5,convertirc(""),0,0,'C',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(125,5,convertirc("PRIME TOTALE A PERCEVOIR"),1,0,'C',false);
|
|
$pdf->Cell(45,5,convertirc(format_N($conditionsparticulier['primeTotaleTTC'])),1,1,'C',false);
|
|
|
|
$pdf->Ln(5);
|
|
$pdf->SetFont('Arial','BI',10);
|
|
$pdf->Cell(0,5,convertirc("IL N'EST PAS AUTREMENT DEROGE AUX CLAUSES ET"),'LTR',1,'C',false);
|
|
$pdf->Cell(0,5,convertirc("CONDITIONS DE LA POLICE ETDESA VENANTS PRECEDENTS"),'LBR',1,'C',false);
|
|
|
|
$pdf->Ln(5);
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(10,5,convertirc(""),0,0,'L',false);
|
|
$pdf->Cell(45,5,convertirc("Etabli à".$_SESSION['villeSociete'].", le ".dateToFrench("now" ,'l j F Y') ),0,1,'L',false);
|
|
|
|
$pdf->Ln(5);
|
|
$pdf->SetFont('Arial','BU',10);
|
|
$pdf->Cell(100,5,convertirc("LE SOUSCRIPTEUR"),0,0,'C',false);
|
|
$pdf->Cell(90,5,convertirc("LA COMPAGNIE"),0,1,'C',false);
|
|
|
|
|
|
/*//////////
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35,$htext,convertirc("Code Compagnie"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(50,$htext,convertirc(": ".$entetecp['codeGcassureur']),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
if($entetecp['codeTypeContrat'] == "G")
|
|
{
|
|
$pdf->Cell(35);
|
|
$pdf->Cell(35,$htext,convertirc("Nature du risque"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(20,$htext,convertirc(": SANTE GROUPE"),0,0,'L',false);
|
|
}
|
|
else
|
|
{
|
|
$pdf->Cell(35);
|
|
$pdf->Cell(35,$htext,convertirc("Nature du risque"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(20,$htext,convertirc(": SANTE INDIVIDUELLE"),0,0,'L',false);
|
|
}
|
|
$pdf->Ln();
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35,$htext,convertirc("Compagnie"),0,0,'L',false);
|
|
|
|
|
|
if(strlen($entetecp['garant']) > "40"){
|
|
$pdf->SetFont('Arial','B',7);
|
|
$pdf->Cell(50,$ht,convertirc(": ".$entetecp['garant']),0,0,'L',false);
|
|
}
|
|
else{
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(50,$ht,convertirc(": ".$entetecp['garant']),0,0,'L',false);
|
|
}
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35);
|
|
$pdf->Cell(35,$htext,convertirc("Police"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(20,$htext,convertirc(": ".$entetecp['libellePolice']),0,0,'L',false);
|
|
$pdf->Ln();
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35,$htext,convertirc("Code Intermédiaire"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(50,$htext,convertirc(": ".$entetecp['codeApporteur']),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35);
|
|
$pdf->Cell(35,$htext,convertirc("N° Interne Police"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(20,$htext,convertirc(": ".$entetecp['numeroPolice']),0,0,'L',false);
|
|
$pdf->Ln();
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35,$htext,convertirc("Intermédiaire"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(50,$htext,convertirc(": ".$entetecp['apporteur']),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35);
|
|
$pdf->Cell(35,$htext,convertirc("Durée"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(20,$htext,convertirc(": ".$entetecp['dureePeriodicite']),0,0,'L',false);
|
|
$pdf->Ln();
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35,$htext,convertirc("N° Souscripteur"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(50,$htext,convertirc(": ".$entetecp['numeroClient']),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35);
|
|
$pdf->Cell(35,$htext,convertirc("Echéance annuelle"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(20,$htext,convertirc(": ".$entetecp['echeancean']),0,0,'L',false);
|
|
$pdf->Ln();
|
|
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35,$htext,convertirc("Souscripteur"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(50,$htext,convertirc(": ".$entetecp['nomClient']),0,0,'L',false);
|
|
$pdf->SetFont('Arial','',10);
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35);
|
|
$pdf->Cell(35,$htext,convertirc("Fractionnement prime"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(20,$htext,convertirc(": ".$entetecp['fractionnement']),0,0,'L',false);
|
|
$pdf->Ln();
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35,$htext,convertirc("Adresse postale"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(50,$htext,convertirc(": ".$entetecp['boitepostale']),0,0,'L',false);
|
|
$pdf->SetFont('Arial','',10);
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35);
|
|
$pdf->Cell(35,$htext,convertirc("N° d'avenant"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(20,$htext,convertirc(": ".$entetecp['numeroAvenant']),0,0,'L',false);
|
|
$pdf->Ln();
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35,$htext,convertirc("Numéro police"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(50,$htext,convertirc(": ".$entetecp['numeroPoliceGarant']),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(35);
|
|
$pdf->Cell(35,$htext,convertirc("N° quittance"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(20,$htext,convertirc(": ".$entetecp['numeroQuittancePlus']),0,0,'L',false);
|
|
/////////////////////////////////*/
|
|
$pdf->Ln(30);
|
|
|
|
///
|
|
|
|
|
|
// $pdf->SetFont('Arial','',9);
|
|
// $pdf->Cell(0,$ht,convertirc("Edité le ".$entetecp['dateJour']." à ".$entetecp['HeureJour']),0,1,'R',false);
|
|
|
|
if ($infosDuGarant['typeGarant']=="1"){
|
|
if (file_exists($_SESSION['dossierSociete'].'/Tarifs/Img/garants/pied_'.strtolower($codeGcAssureur).'.png')){
|
|
$pdf->Image($_SESSION['dossierSociete'].'/Tarifs/Img/garants/pied_'.strtolower($codeGcAssureur).'.png',10,270,190);
|
|
}
|
|
}
|
|
$fichier="Temp/TMP_SUITE_DES_CONDITIONS_PARTICULIERES"."_".uniqid().".pdf";
|
|
$pdf->Output($fichier,"F");
|
|
|
|
$t_html =' <div id ="div_export_a" class="alert alert-info"> ';
|
|
$t_html .=' <a style="font-size:15pt;" href="'.$fichier.'" target="_blank" > TELECHARGER </a> ';
|
|
$t_html .=' </div ';
|
|
|
|
echo $t_html;
|
|
?>
|