Improve Acc_Bilan::warning

This commit is contained in:
Dany De Bontridder 2016-12-04 01:05:01 +01:00
parent 30471764f4
commit 57157f8dc4

View file

@ -95,8 +95,9 @@ class Acc_Bilan
private function warning($p_message,$p_type,$p_deb)
{
$sql="select distinct pcm_val,pcm_lib
from tmp_pcmn join jrnx on (pcm_val=j_poste) where pcm_type='$p_type'";
$sql .= "and ".sql_filter_per($this->db,$this->from,$this->to,'p_id','j_tech_per');
from tmp_pcmn where exists (select pcm_val from jrnx where pcm_val=j_poste and
".sql_filter_per($this->db,$this->from,$this->to,'p_id','j_tech_per')."
) and pcm_type='$p_type'";
$res=$this->db->exec_sql($sql);
if ( Database::num_row($res) ==0 )