28if ( ! defined (
'ALLOWED') ) die(
'Appel direct ne sont pas permis');
36$export->write_header(array(_(
"Depot"),_(
"Adresse"),_(
"Ville"),_(
"Pays"),_(
"Code Stock"),_(
"Fiches"),_(
"IN"),_(
"OUT"),_(
"Delta")));
38$a_repo=
$cn->get_array(
"select distinct t.r_id,r_name,r_adress,r_city,r_country from stock_repository as s join tmp_stockgood_detail as t
46 $a_stock=
$cn->get_array(
48 select coalesce(sum(s_qin),0) as qin,coalesce(sum(s_qout),0) as qout,sg_code
49 from tmp_stockgood_detail where r_id=$1 and s_id=$2
54 for (
$s=0;
$s<count($a_stock);
$s++){
58 select f_id,vw_name,quick_code
62 select distinct f_id from fiche_detail
66 order by vw_name,quick_code
67 ",array($a_stock[
$s][
'sg_code']));
74 for ( $c=0;$c<count(
$a_card);$c++) {
77 if ( count(
$a_card)== 0 )
$a=
' Erreur Code non utilisé';
79 $export->add($a_stock[
$s][
'qin'],
"number");
80 $export->add($a_stock[
$s][
'qout'],
"number");
81 $export->add(bcsub($a_stock[
$s][
'qin'],$a_stock[
$s][
'qout']),
"number");
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
Manage the CSV : manage files and write CSV record.