noalyss
Version-9
include
stock_histo.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
26
*
27
*/
28
if
( ! defined (
'ALLOWED'
) ) die(
'Appel direct ne sont pas permis'
);
29
global
$g_user
,
$cn
,
$g_parameter
;
30
$http
=
new
HttpInput
();
31
$stock
=
new
Stock
(
$cn
);
32
$array
=
$_GET
;
33
if
( ! isset (
$array
[
'wdate_start'
]) || ! isset (
$array
[
'wdate_end'
]))
34
{
35
// Date start / end
36
$exercice
=
$g_user
->get_exercice();
37
$periode
=
new
Periode
(
$cn
);
38
list(
$periode_start
,
$periode_end
) =
$periode
->get_limit(
$exercice
);
39
40
$array
[
'wdate_start'
] =
$periode_start
->first_day();
41
$array
[
'wdate_end'
] =
$periode_end
->last_day();
42
}
43
44
$stock
->history(
$array
);
45
46
?>
$periode
$periode
Definition:
ajax_display_letter.php:48
$exercice
catch(Exception $e) $exercice
Definition:
ajax_display_letter.php:45
$_GET
$_GET['qcode']
Definition:
category_followup.inc.php:53
HttpInput
manage the http input (get , post, request) and extract from an array
Definition:
http_input.class.php:38
Periode
For the periode tables parm_periode and jrn_periode.
Definition:
periode.class.php:33
Stock
manage the stocks
Definition:
stock.class.php:37
$periode_start
$periode_start
Definition:
fiche.inc.php:50
$periode_end
$periode_end
Definition:
fiche.inc.php:51
$g_user
global $g_user
Definition:
stock_histo.inc.php:29
$cn
global $cn
Definition:
stock_histo.inc.php:29
$http
$http
Definition:
stock_histo.inc.php:30
$stock
$stock
Definition:
stock_histo.inc.php:31
$array
$array
Definition:
stock_histo.inc.php:32
$g_parameter
global $g_parameter
Definition:
stock_histo.inc.php:29