detailsp = new Statistique(); } public function index() { $idAdherent = $this->requete->getParametreFormulaire("idAdherent"); $entete = $this->detailsp->detailrapportspadhpdfentete($idAdherent); $detailsps = $this->detailsp->detailrapportspadhfacturepdf($idAdherent); $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetMargins(15, 15, 15) ; $pdf->SetFont('Arial','BU',10); // $pdf->AliasNbPages(); $pdf->Cell(0,6,convertirc($entete['nomAssureur']." : "._('DETAIL DES FACTURES FAMILLE')),0,1,'C',false); $pdf->Ln(2); $pdf->SetFont('Arial','B',7); $pdf->Cell(0,5,convertirc(_('Souscripteur').' : '.$entete['souscripteur']),0,1,'L',false); $pdf->Cell(0,5,convertirc(_('No Police').' : '.$entete['numeroPolice']),0,1,'L',false); $pdf->Cell(0,5,convertirc(_('Adhérent').' : '.$entete['adherent']),0,1,'L',false); $pdf->Cell(0,5,convertirc(_('Couverture').' : '.$entete['dateEffetAdherent']." To ".$entete['dateFinAdherent']),0,1,'L',false); $pdf->Cell(0,5,convertirc(_('Date Analyse').' : '.$entete['dateAnalyse']),0,0,'L',false); $pdf->Cell(0,5,'Edition : '.heureCouranteLang($_SESSION['lang']),0,1,'R',false); $pdf->Ln(2); $hl=5; $pdf->Cell(70,$hl,convertirc(_('Bénéficiaire')),"1",0,'C'); $pdf->Cell(15,$hl,convertirc("Date"),"1",0,'C'); $pdf->Cell(60,$hl,convertirc(_('Prestataire')),"1",0,'C'); $pdf->Cell(20,$hl,convertirc(_('Montant')),"1",0,'C'); $pdf->Cell(15,$hl,convertirc(_('No Fact')),"1",1,'C'); $pdf->SetFont('Arial','I',6); $montantTotal = 0; foreach ($detailsps as $detailsp) { $pdf->Cell(70,$hl,convertirc($detailsp['beneficiaire']),"1",0,'L'); $pdf->Cell(15,$hl,convertirc($detailsp['dateFacture']),"1",0,'C'); $pdf->Cell(60,$hl,convertirc($detailsp['prestataire']),"1",0,'L'); $pdf->Cell(20,$hl,format_N($detailsp['montant']),"1",0,'C'); $pdf->Cell(15,$hl,convertirc($detailsp['facture']),"1",1,'C'); $montantTotal = $detailsp['montantTotal']; } $pdf->SetFont('Arial','BI',6); $pdf->Cell(145,$hl,convertirc("TOTAL"),"1",0,'C'); // $pdf->Cell(20,$hl,format_N($detailsp['montantTotal']),"1",0,'C'); $pdf->Cell(20,$hl,format_N($montantTotal),"1",0,'C'); $pdf->Cell(15,$hl,"","1",1,'C'); $fichier="Temp/TMP_DETAIL_FACTURES_FAM"."_".uniqid().".pdf"; $pdf->Output($fichier,"F"); $t_html ='
'; $t_html .=' '._("TELECHARGER").' '; $t_html .='