noalyss Version-9
stock_state.inc.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * NOALYSS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * NOALYSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with NOALYSS; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21// Copyright Author Dany De Bontridder danydb@aevalys.eu
22
23/**
24 * @file
25 * @brief show the state of the repository
26 *
27 */
28if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
30
31// Show the form
32// Get by exercice
33// Get type = table or list
34$iexercice=new ISelect('state_exercice');
35$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");
36$per=new Periode($cn,$g_user->get_periode());
37$per->load();
38$date_limit=$per->limit_year($per->p_exercice);
39$last_day=$per->last_day($date_limit['end']);
40$last_day=format_date($last_day,'DD.MM.YYYY','YYYY-MM-DD');
41$iexercice->selected=(isset($_GET['state_exercice']))?$_GET['state_exercice']:$last_day;
42
43$presentation=new ISelect("present");
44$presentation->value=array (
45 array("value"=>"T","label"=>"Tableau récapitulatif"),
46 array("value"=>"L","label"=>"Liste")
47);
48$presentation->selected=(isset($_GET['present']))?$_GET['present']:"T";
49require_once NOALYSS_TEMPLATE.'/stock_state_search.php';
50
52
53
54$stock->summary($_GET);
55
56?>
format_date($p_date, $p_from_format='YYYY-MM-DD', $p_to_format='DD.MM.YYYY')
format the date, when taken from the database the format is MM-DD-YYYY
Definition: ac_common.php:852
$_GET['qcode']
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
For the periode tables parm_periode and jrn_periode.
manage the stocks
Definition: stock.class.php:37
$last_day
global $g_user
global $cn
$date_limit
$presentation
global $g_parameter
$iexercice