diff --git a/html/index.php b/html/index.php index e9d25d3e6..c33b0d6eb 100644 --- a/html/index.php +++ b/html/index.php @@ -76,7 +76,7 @@ BODY {
-Version 2.0.7 +Version 2.0.7cvsIl est conseillé de ne PAS utiliser Internet Explorer.
diff --git a/include/user_action_ach.php b/include/user_action_ach.php index 28d3a17d3..c73dba3ad 100644 --- a/include/user_action_ach.php +++ b/include/user_action_ach.php @@ -163,7 +163,7 @@ $w->name="p_periode"; // filter on the current year $filter_year=" where p_exercice='".$User->getExercice()."'"; -$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); +$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); $User=new cl_user($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode(); $w->selected=$current; @@ -202,7 +202,13 @@ echo 'P // Show list of sell echo_debug ("user_action_ach.php"); // Date - date of payment - Customer - amount - $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn']; + if ( $current == -1) { + $cond=" and jr_tech_per in (select p_id from parm_periode where p_exercice='".$User->getExercice()."')"; + } else { + $cond=" and jr_tech_per=".$current; + } + + $sql=SQL_LIST_ALL_INVOICE.$cond." and jr_def_id=".$_GET['p_jrn']; $step=$_SESSION['g_pagesize']; $page=(isset($_GET['offset']))?$_GET['page']:1; diff --git a/include/user_action_fin.php b/include/user_action_fin.php index 375d691b2..2ce357154 100644 --- a/include/user_action_fin.php +++ b/include/user_action_fin.php @@ -180,7 +180,7 @@ $w=new widget("select"); // filter on the current year $filter_year=" where p_exercice='".$User->getExercice()."'"; -$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); +$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); $User=new cl_user($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode(); $w->selected=$current; @@ -192,8 +192,14 @@ echo 'P // Show list of sell echo_debug ("user_action_jrn.php"); + if ( $current == -1) { + $cond=" and jr_tech_per in (select p_id from parm_periode where p_exercice='".$User->getExercice()."')"; + } else { + $cond=" and jr_tech_per=".$current; + } + // Date - date of payment - Customer - amount - $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn']; + $sql=SQL_LIST_ALL_INVOICE.$cond." and jr_def_id=".$_GET['p_jrn']; // Nav. bar $step=$_SESSION['g_pagesize']; diff --git a/include/user_action_gl.php b/include/user_action_gl.php index 1a9041188..4613cb628 100644 --- a/include/user_action_gl.php +++ b/include/user_action_gl.php @@ -52,15 +52,20 @@ $w=new widget("select"); // filter on the current year $filter_year=" where p_exercice='".$User->getExercice()."'"; -$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); +$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode(); $w->selected=$current; echo 'Période '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider'); ?> + if ( $current == -1) { + $cond=" and jr_tech_per in (select p_id from parm_periode where p_exercice='".$User->getExercice()."')"; + } else { + $cond=" and jr_tech_per=".$current; + } -$sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current; +$sql=SQL_LIST_ALL_INVOICE.$cond; // Nav. bar $step=$_SESSION['g_pagesize']; $page=(isset($_GET['offset']))?$_GET['page']:1; diff --git a/include/user_action_ods.php b/include/user_action_ods.php index f8b2da64a..d1330dfae 100644 --- a/include/user_action_ods.php +++ b/include/user_action_ods.php @@ -175,7 +175,7 @@ $w=new widget("select"); // filter on the current year $filter_year=" where p_exercice='".$User->getExercice()."'"; -$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); +$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); $User=new cl_user($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode(); $w->selected=$current; @@ -184,7 +184,13 @@ echo 'P ?> - $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn'] ; + if ( $current == -1) { + $cond=" and jr_tech_per in (select p_id from parm_periode where p_exercice='".$User->getExercice()."')"; + } else { + $cond=" and jr_tech_per=".$current; + } + + $sql=SQL_LIST_ALL_INVOICE.$cond." and jr_def_id=".$_GET['p_jrn'] ; $step=$_SESSION['g_pagesize']; $page=(isset($_GET['offset']))?$_GET['page']:1; $offset=(isset($_GET['offset']))?$_GET['offset']:0; diff --git a/include/user_action_ven.php b/include/user_action_ven.php index 4347d8b6d..0e355e9b9 100644 --- a/include/user_action_ven.php +++ b/include/user_action_ven.php @@ -169,7 +169,7 @@ $w=new widget("select"); // filter on the current year $filter_year=" where p_exercice='".$User->getExercice()."'"; -$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); +$periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); // User is already set User=new cl_user($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode(); $w->selected=$current; @@ -206,10 +206,16 @@ echo 'P } // Show list of sell // Date - date of payment - Customer - amount - $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current." and jr_def_id=".$_GET['p_jrn'] ; - $step=$_SESSION['g_pagesize']; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; + if ( $current == -1) { + $cond=" and jr_tech_per in (select p_id from parm_periode where p_exercice='".$User->getExercice()."')"; + } else { + $cond=" and jr_tech_per=".$current; + } + + $sql=SQL_LIST_ALL_INVOICE.$cond." and jr_def_id=".$_GET['p_jrn'] ; + $step=$_SESSION['g_pagesize']; + $page=(isset($_GET['offset']))?$_GET['page']:1; + $offset=(isset($_GET['offset']))?$_GET['offset']:0; list($max_line,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1); $bar=jrn_navigation_bar($offset,$max_line,$step,$page);