0
1
Fork 0
hedera-web-mindshore/rest/dms/invoice.php

23 lines
386 B
PHP

<?php
use Vn\Web\Security;
use Vn\Web\Util;
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 Exception (s('Invoice id not found'));
Util::printFile ($pdfPath);
}
}