etrecu = new TbRecucaisse(); $this->societeuser = new Societeuser(); } public function index() { $idEncaissement = $this->requete->getParametreFormulaire("idEncaissement"); $etrecu = $this->etrecu->recuAimprimer($idEncaissement); $etdetailrecus = $this->etrecu->detailsrecuAimprimer($idEncaissement); $societeuser = $this->societeuser->getSocieteuser($_SESSION['codeSociete']); $pdf = new Pdfentete(); $pdf->SetMargins(15, 15, 15) ; $pdf->SetFont('Arial','',15); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->Sety(20); $pdf->SetX(60); $pdf->Cell(100,12,convertirc($societeuser['nomSociete']),1,1,'C',false); $pdf->SetFontSize(7); $pdf->Cell(0,5,'Edition : '.heureCouranteLang($_SESSION['lang']),0,1,'R',false); $pdf->SetFontSize(8); $pdf->Cell(0,5,convertirc('Tel : '.$societeuser['telephoneSociete']),0,1,'C',false); $pdf->Cell(0,5,convertirc(_("Adresse Post") . " : " . $societeuser['adressePostSociete']),0,1,'C',false); $pdf->Cell(0,5,convertirc(_("Registre Commerce") . " : " . $societeuser['registreCommerce']),0,1,'C',false); $pdf->SetFontSize(15); $pdf->Ln(5); $pdf->Cell(0,12,convertirc(_("RECU ENCAISSEMENT") . " No : " . $etrecu['numeroEncaissement']),1,1,'C',false); $pdf->SetFontSize(8); $pdf->Cell(40,6,convertirc(_('Reçu de')),0,0,'L',false); $pdf->SetFont('Arial','BI',8); $pdf->Cell(100,6,convertirc(': '.$etrecu['nomTireur']),0,1,'L'); $pdf->SetFont('Arial','',8); $pdf->Cell(40,6,convertirc(_('La somme de')),0,0,'L',false); $pdf->SetFont('Arial','BI',8); $pdf->Cell(100,6,convertirc(': '.format_N($etrecu['montant'])." ".$_SESSION['devise_C']),0,1,'L'); $pdf->SetFont('Arial','',8); $pdf->SetFont('Arial','I',8); $pdf->Cell(0,6, convetirEnLettre($etrecu['montant'], $_SESSION['lang'])." ".$_SESSION['devise_C'],1,1,'C'); $pdf->SetFont('Arial','',8); $pdf->Cell(40,6,convertirc(_('Mode Paiement')),0,0,'L',false); $pdf->SetFont('Arial','BI',8); if (est_anglophone()) { $pdf->Cell(100,6,convertirc(': '.$etrecu['modepaiementEng']),0,1,'L'); } else { $pdf->Cell(100,6,convertirc(': '.$etrecu['modepaiement']),0,1,'L'); } $pdf->SetFont('Arial','',8); $pdf->Cell(40,6,convertirc(_('Références paiement')),0,0,'L',false); $pdf->SetFont('Arial','BI',8); $pdf->Cell(100,6,convertirc(': '.$etrecu['referencePaiement']),0,1,'L'); $pdf->SetFont('Arial','BU',8); $pdf->Cell(0,6,convertirc(_("Polices payées")." : "),0,1,'L',false); $pdf->SetFont('Arial','',8); $hl=5; $pdf->SetFont('Arial','B',8); $pdf->Cell(85,$hl,convertirc(_('Client')),"1",0,'C'); $pdf->Cell(25,$hl,convertirc(_('No Police')),"1",0,'C'); $pdf->Cell(15,$hl,convertirc(_('Quit')),"1",0,'C'); $pdf->Cell(18,$hl,convertirc(_('Effet')),"1",0,'C'); $pdf->Cell(18,$hl,convertirc(_('Echéance')),"1",0,'C'); $pdf->Cell(20,$hl,convertirc(_("Montant")),"1",1,'C'); $pdf->SetFont('Arial','I',8); foreach ($etdetailrecus as $detailencaissement) { $pdf->Cell(85,$hl,convertirc($detailencaissement['nomClient']),"1",0,'L'); $pdf->Cell(25,$hl,convertirc($detailencaissement['numeroPolice']),"1",0,'C'); $pdf->Cell(15,$hl,convertirc($detailencaissement['numeroQuittance']),"1",0,'C'); $pdf->Cell(18,$hl,convertirc(dateFr($detailencaissement['dateEffet'])),"1",0,'C'); $pdf->Cell(18,$hl,convertirc(dateFr($detailencaissement['dateEcheance'])),"1",0,'C'); $pdf->Cell(20,$hl,format_N($detailencaissement['primeTtc']),"1",1,'C'); } $pdf->SetFont('Arial','',8); $pdf->SetFontSize(10); $pdf->SetY(-60); $pdf->Cell(0,10,convertirc(_('Fait à').' '.$_SESSION['villeSociete'].', le ').dateFr($etrecu['dateCre']),0,1,'C',false); $pdf->SetFont('','U'); $pdf->Cell(0,10,convertirc(_('La caisse').' : '.$etrecu['caissiere']),0,0,'C',false); $fichier="Temp/TMP_recu_caisse"."_".uniqid().".pdf"; $pdf->Output($fichier,"F"); $t_html ='
'; $t_html .=' '._("TELECHARGER").' '; $t_html .='