From a787c1dacb33df3ec6e21a89b3b44ecfb7f7c475 Mon Sep 17 00:00:00 2001 From: engel <> Date: Mon, 7 Feb 2022 14:13:22 +0000 Subject: [PATCH] =?UTF-8?q?ajout=20v=C3=A9rification=20s=C3=A9lection=20an?= =?UTF-8?q?n=C3=A9e=20re=C3=A7u?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FossilOrigin-Name: 2ce14b6d56ad130d5ee4521f616d694a5855aaf638aac97d80aed46302c2fa38 --- www/admin/config.php | 2 +- www/admin/versements_activites.php | 9 +++++++-- www/admin/versements_personnes.php | 7 ++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/www/admin/config.php b/www/admin/config.php index 43c7d7e..e773b51 100644 --- a/www/admin/config.php +++ b/www/admin/config.php @@ -3,7 +3,7 @@ namespace Garradin; $session->requireAccess($session::SECTION_CONFIG, $session::ACCESS_ADMIN); -$art_sel=f('articlesCGI'); +$art_sel=f('articlesCGI') ? : []; error_log("art sel=" . print_r($art_sel, true) . "\n"); if (f('save') && $form->check('recusfiscaux_config')) { diff --git a/www/admin/versements_activites.php b/www/admin/versements_activites.php index 4dcc5db..c844b87 100644 --- a/www/admin/versements_activites.php +++ b/www/admin/versements_activites.php @@ -4,9 +4,14 @@ namespace Garradin; use Garradin\Plugin\RecusFiscaux\Utils; -// récupérer les infos du formulaire -$lesTarifs = f('tarifs'); +// vérifier si l'année a bien été sélectionnée au préalable $_SESSION['annee_recu'] = f('annee_recu'); +// error_log("va.php::annee_recu = (" .$_SESSION['annee_recu'] . ")"); +if (! isset($_SESSION['annee_recu']) || $_SESSION['annee_recu'] == "") { + \Garradin\Utils::redirect(PLUGIN_URL . 'index.php'); +} +// récupérer les infos du formulaire +$lesTarifs = f('tarifs') ?: []; // taux de réduction associés $lesTaux = array(); diff --git a/www/admin/versements_personnes.php b/www/admin/versements_personnes.php index adabb18..9f16a61 100644 --- a/www/admin/versements_personnes.php +++ b/www/admin/versements_personnes.php @@ -4,8 +4,13 @@ namespace Garradin; use Garradin\Plugin\RecusFiscaux\Utils; -// liste des versements totaux par personne +// vérifier si l'année a bien été sélectionnée au préalable $_SESSION['annee_recu'] = f('annee_recu'); +// error_log("vp.php::annee_recu = (" .$_SESSION['annee_recu'] . ")"); +if (! isset($_SESSION['annee_recu']) || $_SESSION['annee_recu'] == "") { + \Garradin\Utils::redirect(PLUGIN_URL . 'index.php'); +} +// liste des versements totaux par personne $_SESSION['lesVersementsTotaux'] = Utils::getVersementsTotaux($_SESSION['annee_recu']); // préparation de l'affichage