2019-11-02 17:53:27 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Garradin;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
$membres = new Membres;
|
|
|
|
|
2020-12-29 18:07:26 +01:00
|
|
|
$tpl->assign('moyens_paiement', $facture->listMoyensPaiement());
|
2019-11-02 17:53:27 +01:00
|
|
|
|
|
|
|
foreach($factures = $facture->listAll() as $k=>$f)
|
|
|
|
{
|
2019-11-03 17:51:31 +01:00
|
|
|
$factures[$k]->receveur = $f->receveur_membre? $membres->get($f->receveur_id) : $client->get($f->receveur_id);
|
2020-12-29 18:07:26 +01:00
|
|
|
$factures[$k]->moyen_paiement = $facture->getMoyenPaiement($f->moyen_paiement);
|
2019-11-02 17:53:27 +01:00
|
|
|
}
|
|
|
|
|
2020-10-24 10:08:44 +02:00
|
|
|
$tpl->assign('identite', $identite);
|
2019-11-02 17:53:27 +01:00
|
|
|
$tpl->assign('factures', $factures);
|
|
|
|
$tpl->assign('clients', $client->listAll());
|
|
|
|
|
|
|
|
$tpl->display(PLUGIN_ROOT . '/templates/index.tpl');
|