2019-11-02 17:53:27 +01:00
|
|
|
<?php
|
|
|
|
|
2023-08-01 22:56:38 +02:00
|
|
|
namespace Paheko;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
|
|
|
require_once __DIR__ . '/_inc.php';
|
|
|
|
|
2021-04-11 14:25:59 +02:00
|
|
|
$session->requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_READ);
|
2019-11-02 17:53:27 +01:00
|
|
|
|
2023-08-01 22:56:38 +02:00
|
|
|
use Paheko\Users\Users;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
2023-08-01 22:56:38 +02:00
|
|
|
$users = new Users;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
2023-08-01 22:56:38 +02:00
|
|
|
f(['id' => 'required|numeric']);
|
2019-11-02 17:53:27 +01:00
|
|
|
$id = (int) qg('id');
|
|
|
|
|
|
|
|
$f = $facture->get($id);
|
|
|
|
|
|
|
|
if (!$f)
|
|
|
|
{
|
|
|
|
throw new UserException("Ce document n'existe pas.");
|
|
|
|
}
|
|
|
|
|
2020-10-24 05:40:42 +02:00
|
|
|
$tpl->assign('type', $f->type_facture);
|
2020-10-24 09:19:21 +02:00
|
|
|
$tpl->assign('facture', $f);
|
2019-11-02 17:53:27 +01:00
|
|
|
$tpl->assign('id', $id);
|
2020-10-24 01:00:48 +02:00
|
|
|
$tpl->assign('footer', $plugin->getConfig('footer')?:'');
|
|
|
|
$tpl->assign('siret_asso', $plugin->getConfig('siret_asso')?:'');
|
2019-11-02 17:53:27 +01:00
|
|
|
|
2019-11-03 17:51:31 +01:00
|
|
|
$tpl->display(PLUGIN_ROOT . '/templates/facture.tpl');
|