generartionbon = new Generartionbon();
}
public function index()
{
$idgenerartionbon = $_SESSION['idgenerartionbon_C'];
$generartionbon = $this->generartionbon->unegenerationbon($idgenerartionbon) ;
$pdf = new FPDF_Protection();
$pdf->SetAuthor('EBENE SOLUTIONS INFORMATIQUES');
$userPassword = '';
$ownerPassword = null;
$pdf->SetProtection(['print'], $userPassword, $ownerPassword);
$pdf->AliasNbPages();
$pdf->AddPage();
$ht=10;
$lg=60;
$pdf->SetMargins(10, 10, 10) ;
$pdf->SetFont('Arial','B', 15);
$pdf->SetY(30);
$pdf->Cell(0,10,convertirc($_SESSION['nomSociete']),1,1,'C',false);
$pdf->Ln(10);
$pdf->SetFont('Arial','BU', 15);
$pdf->SetFontSize(12);
$pdf->Cell(0,10,convertirc(_("BON DE SORTIE DE PRISES EN CHARGE")." No ".$generartionbon['idGenerationbon']),0,1,'C',false);
$pdf->Ln(10);
$pdf->SetFont('Arial','B', 12);
$pdf->Cell($lg,10,convertirc(_("Prestataire")),0,0,'L',false);
$pdf->SetFont('Arial','I',12);
$pdf->Cell(0,10,convertirc(': '.$generartionbon['prestataire']),0,1,'L');
$pdf->SetFont('Arial','B', 12);
$pdf->Cell($lg,10,convertirc(_("TYPE DE PEC")),0,0,'L',false);
$pdf->SetFont('Arial','I',12);
$pdf->Cell(0,10,": ".convertirc($generartionbon['typeBon']),0,1,'L');
$pdf->SetFont('Arial','B', 12);
$pdf->Cell($lg,10,convertirc(_("No DE DEPART")),0,0,'L',false);
$pdf->SetFont('Arial','I',12);
$pdf->Cell(0,10,": ".format_N($generartionbon['noDepart']),0,1,'L');
$pdf->SetFont('Arial','B', 12);
$pdf->Cell($lg,10,convertirc(_("No DE FIN")),0,0,'L',false);
$pdf->SetFont('Arial','I',12);
$pdf->Cell(0,10,": ".format_N($generartionbon['noFin']),0,1,'L');
$pdf->SetFont('Arial','B', 12);
$pdf->Cell($lg,10,convertirc(_('QUANTITE')),0,0,'L',false);
$pdf->SetFont('Arial','I',12);
$pdf->Cell(0,10,": ".format_N($generartionbon['nbLigne']),0,1,'L');
$pdf->SetFont('Arial','B', 12);
$pdf->Cell($lg,10,convertirc(_('LIVRES PAR')),0,0,'L',false);
$pdf->SetFont('Arial','I',12);
$pdf->Cell(0,10,": ".$generartionbon['utilisateur'],0,1,'L');
$pdf->SetFont('Arial','B', 12);
$pdf->Cell($lg,10,convertirc(_('RECEPTIONNAIRE')),0,0,'L',false);
$pdf->SetFont('Arial','I',12);
$pdf->Cell(0,10,": ".$generartionbon['receptionnaire'],0,1,'L');
$pdf->SetFont('Arial','B', 12);
$pdf->Cell($lg,10,convertirc(_('DATE SYSTEME')),0,0,'L',false);
$pdf->SetFont('Arial','I',12);
$pdf->Cell(0,10,": ".dateheureFr($generartionbon['dateSysteme']),0,1,'L');
// dateheureFr(
$pdf->Ln(10);
$pdf->Cell(0,10,convertirc(_('Fait à')).' '.$_SESSION['villeSociete'].', '._('le').' '.heureCouranteLang($_SESSION['lang']),0,1,'C',false);
$fichier="Temp/TMP_bon_livraison_pec"."_".uniqid().".pdf";
$pdf->Output($fichier,"F");
echo '
'._("TELECHARGER").'
';
}
}