Bug #2259: MENU GESTION - opéations non prises en compte selon exercice sélectionné dans «Préférences»
This commit is contained in:
parent
a465e258d6
commit
87f09a94a1
1 changed files with 12 additions and 5 deletions
|
|
@ -25,7 +25,7 @@
|
||||||
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
|
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
|
||||||
$http=new HttpInput();
|
$http=new HttpInput();
|
||||||
|
|
||||||
global $g_user;
|
global $g_user,$cn;
|
||||||
echo '<div class="content">';
|
echo '<div class="content">';
|
||||||
$exercice=new Exercice($cn);
|
$exercice=new Exercice($cn);
|
||||||
$old='';
|
$old='';
|
||||||
|
|
@ -42,10 +42,17 @@ else
|
||||||
$array['from_periode']=$limit_periode[0]->first_day();
|
$array['from_periode']=$limit_periode[0]->first_day();
|
||||||
$array['to_periode']=$limit_periode[1]->last_day();
|
$array['to_periode']=$limit_periode[1]->last_day();
|
||||||
if (isset($_GET['ex']))
|
if (isset($_GET['ex']))
|
||||||
{
|
{
|
||||||
$limit_periode=$per->get_limit($http->get('ex','number'));
|
$ex=$http->get('ex','number');
|
||||||
$array['from_periode']=$limit_periode[0]->first_day();
|
$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
|
* Add button to select another year
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue