4 require_once __DIR__
. '/../_inc.php';
6 $exercices = new Compta_Exercices
;
8 $exercice = $exercices->get((int)utils
::get('id'));
12 throw new UserException('Exercice inconnu.');
15 $liste_comptes = $comptes->getListAll();
17 function get_nom_compte($compte)
22 global $liste_comptes;
23 return $liste_comptes[$compte];
26 $tpl->register_modifier('get_nom_compte', 'Garradin\get_nom_compte');
27 $journal = $exercices->getJournal($exercice['id']);
29 foreach ($journal as &$ligne)
31 if ($ligne['id'] == $id)
33 unset($ligne['date']);
34 unset($ligne['libelle']);
41 $tpl->assign('journal', $journal);
43 $tpl->assign('cloture', $exercice['cloture'] ?
$exercice['fin'] : time());
44 $tpl->assign('exercice', $exercice);
46 $tpl->display('admin/compta/exercices/journal.tpl');