Changement gestion choix année fiscale
FossilOrigin-Name: d6a1c29317cfa870514efff87598a508738ef9d089e52c9b75b0e3e5477a73c9
This commit is contained in:
parent
7d2707eddd
commit
7ca41ea6b7
5 changed files with 90 additions and 23 deletions
24
www/admin/choix_annee.php
Normal file
24
www/admin/choix_annee.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace Garradin;
|
||||
|
||||
use Garradin\Plugin\RecusFiscaux\Utils;
|
||||
|
||||
// liste des années fiscales
|
||||
$anneeCourante = date("Y");
|
||||
$anneesFiscales = Utils::getAnneesFiscales();
|
||||
if ($anneesFiscales[0] < $anneeCourante) {
|
||||
array_unshift($anneesFiscales, $anneeCourante);
|
||||
}
|
||||
|
||||
if (f('change'))
|
||||
{
|
||||
$_SESSION['annee_recu'] = f('annee_recu');
|
||||
\Garradin\Utils::redirect(f('from') ?: PLUGIN_URL);
|
||||
}
|
||||
|
||||
$tpl->assign('anneesFiscales', $anneesFiscales);
|
||||
$tpl->assign('annee_recu', $_SESSION['annee_recu']);
|
||||
$tpl->assign('from', qg('from'));
|
||||
|
||||
$tpl->display(PLUGIN_ROOT . '/templates/choix_annee.tpl');
|
||||
Loading…
Add table
Add a link
Reference in a new issue