From f448475c2c1b2335e5a10820476987c42d1af441 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 23:18:15 +0100 Subject: [PATCH 1/2] Task #1046 - Bug dans les stock --- include/class_stock.php | 5 +++-- include/class_user.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/class_stock.php b/include/class_stock.php index dd1a8f981..4bd6f3384 100644 --- a/include/class_stock.php +++ b/include/class_stock.php @@ -328,8 +328,9 @@ class Stock extends Stock_Sql sg_type='c' and j_id is null and r_id in (select r_id from profile_sec_repository where p_id=$1) - and sg_date <= to_date($2,'DD.MM.YYYY') - group by r_id,trim(sg_code),f_id + and sg_date >= ( select min(p_start) from parm_periode where p_exercice=$2) + and sg_date <= ( select max(p_end) from parm_periode where p_exercice=$2) + group by r_id,trim(sg_code),f_id "; $cn->exec_sql($sql_repo_detail, array($g_user->get_profile(), $periode->p_exercice)); return $tmp_id; diff --git a/include/class_user.php b/include/class_user.php index db1d19c7d..7c4404878 100644 --- a/include/class_user.php +++ b/include/class_user.php @@ -799,7 +799,7 @@ class User $r=array(); if ($p_access=='R') { - $r=$this->db->get_array("select u.r_id,r_name + $r=$this->db->get_array("select distinct u.r_id,r_name from profile_sec_repository as u join stock_repository as s on(u.r_id=s.r_id) @@ -811,7 +811,7 @@ class User } if ($p_access == 'W') { - $r=$this->db->get_array("select u.r_id,r_name + $r=$this->db->get_array("select distinct u.r_id,r_name from profile_sec_repository as u join stock_repository as s on(u.r_id=s.r_id) From da0183374065c88dfe7baece4f29bdff40f458c3 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 23:37:02 +0100 Subject: [PATCH 2/2] Version 6.7.2.2 --- html/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/index.php b/html/index.php index a71fc7705..42e128c9f 100644 --- a/html/index.php +++ b/html/index.php @@ -203,7 +203,7 @@ if ( strlen(domaine) > 0 ) echo ' -version 6.7.2.1 - '.$my_domain.' +version 6.7.2.2 - '.$my_domain.'