Correction stock : calcul résumé table + liste

This commit is contained in:
Dany De Bontridder 2012-06-28 22:54:49 +00:00
parent 979a49c75a
commit 79ecf702c2
4 changed files with 71 additions and 40 deletions

View file

@ -54,7 +54,9 @@
$n_in=0;$n_out=0;
for ($e = 0; $e < count($a_repository); $e++):
$array = $cn->get_array("select * from tmp_stockgood_detail where r_id=$1 and sg_code=$2 and s_id=$3"
$array = $cn->get_array("select coalesce(sum(s_qin)) as s_qin,coalesce(sum(s_qout)) as s_qout
from tmp_stockgood_detail
where r_id=$1 and sg_code=$2 and s_id=$3"
, array($a_repository[$e]['r_id'], $a_code[$x]['sg_code'],$tmp_id));
?>
<td>