hedera-web/rest/dms/invoice.php

26 lines
450 B
PHP
Raw Normal View History

2016-07-22 20:00:27 +00:00
<?php
2016-08-25 10:47:09 +00:00
require_once ('vn/web/rest-request.php');
2016-07-22 20:00:27 +00:00
require_once ('vn/web/util.php');
2016-09-23 22:47:34 +00:00
use Vn\Web\Security;
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'));
Vn\Web\printFile ($pdfPath);
}
}
?>