Bug #2259: MENU GESTION - opéations non prises en compte selon exercice sélectionné dans «Préférences»

This commit is contained in:
sparkyx 2023-05-01 08:34:54 +02:00
parent a465e258d6
commit 87f09a94a1

View file

@ -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='';
@ -43,9 +43,16 @@ else
$array['to_periode']=$limit_periode[1]->last_day();
if (isset($_GET['ex']))
{
$limit_periode=$per->get_limit($http->get('ex','number'));
$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