forked from verdnatura/hedera-web
23 lines
391 B
PHP
23 lines
391 B
PHP
<?php
|
|
|
|
require_once ('vn/web/rest-request.php');
|
|
require_once ('vn/web/util.php');
|
|
|
|
class Invoice extends Vn\Web\RestRequest
|
|
{
|
|
const PARAMS = ['invoice'];
|
|
|
|
function run ($db)
|
|
{
|
|
$pdfPath = $db->getValueFromFile (__DIR__ .'/invoice',
|
|
['invoice' => (int) $_GET['invoice']]);
|
|
|
|
if (!$pdfPath)
|
|
throw new Exception (s('Invoice id not found'));
|
|
|
|
Vn\Web\printFile ($pdfPath);
|
|
}
|
|
}
|
|
|
|
?>
|