noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
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
32
33// Show the form
34// Get by exercice
35// Get type = table or list
36$iexercice=new ISelect('state_exercice');
37$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");
38$per=new Periode($cn,$g_user->get_periode());
39$per->load();
40$date_limit=$per->limit_year($per->p_exercice);
41$last_day=$per->last_day($date_limit['end']);
42$last_day=format_date($last_day,'DD.MM.YYYY','YYYY-MM-DD');
43$iexercice->selected=$http->get('state_exercice',"string",$last_day);
44
45$presentation=new ISelect("present");
46$presentation->value=array (
47 array("value"=>"T","label"=>"Tableau récapitulatif"),
48 array("value"=>"L","label"=>"Liste")
49);
50$presentation->selected=$http->get("present","string","T");
51require_once NOALYSS_TEMPLATE.'/stock_state_search.php';
52
54
55
56$stock->summary($_GET);
57
58?>
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
global $g_parameter
global $g_user
if no group available , then stop
$_GET['qcode']
manage the http input (get , post, request) and extract from an array
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
manage the stocks
$stock
$date_limit
$presentation