118 lines
3.7 KiB
PHP
118 lines
3.7 KiB
PHP
<?php
|
|
require_once 'Framework/Controleurrequete.php';
|
|
require_once 'Modele/Gestionconfiee.php';
|
|
require_once 'Modele/Societeuser.php';
|
|
|
|
class ControleurAjaxrecugc extends Controleur
|
|
{
|
|
private $facture;
|
|
private $societeuser;
|
|
|
|
public function __construct() {
|
|
$this->facture = new Gestionconfiee();
|
|
$this->societeuser = new Societeuser();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$idGcReglement = $_SESSION['idGcReglement'];
|
|
|
|
$reglement = $this->facture->getgcreglement($idGcReglement);
|
|
|
|
$societeuser = $this->societeuser->getSocieteuser($_SESSION['codeSociete']);
|
|
|
|
$pdf = new FPDF();
|
|
|
|
$pdf->AliasNbPages();
|
|
$pdf->AddPage();
|
|
|
|
$pdf->SetMargins(25, 25, 25) ;
|
|
$pdf->SetFont('Arial','BU',10);
|
|
|
|
$pdf->Sety(40);
|
|
$pdf->Cell(0,12,convertirc($societeuser['nomSociete']),1,1,'C',false);
|
|
|
|
$pdf->Ln(2);
|
|
$pdf->SetFont('Arial','I',7);
|
|
|
|
$pdf->Cell(0,5,'Edition : '.heureCourante(),0,1,'C',false);
|
|
$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->Ln(5);
|
|
|
|
$pdf->SetFont('Arial','BU',10);
|
|
$pdf->Cell(0,12,convertirc("RECU ENCAISSEMENT GESTION CONFIEE N° ".$reglement['gcNumeroDecompte']),1,1,'C',false);
|
|
|
|
$pdf->Ln(5);
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
|
|
$pdf->Cell(40,10,convertirc(_("Assureur")),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','BI',10);
|
|
$pdf->Cell(0,10,convertirc(': '.$reglement['gcassureur']),0,1,'L',false);
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(40,10,convertirc('Date Facture'),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','BI',10);
|
|
$pdf->Cell(0,10,convertirc(': '.dateFr($reglement['dateSysteme'])),0,1,'L',false);
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(40,10,convertirc("Reçu de (Tireur)"),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','BI',10);
|
|
$pdf->Cell(0,10,convertirc(': '.$reglement['nomTireur']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(40,5,convertirc("La somme de"),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','BI',10);
|
|
$pdf->Cell(0,5,convertirc(': '.format_N($reglement['montantDu']).' FRW'),0,1,'L');
|
|
|
|
// $pdf->SetFont('Arial','',10);
|
|
// $pdf->Cell(40,10,convertirc("Montant en lettre"),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','BI',9);
|
|
$pdf->Cell(0,10,ucfirst(asLetters($reglement['montantDu'])).convertirc(' FRW'),0,1,'L',false);
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(40,10,convertirc("Mode de paiement"),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','BI',10);
|
|
$pdf->Cell(0,10,convertirc(': '.$reglement['modepaiement']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(40,10,convertirc("Référence paiement"),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','BI',10);
|
|
$pdf->Cell(0,10,convertirc(': '.$reglement['referencePaiement']),0,1,'L');
|
|
|
|
$pdf->SetFont('Arial','',10);
|
|
$pdf->Cell(40,10,convertirc("Banque"),0,0,'L',false);
|
|
|
|
$pdf->SetFont('Arial','BI',10);
|
|
$pdf->Cell(0,10,convertirc(': '.$reglement['banquePayeur']),0,1,'L');
|
|
|
|
$pdf->Ln(10);
|
|
|
|
$pdf->SetFont('Arial','U',10);
|
|
|
|
$pdf->Cell(0,10,convertirc('Fait à KIGALI, le ').dateFr($reglement['dateComptable']),0,1,'C',false);
|
|
|
|
$pdf->Ln(10);
|
|
|
|
|
|
$pdf->Cell(0,10,convertirc('La Comptabilité de '.$societeuser['nomSociete'].' : '.$reglement['userPaiement']),0,0,'C',false);
|
|
|
|
$fichier="Temp/TMP_RECU_GC"."_".uniqid().".pdf";
|
|
$pdf->Output($fichier,"F");
|
|
|
|
$t_html =' <div id ="div_export_b" class="alert alert-info"> ';
|
|
$t_html .=' <a style="font-size:15pt;" href="'.$fichier.'" target="_blank" > '._("TELECHARGER").' </a> ';
|
|
$t_html .=' </div ';
|
|
echo $t_html;
|
|
}
|
|
} |