Début restructuration pour compatibilité version 1.3 de paheko
FossilOrigin-Name: 467790c5738a867592117ea6b3a7ac6c61738dab3b8e29a48fed8f19b9df2b38
This commit is contained in:
parent
e75c56b736
commit
bc4739877c
27 changed files with 77 additions and 46 deletions
24
admin/choix_annee.php
Normal file
24
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