Fix last small bug for printing
This commit is contained in:
parent
e69411f25f
commit
b809cacbb6
3 changed files with 6 additions and 6 deletions
|
|
@ -199,10 +199,10 @@ class Print_Ledger {
|
|||
where
|
||||
uj_login=$1
|
||||
and uj_priv in ('R','W')
|
||||
order by jrn_def_name
|
||||
and ( jrn_enable=1
|
||||
or
|
||||
exists (select 1 from jrn where jr_tech_per in (select p_id from parm_periode where p_exercice=$2))
|
||||
exists (select 1 from jrn where jr_def_id=jrn_def_id and jr_tech_per in (select p_id from parm_periode where p_exercice=$2)))
|
||||
order by jrn_def_name
|
||||
";
|
||||
$a_jrn=$cn->get_array($sql, array($g_user->login, $exercice));
|
||||
}
|
||||
|
|
@ -211,7 +211,7 @@ class Print_Ledger {
|
|||
$a_jrn=$cn->get_array("select jrn_def_id
|
||||
from jrn_def join jrn_type on jrn_def_type=jrn_type_id
|
||||
where
|
||||
jrn_enable=1 or exists(select 1 from jrn where jr_tech_per in (select p_id from parm_periode where p_exercice=$1))
|
||||
jrn_enable=1 or exists(select 1 from jrn where jr_def_id=jrn_def_id and jr_tech_per in (select p_id from parm_periode where p_exercice=$1))
|
||||
order by jrn_def_name
|
||||
", [$exercice]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ $g_user->Check();
|
|||
$g_user->check_dossier($gDossier);
|
||||
|
||||
// Security
|
||||
if ($g_user->check_jrn($jrn_id) == 'X') {
|
||||
if ($jrn_id != 0 && $g_user->check_jrn($jrn_id) == 'X') {
|
||||
/* Cannot Access */
|
||||
NoAccess();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,10 +50,10 @@ if ($g_user->Admin() == 0 && $g_user->is_local_admin() == 0 && $g_user->get_sta
|
|||
where
|
||||
uj_login=$1
|
||||
and uj_priv in ('R','W')
|
||||
order by jrn_def_name
|
||||
and ( jrn_enable=1
|
||||
or
|
||||
exists (select 1 from jrn where jr_tech_per in (select p_id from parm_periode where p_exercice=$2))
|
||||
exists (select 1 from jrn where jr_tech_per in (select p_id from parm_periode where p_exercice=$2)))
|
||||
order by jrn_def_name
|
||||
";
|
||||
$ret = $cn->make_array($sql,0,array($g_user->login,$exercice));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue