noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 12/17: Bug #2259: MENU GESTION - opéations no


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 12/17: Bug #2259: MENU GESTION - opéations non prises en compte selon exercice sélectionné dans «Préférences»
Date: Tue, 16 May 2023 14:50:13 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 87f09a94a10c747de40ff3f716f00195813d7aef
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Mon May 1 08:34:54 2023 +0200

    Bug #2259: MENU GESTION - opéations non prises en compte selon exercice 
sélectionné dans «Préférences»
---
 include/balance_card.inc.php | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/include/balance_card.inc.php b/include/balance_card.inc.php
index a00135478..11fa290d0 100644
--- a/include/balance_card.inc.php
+++ b/include/balance_card.inc.php
@@ -25,7 +25,7 @@
 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
 $http=new HttpInput();
 
-global $g_user;
+global $g_user,$cn;
 echo '<div class="content">';
 $exercice=new Exercice($cn);
 $old='';
@@ -42,10 +42,17 @@ else
     $array['from_periode']=$limit_periode[0]->first_day();
     $array['to_periode']=$limit_periode[1]->last_day();
     if (isset($_GET['ex']))
-      {
-       $limit_periode=$per->get_limit($http->get('ex','number'));
-       $array['from_periode']=$limit_periode[0]->first_day();
-      }
+    {
+        $ex=$http->get('ex','number');
+        $limit_periode=$per->get_limit($ex);
+
+        // if user's preference is greater $ex than I need operation until $ex 
otherwise since $ex
+        if ( $ex > $year) {
+            $array['to_periode']=$limit_periode[0]->last_day();
+        } else {
+            $array['from_periode']=$limit_periode[0]->first_day();
+        }
+    }
 
     /*
      * Add button to select another year



reply via email to

[Prev in Thread] Current Thread [Next in Thread]