33 lines
813 B
PHP
33 lines
813 B
PHP
<?php
|
|
$STOCK_DESCRIPTION = utf8_decode($STOCK_DESCRIPTION);
|
|
$pdf->SetXY($x, $y);
|
|
|
|
$pdf->SetFont('Arial','B',12);
|
|
$pdf->MultiCell(40,3.8, $STOCK_PROD_ID, 0, 'L');
|
|
|
|
|
|
|
|
$pdf->SetXY($x, $y + 8);
|
|
$pdf->SetFont('Arial','B',12);
|
|
$pdf->MultiCell(40,3.8, $STOCK_DESCRIPTION, 0, 'L');
|
|
|
|
|
|
|
|
$pdf->SetXY($x, $y + 18); // ajuste si besoin (hauteur étiquette ~25)
|
|
$pdf->SetFont('Arial','B',10);
|
|
$pdf->Cell(40, 4, "MS1.CA", 0, 0, 'L');
|
|
|
|
$go = "inventaire/redirect/" . $STOCK_ID;
|
|
$qr = new \App\Libraries\QrCodeService();
|
|
$code = $qr->get($go);
|
|
|
|
$tmp = WRITEPATH . 'qr_' . md5($go) . '.png';
|
|
|
|
if (!file_exists($tmp)) {
|
|
file_put_contents($tmp, base64_decode($code));
|
|
}
|
|
|
|
$pdf->Image($tmp, $x + 42, $y + 2, 18, 18);
|
|
$pdf->SetFont('Arial','B',8);
|
|
$pdf->RotatedText($x + 61, $y + 18, str_pad($STOCK_ID, 9, '0', STR_PAD_LEFT), 90);
|