This commit is contained in:
parent
bcbbee411f
commit
90e2b0abb5
|
@ -1,21 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use Vn\Web\Security;
|
|
||||||
use Vn\Web\Util;
|
|
||||||
use Vn\Lib;
|
|
||||||
|
|
||||||
class Invoice extends Vn\Web\RestRequest {
|
|
||||||
const PARAMS = ['invoice'];
|
|
||||||
const SECURITY = Security::INVOKER;
|
|
||||||
|
|
||||||
function run($db) {
|
|
||||||
$pdfPath = $db->getValueFromFile(__DIR__ .'/invoice',
|
|
||||||
['invoice' =>(int) $_GET['invoice']]);
|
|
||||||
|
|
||||||
if (!$pdfPath)
|
|
||||||
throw new Lib\UserException(s('Invoice id not found'));
|
|
||||||
|
|
||||||
Util::printFile($pdfPath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
|
|
||||||
SELECT CONCAT_WS('/', c.pdfsDir, vn.invoiceOut_getPath(#invoice))
|
|
||||||
FROM config c
|
|
||||||
JOIN myInvoice i
|
|
||||||
WHERE i.id = #invoice
|
|
Loading…
Reference in New Issue