31 lines
1.1 KiB
PHP
31 lines
1.1 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
if (!$_REQUEST ['record'] || $_REQUEST ['record'] == '') {
|
||
|
|
die('Brak rekordu');
|
||
|
|
} else {
|
||
|
|
$record = $_REQUEST ['record'];
|
||
|
|
}
|
||
|
|
include_once ("modules/EcmStockDocInsideOuts/PDFTemplate/helper.php");
|
||
|
|
$focus = new EcmStockDocInsideOut ();
|
||
|
|
$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->getPositionList(true), $focus);
|
||
|
|
include_once('modules/EcmSysInfos/EcmSysInfo.php');
|
||
|
|
$ecmsysinfos = new EcmSysInfo();
|
||
|
|
$header = $ecmsysinfos->getHeaderForModule('EcmStockDocInsideOuts');
|
||
|
|
$footer = $ecmsysinfos->getFooterForModule('EcmStockDocInsideOuts');
|
||
|
|
$content = '';
|
||
|
|
if ($_REQUEST['pdf_type']=='lr') {
|
||
|
|
include_once ("modules/EcmStockOperations/PdfTemplate/content.php");
|
||
|
|
$content = getDocOperations('EcmStockDocInsideOuts', $record);
|
||
|
|
} else
|
||
|
|
include_once ("modules/EcmStockDocInsideOuts/PDFTemplate/content.php");
|
||
|
|
$p->SetHTMLHeader($header);
|
||
|
|
$p->WriteHTML($content);
|
||
|
|
$p->SetHTMLFooter($footer);
|
||
|
|
$p->Output();
|