get(utils::get('id')); if (!$operation) { throw new UserException("L'opération demandée n'existe pas."); } $exercices = new Compta_Exercices; $tpl->assign('operation', $operation); foreach ($operation['fluxs'] as $key => &$flux) { $compte = $comptes->get($flux['compte']); $flux['compte_libelle'] = $compte['libelle']; $flux['montant_oppose'] = - $flux['montant']; } $tpl->assign('fluxs', $operation['fluxs']); $tpl->assign('exercice', $exercices->get($operation['id_exercice'])); if ($operation['id_categorie']) { $cats = new Compta_Categories; $categorie = $cats->get($operation['id_categorie']); $tpl->assign('categorie', $categorie); if ($categorie['type'] == Compta_Categories::RECETTES) { $tpl->assign('compte', $debit['libelle']); } else { $tpl->assign('compte', $credit['libelle']); } $tpl->assign('moyen_paiement', $cats->getMoyenPaiement($operation['moyen_paiement'])); } if ($operation['id_auteur']) { $auteur = $membres->get($operation['id_auteur']); $tpl->assign('nom_auteur', $auteur['identite']); } $tpl->display('admin/compta/operations/voir.tpl'); ?>