[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/01: Task #1046 - Bug dans les stock
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/01: Task #1046 - Bug dans les stock |
Date: |
Sun, 09 Nov 2014 22:23:37 +0000 |
sparkyx pushed a commit to tag rel6722
in repository noalyss.
commit f448475c2c1b2335e5a10820476987c42d1af441
Author: Dany De Bontridder <address@hidden>
Date: Sun Nov 9 23:18:15 2014 +0100
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 dd1a8f9..4bd6f33 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 db1d19c..7c44048 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)