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

24 lines
406 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;
2017-12-19 09:08:11 +00:00
use Vn\Lib;
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)
2017-12-19 09:08:11 +00:00
throw new Lib\UserException (s('Invoice id not found'));
2016-07-22 20:00:27 +00:00
2016-09-24 14:32:31 +00:00
Util::printFile ($pdfPath);
2016-07-22 20:00:27 +00:00
}
}