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

26 lines
472 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-08-25 10:47:09 +00:00
class Invoice extends Vn\Web\RestRequest
2016-07-22 20:00:27 +00:00
{
function run ()
{
$db = $this->login ();
if (empty ($_REQUEST['invoice']))
throw new Exception (s('Invoice id not sent'));
$pdfPath = $db->getValueFromFile (__DIR__ .'/invoice',
['invoice' => (int) $_GET['invoice']]);
if (!$pdfPath)
throw new Exception (s('Invoice id not found'));
Vn\Web\printFile ($pdfPath);
}
}
?>