noalyss
Version-9
include
ajax
ajax_history_anc_account.php
Go to the documentation of this file.
1
<?php
2
3
/*
4
* This file is part of NOALYSS.
5
*
6
* PhpCompta 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 PhpCompta; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*/
20
// Copyright (2018) Author Dany De Bontridder <dany@alchimerys.be>
21
22
if
(!defined(
'ALLOWED'
)) die(
'Appel direct ne sont pas permis'
);
23
24
/**
25
* @file
26
* @brief Display the history of an analytic account.
27
* Receives the parameters GET:
28
- gDossier integer
29
- act history_anc_account
30
- po_id integer poste_analytic.po_id
31
- div DOM ID of the box
32
- op history
33
- exercice integer
34
*/
35
36
try
{
37
$po_id=
$http
->get(
"po_id"
,
"number"
);
38
$exercice
=
$http
->get(
"exercice"
,
"number"
);
39
$div
=
$http
->get(
"div"
);
40
}
catch
(Exception
$ex
) {
41
echo
$ex
->getTraceAsString();
42
throw
$ex
;
43
}
44
$poste_analytic
=
new
Poste_analytique_SQL
(
$cn
, $po_id);
45
46
$anc_grandlivre
=
new
Anc_GrandLivre
(
$cn
);
47
48
$anc_grandlivre
->from_poste=
$poste_analytic
->po_name;
49
$anc_grandlivre
->to_poste=
$poste_analytic
->po_name;
50
51
// Find the first and last periode
52
$periode
=
new
Periode
(
$cn
);
53
$a_periode_limit
=
$periode
->limit_year(
$exercice
);
54
55
// Find the first day
56
$first_day
=
$periode
->first_day(
$a_periode_limit
[
'start'
]);
57
58
// find the last day
59
$last_day
=
$periode
->last_day(
$a_periode_limit
[
'end'
]);
60
61
$anc_grandlivre
->from=
$first_day
;
62
$anc_grandlivre
->to=
$last_day
;
63
64
echo
HtmlInput::title_box
(
$poste_analytic
->getp(
"po_name"
),
$div
,
"close"
,
""
,
"n"
);
65
66
echo
$anc_grandlivre
->display_html(0);
67
$anc_grandlivre
->pa_id=
$poste_analytic
->pa_id;
68
echo
$anc_grandlivre
->button_export_csv();
69
echo
HtmlInput::button_close
(
$div
);
70
$http
$http
Definition:
action.common.inc.php:33
$cn
$cn
Definition:
ajax_anc_accounting.php:30
$first_day
$first_day
Definition:
ajax_history_anc_account.php:56
$last_day
$last_day
Definition:
ajax_history_anc_account.php:59
$anc_grandlivre
$anc_grandlivre
Definition:
ajax_history_anc_account.php:46
$poste_analytic
catch(Exception $ex) $poste_analytic
Definition:
ajax_history_anc_account.php:44
$periode
$periode
Definition:
ajax_history_anc_account.php:52
$div
$div
Definition:
ajax_history_anc_account.php:39
$a_periode_limit
$a_periode_limit
Definition:
ajax_history_anc_account.php:53
$exercice
$exercice
Definition:
ajax_history_anc_account.php:38
$ex
$ex
Definition:
balance.inc.php:45
Anc_GrandLivre
report he Grand Livre for analytic
Definition:
anc_grandlivre.class.php:31
HtmlInput\button_close
static button_close($div_name, $class='smallbutton')
close button for the HTML popup
Definition:
html_input.class.php:464
HtmlInput\title_box
static title_box($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n')
Title for boxes, you can customize the symbol thanks symbol with the mode "custom".
Definition:
html_input.class.php:874
Periode
For the periode tables parm_periode and jrn_periode.
Definition:
periode.class.php:33
Poste_analytique_SQL
abstract of the table public.poste_analytique
Definition:
poste_analytique_sql.class.php:34