FIX BUG in sql_filter_per for the centralized printing
This commit is contained in:
parent
100b178a54
commit
da7bb87867
1 changed files with 3 additions and 1 deletions
|
|
@ -518,7 +518,9 @@ function sql_filter_per($p_cn,$p_from,$p_to,$p_form='p_id',$p_field='jr_tech_per
|
|||
$p_to=($a_end==null)?'01.01.2100':$a_end['p_end'];
|
||||
}
|
||||
if ( $p_from == $p_to )
|
||||
$periode=" $p_field = to_date('$p_from','DD.MM.YYYY') ";
|
||||
$periode=" $p_field = (select p_id from parm_periode ".
|
||||
" where ".
|
||||
" p_start = to_date('$p_from','DD.MM.YYYY')) ";
|
||||
else
|
||||
$periode = "$p_field in (select p_id from parm_periode ".
|
||||
" where p_start >= to_date('$p_from','DD.MM.YYYY') and p_end <= to_date('$p_to','DD.MM.YYYY')) ";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue