carte = new Carteassure(); $this->beneficiaire = new Beneficiaire(); } public function index() { $codeLienParente = $this->requete->getParametreFormulaire("codeLienParente"); $codeEtatCarte = $this->requete->getParametreFormulaire("codeEtatCarte"); $debut = $this->requete->getParametreDate("debut"); $fin = $this->requete->getParametreDate("fin"); $cartes = $this->carte->getCarteAssure($codeLienParente, $codeEtatCarte, $debut, $fin); $this->genererVueAjax(array('cartes' => $cartes)); } public function imprimerlistecarteassure() { $codeLienParente = $this->requete->getParametreFormulaire("codeLienParente"); $codeEtatCarte = $this->requete->getParametreFormulaire("codeEtatCarte"); $debut = $this->requete->getParametreDate("debut"); $fin = $this->requete->getParametreDate("fin"); $cartes = $this->carte->getCarteAssure($codeLienParente, $codeEtatCarte, $debut, $fin); $idPolice = $_SESSION['idPolice_C']; $enetete = $this->beneficiaire->getEnteteBeneficiairesAimprimer($idPolice); $codeGcAssureur = $this->beneficiaire->getCodeGarantPolice($idPolice); $infosDuGarant = $this->beneficiaire->getInfosGarant($codeGcAssureur); $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $ht=5; $pdf->SetMargins(10, 10, 10) ; // Logo //$pdf->Image('Bootstrap/images/logo_vitalis.png',10,3,18); 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['dossierSociete'].'/Tarifs/Img/logo_vitalis.png',10,6,30); } }else{ $pdf->Image($_SESSION['dossierSociete'].'/Tarifs/Img/logo_vitalis.png',10,6,30); } //$pdf->Ln(50); $pdf->SetFont('Arial','I',7); //Numéro de page $pdf->Cell(0,$ht,'Page '.$pdf->PageNo().'/{nb}',0,0,'C'); $pdf->SetFont('Arial','', 7); $pdf->Cell(0,$ht,convertirc(_('Edité le').' : '.heureCouranteLang($_SESSION['lang'])),0,1,'R',false); //$pdf->Ln(3); //$pdf->SetFont('Arial','BI', 7); //$pdf->Cell(0,$ht,convertirc($_SESSION['nomSociete']),0,0,'L',false); // Police Arial gras 15 $pdf->SetFont('Arial','B',15); $pdf->Ln(12); // Décalage à droite $pdf->Cell(30); $pdf->SetFillColor(217,237,247); // bleu // Titre $pdf->Cell(130,8,convertirc(_("ETATS DES EDITIONS DE CARTES D'ASSURES") ),1,0,'C',true); $pdf->Ln(20); $pdf->SetFont('Arial','B', 10); $pdf->Cell(25,$ht,convertirc(_("Garant")),0,0,'L',false); $pdf->Cell(25,$ht,convertirc(" : ".$enetete['codeGcAssureur']),0,0,'L',false); $pdf->Cell(8); $pdf->Cell(0,$ht,convertirc($enetete['garant']),0,1,'L',false); $pdf->Cell(25,$ht,convertirc(_("Période du ")),0,0,'L',false); $pdf->Cell(25,$ht,convertirc(" : ".$enetete['dateEffet']." au "),0,0,'L',false); $pdf->Cell(8); $pdf->Cell(40,$ht,convertirc(($enetete['dateEcheance']),0,1,'L',false)); $pdf->Ln(5); $pdf->Cell(25,$ht,convertirc(_("Souscripteur")),0,0,'L',false); $pdf->Cell(25,$ht,convertirc(" : ".$enetete['numeroClient']),0,0,'L',false); $pdf->Cell(8); $pdf->Cell(0,$ht,convertirc($enetete['nomClient']),0,1,'L',false); $pdf->Cell(25,$ht,convertirc(_("Police")),0,0,'L',false); $pdf->Cell(25,$ht,convertirc(" : ".$enetete['numeroPolice']),0,0,'L',false); $pdf->Cell(8); $pdf->Cell(0,$ht,convertirc($enetete['libellePolice']),0,1,'L',false); $pdf->Ln(5); $pdf->SetFont('Arial','', 6); $pdf->Cell(8,$ht,convertirc("No"),1,0,'C',false); $pdf->Cell(22,$ht,convertirc("Matricule"),1,0,'C',false); $pdf->Cell(50,$ht,convertirc(_('Bénéficiaire')),1,0,'L',false); $pdf->Cell(10,$ht,convertirc(_("Statut")),1,0,'C',false); $pdf->Cell(10,$ht,convertirc(_('Sexe')),1,0,'C',false); $pdf->Cell(20,$ht,convertirc(_('Naissance')),1,0,'C',false); $pdf->Cell(25,$ht,convertirc(_("Téléphone")),1,0,'C',false); $pdf->Cell(25,$ht,convertirc(_('Edition')),1,0,'C',false); $pdf->Cell(20,$ht,convertirc(_('Etat')),1,1,'C',false); $ordre = "0"; foreach ($cartes as $carte) { if($carte['codeEtatCarte']=="1"){ $edite = "non edite" ; }else{ $edite = $carte['codeEtatCarte']; } $ordre++; $pdf->Cell(8,$ht,$ordre,1,0,'C',false); $pdf->Cell(22,$ht,$carte['numeroBeneficiaire'],1,0,'C',false); $pdf->Cell(50,$ht,convertirc($carte['beneficiaire']),1,0,'L',false); $pdf->Cell(10,$ht,convertirc($carte['codeLienParente']),1,0,'C',false); $pdf->Cell(10,$ht,convertirc($carte['sexe']),1,0,'C',false); $pdf->Cell(20,$ht,convertirc(dateLang($carte['dateNaissance'],$_SESSION['lang'])),1,0,'C',false); $pdf->Cell(25,$ht,convertirc($carte['telephonePortableBeneficiaire']),1,0,'C',false); $pdf->Cell(25,$ht,convertirc(dateheureLang($carte['dateEditionCarte'],$_SESSION['lang'])),1,0,'L',false); $pdf->Cell(20,$ht,convertirc($edite),1,1,'C',false); } // $pdf->SetY(-70); //$pdf->Cell(0,6,convertirc(_('Fait à').' '.$_SESSION['villeSociete'].', le ').date('d/m/Y'),0,1,'C',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,265,190); } } //$pdf->Ln(2); //$pdf->SetFont('','BU'); //$pdf->Cell(0,6,convertirc(_('Pour').' '.$_SESSION['nomSociete']),0,0,'C',false); $fichier="Temp/TMP_borderau_carteassure"."_".uniqid().".pdf"; $pdf->Output($fichier,"F"); $t_html ='
'; $t_html .=' '._("TELECHARGER").' '; $t_html .='