noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
stock_state.inc.php
Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  *   This file is part of NOALYSS.
00005  *
00006  *   NOALYSS is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License as published by
00008  *   the Free Software Foundation; either version 2 of the License, or
00009  *   (at your option) any later version.
00010  *
00011  *   NOALYSS is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU General Public License for more details.
00015  *
00016  *   You should have received a copy of the GNU General Public License
00017  *   along with NOALYSS; if not, write to the Free Software
00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00022 
00023 /**
00024  * @file
00025  * @brief show the state of the repository
00026  *
00027  */
00028 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00029 global $cn,$g_parameter,$g_user;
00030 require_once 'class_stock.php';
00031 
00032 // Show the form
00033 // Get by exercice
00034 // Get type = table or list
00035 $iexercice=new ISelect('state_exercice');
00036 $iexercice->value=$cn->make_array("select  max(p_end) as date_end, p_exercice from parm_periode  group by p_exercice order by 2 desc");
00037 $per=new Periode($cn,$g_user->get_periode());
00038 $per->load();
00039 $date_limit=$per->limit_year($per->p_exercice);
00040 $last_day=$per->last_day($date_limit['end']);
00041 $last_day=format_date($last_day,'DD.MM.YYYY','YYYY-MM-DD');
00042 $iexercice->selected=(isset($_GET['state_exercice']))?$_GET['state_exercice']:$last_day;
00043 
00044 $presentation=new ISelect("present");
00045 $presentation->value=array (
00046                 array("value"=>"T","label"=>"Tableau récapitulatif"),
00047                 array("value"=>"L","label"=>"Liste")
00048 );
00049 $presentation->selected=(isset($_GET['present']))?$_GET['present']:"T";
00050 require_once 'template/stock_state_search.php';
00051 
00052 $stock=new Stock($cn);
00053 
00054 
00055 $stock->summary($_GET);
00056 
00057 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations