facturation/www/admin/index.php

25 lines
682 B
PHP
Raw Normal View History

2019-11-02 17:53:27 +01:00
<?php
namespace Garradin;
2020-12-29 18:07:26 +01:00
require_once __DIR__ . '/_upgrade_trick.php';
2019-11-02 17:53:27 +01:00
require_once __DIR__ . '/_inc.php';
$session->requireAccess('compta', Membres::DROIT_ACCES);
$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
}
$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');