[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 30/86: RECONCILE : remove direct access to
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 30/86: RECONCILE : remove direct access to |
Date: |
Thu, 19 Sep 2024 02:41:51 -0400 (EDT) |
sparkyx pushed a commit to branch unstable
in repository noalyss.
commit 2cd3b8f35b7fa107976da12f69fc1df9ed788b6c
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Wed Sep 4 22:02:00 2024 +0200
RECONCILE : remove direct access to
---
include/impress_rec.inc.php | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/include/impress_rec.inc.php b/include/impress_rec.inc.php
index fbd85718b..b8fba55dd 100644
--- a/include/impress_rec.inc.php
+++ b/include/impress_rec.inc.php
@@ -23,9 +23,9 @@
* \brief print the all the operation reconciled or not, with or without the
same amount
*/
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
-require_once NOALYSS_INCLUDE.'/lib/function_javascript.php';
-global $g_user;
+global $g_user;
+$http=new HttpInput();
/**
*@file
*/
@@ -44,12 +44,21 @@ echo '<br/>';
/*
* Limit by date, default current exercice
*/
-list($start,$end)=$g_user->get_limit_current_exercice();
+$error=0;
$dstart=new IDate('p_start');
-$dstart->value=(isset($_REQUEST['p_start']))?$_REQUEST['p_start']:$start;
-
$dend=new IDate('p_end');
-$dend->value=(isset($_REQUEST['p_end']))?$_REQUEST['p_end']:$end;
+list($start,$end)=$g_user->get_limit_current_exercice();
+
+try {
+ $dstart->value=$http->request('p_start','date',$start);
+
+ $dend->value=$http->request('p_end','date',$end);
+
+} catch (\Exception $e) {
+ echo_warning('Date invalide');
+ $error=1;
+
+}
echo "Opérations entre ".$dstart->input()." jusque ".$dend->input();
echo '<ol style="list-style-type:none;">';
@@ -82,6 +91,7 @@ echo '</div>';
echo '</div>';
echo '<div class="content">';
if ( ! isset($_GET['vis'])) return;
+if ($error == 1) return;
$acc_reconciliation=new Acc_Reconciliation($cn);
$acc_reconciliation->a_jrn=$r_jrn;
$acc_reconciliation->start_day=$dstart->value;
- [Noalyss-commit] [noalyss] 11/86: PHP8.2 compatility : strip_tags null, (continued)
- [Noalyss-commit] [noalyss] 11/86: PHP8.2 compatility : strip_tags null, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 20/86: C0MENU : bug javascript Uniquement note de débit ou crédit ne fonctionne pas, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 76/86: Merge branch 'pre-stable' into stable, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 26/86: Cosmetic add inner_box2, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 43/86: Fix Create user , password not set, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 02/86: Merge branch 'pre-stable' into stable, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 14/86: Cosmetic #0002375: Menu COMPTA/LET/LETCARD : le nom de la fiche n'apparaît pas., dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 13/86: PHP8.2 compatility : strip_tags null, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 22/86: Cosmetic, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 24/86: Cosmetic add inner_box2, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 30/86: RECONCILE : remove direct access to,
dwm <=
- [Noalyss-commit] [noalyss] 29/86: Cosmetic improve widget bookmark color for hover, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 33/86: RECONCILE : remove direct access to, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 37/86: RECONCILE : VAT ND not in account, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 40/86: Fix bug CSV for P1TVA , wrong header, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 46/86: Bug : some db doesn't have the view v_quant_detail, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 49/86: Improve message, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 55/86: Merge branch 'stable' into unstable, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 57/86: Bug : when only one extension, it fails, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 50/86: Translation, dwm, 2024/09/19
- [Noalyss-commit] [noalyss] 63/86: Bug : when only one extension, it fails, dwm, 2024/09/19