hedera-web/rest/dms/invoice.php

23 lines
386 B
PHP
Raw Normal View History

2016-07-22 20:00:27 +00:00
<?php
2016-09-23 22:47:34 +00:00
use Vn\Web\Security;
2016-09-24 14:32:31 +00:00
use Vn\Web\Util;
2016-09-23 22:47:34 +00:00
2016-08-25 10:47:09 +00:00
class Invoice extends Vn\Web\RestRequest
2016-07-22 20:00:27 +00:00
{
2016-09-06 14:25:02 +00:00
const PARAMS = ['invoice'];
2016-09-23 22:47:34 +00:00
const SECURITY = Security::INVOKER;
2016-07-22 20:00:27 +00:00
2016-09-06 14:25:02 +00:00
function run ($db)
{
2016-07-22 20:00:27 +00:00
$pdfPath = $db->getValueFromFile (__DIR__ .'/invoice',
['invoice' => (int) $_GET['invoice']]);
if (!$pdfPath)
throw new Exception (s('Invoice id not found'));
2016-09-24 14:32:31 +00:00
Util::printFile ($pdfPath);
2016-07-22 20:00:27 +00:00
}
}