forked from verdnatura/hedera-web
24 lines
406 B
PHP
24 lines
406 B
PHP
<?php
|
|
|
|
use Vn\Web\Security;
|
|
use Vn\Web\Util;
|
|
use Vn\Lib;
|
|
|
|
class Invoice extends Vn\Web\RestRequest
|
|
{
|
|
const PARAMS = ['invoice'];
|
|
const SECURITY = Security::INVOKER;
|
|
|
|
function run ($db)
|
|
{
|
|
$pdfPath = $db->getValueFromFile (__DIR__ .'/invoice',
|
|
['invoice' => (int) $_GET['invoice']]);
|
|
|
|
if (!$pdfPath)
|
|
throw new Lib\UserException (s('Invoice id not found'));
|
|
|
|
Util::printFile ($pdfPath);
|
|
}
|
|
}
|
|
|