123 lines
4.4 KiB
PHP
123 lines
4.4 KiB
PHP
<?php
|
|
require_once '././Framework/Controleur.php';
|
|
|
|
require_once 'TbRecucaisse.php';
|
|
require_once 'Pdfentete.php';
|
|
require_once 'Societeuser.php';
|
|
|
|
class Etrecucaisse extends Controleur {
|
|
private $etrecu;
|
|
private $societeuser;
|
|
|
|
public function __construct() {
|
|
$this->etrecu = new TbRecucaisse();
|
|
$this->societeuser = new Societeuser();
|
|
}
|
|
|
|
public function index() {
|
|
}
|
|
|
|
public function imprimer($IdR) {
|
|
$etrecu = $this->etrecu->recuAimprimer($IdR);
|
|
$etdetailrecus = $this->etrecu->detailsrecuAimprimer($IdR);
|
|
$societeuser = $this->societeuser->getSocieteuser($_SESSION['codeSociete']);
|
|
|
|
$pdf = new Pdfentete();
|
|
$pdf->SetMargins(25, 25, 25) ;
|
|
$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 : '.heureCourante(),0,1,'R',false);
|
|
$pdf->SetFontSize(8);
|
|
$pdf->Cell(0,5,convertirc('Tél : '.$societeuser['telephoneSociete']),0,1,'C',false);
|
|
$pdf->Cell(0,5,convertirc('P.O.BOX : '.$societeuser['telephoneSociete']),0,1,'C',false);
|
|
$pdf->Cell(0,5,convertirc('TIN : 102781991'),0,1,'C',false);
|
|
|
|
$pdf->SetFontSize(15);
|
|
$pdf->Ln(5);
|
|
$pdf->Cell(0,12,convertirc(_("RECU D'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']).' FRW'),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','',8);
|
|
$pdf->Cell(40,6,convertirc("Montant en lettre"),0,0,'L',false);
|
|
$pdf->SetFont('Arial','BI',8);
|
|
$pdf->Cell(100,6,': '.asLetters($etrecu['montant']).convertirc(' FRW'),0,1,'L',false);
|
|
|
|
/*
|
|
$pdf->SetFont('Arial','',8);
|
|
$pdf->Cell(40,6,convertirc("Apporteur : "),0,0,'L',false);
|
|
$pdf->SetFont('Arial','BI',8);
|
|
$pdf->Cell(100,6,convertirc(': '.$etrecu['apporteur']),0,1,'L');
|
|
*/
|
|
$pdf->SetFont('Arial','',8);
|
|
$pdf->Cell(40,6,convertirc("Mode de paiement : "),0,0,'L',false);
|
|
$pdf->SetFont('Arial','BI',8);
|
|
$pdf->Cell(100,6,convertirc(': '.$etrecu['modepaiement']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','',8);
|
|
$pdf->Cell(40,6,convertirc("Référence dpaiement : "),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(10,$hl,convertirc("N° Cli"),"1",0,'C');
|
|
$pdf->Cell(50,$hl,convertirc("Nom Client"),"1",0,'C');
|
|
$pdf->Cell(25,$hl,convertirc("No POLICE"),"1",0,'C');
|
|
$pdf->Cell(10,$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(10,$hl,convertirc("Mvt"),"1",0,'C');
|
|
$pdf->Cell(20,$hl,convertirc("Montant"),"1",1,'C');
|
|
|
|
$pdf->SetFont('Arial','I',8);
|
|
foreach ($etdetailrecus as $detailencaissement)
|
|
{
|
|
$pdf->Cell(10,$hl,convertirc($detailencaissement['numeroClient']),"1",0,'C');
|
|
$pdf->Cell(50,$hl,convertirc($detailencaissement['nomClient']),"1",0,'L');
|
|
$pdf->Cell(25,$hl,convertirc($detailencaissement['numeroPolice']),"1",0,'C');
|
|
$pdf->Cell(10,$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(10,$hl,convertirc($detailencaissement['codeTypeAvenant']),"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 à KIGALI, 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="recu_caisse"."_".uniqid().".pdf";
|
|
|
|
$pdf->Output($fichier,"D");
|
|
}
|
|
} |