28 lines
975 B
PHP
Executable File
28 lines
975 B
PHP
Executable File
<?php
|
|
|
|
if (!$_REQUEST ['record'] || $_REQUEST ['record'] == '') {
|
|
die('Brak rekordu');
|
|
} else {
|
|
$record = $_REQUEST ['record'];
|
|
}
|
|
include_once ("modules/EcmStockDocMoves/PDFTemplate/helper.php");
|
|
$focus = new EcmStockDocMove ();
|
|
$focus->retrieve($record);
|
|
$user = new User ();
|
|
$user->retrieve($focus->assigned_user_id);
|
|
include_once ("include/MPDF57/mpdf.php");
|
|
$p = new mPDF('', 'A4', null, 'helvetica', 10, 10, 30, 45, 5, 5);
|
|
$mpdf->mirrorMargins = 1;
|
|
$db = $GLOBALS ['db'];
|
|
//$positions = formatPDFPositions($focus->getPositionListOperations(true), $focus);
|
|
$positions = formatPDFPositions($focus->getPositionList(true));
|
|
$content = '';
|
|
if ($_REQUEST['pdf_type']=='lr') {
|
|
include_once ("modules/EcmStockOperations/PdfTemplate/content.php");
|
|
$content = getDocOperations('EcmStockDocMoves', $record);
|
|
} else
|
|
include_once ("modules/EcmStockDocMoves/PDFTemplate/content.php");
|
|
$p->SetHTMLHeader($header);
|
|
$p->WriteHTML($content);
|
|
$p->SetHTMLFooter($footer);
|
|
$p->Output(); |