diff --git a/include/class/stock.class.php b/include/class/stock.class.php index c975ee8e5..e2322b4b4 100644 --- a/include/class/stock.class.php +++ b/include/class/stock.class.php @@ -252,7 +252,14 @@ class Stock extends Stock_Sql return $sql . $clause; } - + /** + * @brief Display the status of the repository : nb of item IN / OUT and Difference + * @global $cn (Database) Db connexion + * @global $g_user (Noalyss_User) connected user + * @param $p_array (array) + * - [state_exercice] => 2025-12-31 date + - [present] => L type of presentation T table, L listing + */ function summary($p_array) { global $cn, $g_user; diff --git a/include/export/export_stock_resume_list.php b/include/export/export_stock_resume_list.php index be0975f46..0546f29d9 100644 --- a/include/export/export_stock_resume_list.php +++ b/include/export/export_stock_resume_list.php @@ -78,7 +78,7 @@ for ($r=0;$radd($a); $export->add($a_stock[$s]['qin'],"number"); $export->add($a_stock[$s]['qout'],"number"); - $export->add(bcsub($a_stock[$s]['qin'],$a_stock[$s]['qout']),"number"); + $export->add(bcsub($a_stock[$s]['qin'],$a_stock[$s]['qout'],4),"number"); $export->write(); } } diff --git a/include/stock_state.inc.php b/include/stock_state.inc.php index bb91889b8..99e11b3b7 100644 --- a/include/stock_state.inc.php +++ b/include/stock_state.inc.php @@ -28,6 +28,8 @@ if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); global $cn,$g_parameter,$g_user; +$http=new HttpInput(); + // Show the form // Get by exercice // Get type = table or list @@ -38,14 +40,14 @@ $per->load(); $date_limit=$per->limit_year($per->p_exercice); $last_day=$per->last_day($date_limit['end']); $last_day=format_date($last_day,'DD.MM.YYYY','YYYY-MM-DD'); -$iexercice->selected=(isset($_GET['state_exercice']))?$_GET['state_exercice']:$last_day; +$iexercice->selected=$http->get('state_exercice',"string",$last_day); $presentation=new ISelect("present"); $presentation->value=array ( array("value"=>"T","label"=>"Tableau récapitulatif"), array("value"=>"L","label"=>"Liste") ); -$presentation->selected=(isset($_GET['present']))?$_GET['present']:"T"; +$presentation->selected=$http->get("present","string","T"); require_once NOALYSS_TEMPLATE.'/stock_state_search.php'; $stock=new Stock($cn); diff --git a/include/template/stock_summary_list.php b/include/template/stock_summary_list.php index de8686a70..0ff4dd821 100644 --- a/include/template/stock_summary_list.php +++ b/include/template/stock_summary_list.php @@ -95,7 +95,7 @@ $a_repo=$cn->get_array("select distinct t.r_id,r_name,r_adress,r_city,r_country, - + diff --git a/include/template/stock_summary_table.php b/include/template/stock_summary_table.php index a191be1da..bd6b71e3d 100644 --- a/include/template/stock_summary_table.php +++ b/include/template/stock_summary_table.php @@ -89,7 +89,7 @@ : - +