';
- exit();
-}
-
-// Show the possible years
-$sql="select distinct (p_exercice) as exercice from parm_periode ";
-$Res=$cn->exec_sql($sql);
-$r="";
-for ( $i = 0; $i < Database::num_row($Res);$i++)
-{
- $l=Database::fetch_array($Res,$i);
- $url=sprintf("?ac=".$_REQUEST['ac']."&year=%d&".dossier::get(),
- $l['exercice']);
- $r.=HtmlInput::button_anchor($l['exercice'],$url);
-}
-// Check if User Can see the stock
-
-
-// Show the current stock
-echo '
';
- $row=td('Description');
- $row.=td(' ');
- $r.=tr($row);
- $row=td('Valeur(positive pour IN ou négative comme OUT)');
- $row.=td(' ');
- $r.=tr($row);
- $row=td('Date');
- $row.=td(' ');
- $r.=tr($row);
- $r.='
';
- $r.='
- ';
-
- return $r;
-
-}
-/*!
- * \brief return the quantity of a sg_code for the period
- *
- * \return number or NULL
- */
-function GetQuantity($p_cn,$p_sg_code,$p_year,$p_type)
-{
- $sql="select sum(sg_quantity) as result
- from stock_goods
- left join jrnx on (stock_goods.j_id=jrnx.j_id)
- left join parm_periode on (parm_periode.p_id=jrnx.j_tech_per)
- where
- sg_code='$p_sg_code' and
- (p_exercice = '$p_year' or to_char(sg_date::timestamp,'YYYY')='$p_year') and
- sg_type='$p_type'";
- $Res=$p_cn->exec_sql($sql);
- if ( Database::num_row($Res)== 0) return null;
- $value=Database::fetch_array($Res,0);
- return $value['result'];
-
-}