noalyss Version-9
|
this class handle the different bilan, from the table bilan, parse the form and replace in the template More...
Public Member Functions | |
__construct ($p_cn) | |
compute_formula ($p_handle) | |
Compute all the formula. More... | |
display_form ($p_filter_year="") | |
return a string with the form for selecting the periode and the type of bilan More... | |
file_open_form () | |
open the file of the form More... | |
file_open_template () | |
open the file with the template More... | |
generate () | |
generate the document and send it to the browser More... | |
generate_odt () | |
generate the ods document More... | |
generate_plain ($p_file) | |
generate the plain file (rtf,txt, or html) More... | |
get_request_get () | |
get data from the $_GET More... | |
load () | |
load from the database the document data More... | |
send ($p_result) | |
send the result of generate plain to the browser More... | |
verify () | |
verify that the saldo is good for the type of account More... | |
Static Public Member Functions | |
static | test_me () |
Data Fields | |
$b_id | |
$db | |
$from | |
$to | |
Private Member Functions | |
filter_date () | |
compute the where clause for filtering with the date More... | |
warning ($p_message, $p_type, $p_deb) | |
check and warn if an accound has the wrong saldo More... | |
this class handle the different bilan, from the table bilan, parse the form and replace in the template
Definition at line 33 of file acc_bilan.class.php.
Acc_Bilan::__construct | ( | $p_cn | ) |
Definition at line 40 of file acc_bilan.class.php.
References db.
Acc_Bilan::compute_formula | ( | $p_handle | ) |
Compute all the formula.
$p_handle | the handle to the file |
param
Definition at line 377 of file acc_bilan.class.php.
References $a, $b, $g_parameter, db, from, noalyss_str_replace(), noalyss_strlentrim(), Impress\parse_formula(), and to.
Referenced by generate().
Acc_Bilan::display_form | ( | $p_filter_year = "" | ) |
return a string with the form for selecting the periode and the type of bilan
$p_filter_year | filter on a year |
Definition at line 51 of file acc_bilan.class.php.
References $dossier_id, $from, $from_periode, $g_parameter, $msg, $periode, $periode_end, $periode_start, $r, $to, $to_periode, $w, HtmlInput\anchor(), db, echo_warning(), elseif, Dossier\id(), and td().
Acc_Bilan::file_open_form | ( | ) |
open the file of the form
Definition at line 345 of file acc_bilan.class.php.
References $form.
Referenced by generate().
Acc_Bilan::file_open_template | ( | ) |
open the file with the template
Definition at line 357 of file acc_bilan.class.php.
Referenced by generate().
|
private |
compute the where clause for filtering with the date
Exception | if one of the dates is not valid |
Definition at line 826 of file acc_bilan.class.php.
References $from, $g_parameter, format_date(), from, isDate(), and to.
Referenced by verify(), and warning().
Acc_Bilan::generate | ( | ) |
generate the document and send it to the browser
Definition at line 632 of file acc_bilan.class.php.
References $form, $result, compute_formula(), file_open_form(), file_open_template(), generate_odt(), generate_plain(), load(), and send().
Acc_Bilan::generate_odt | ( | ) |
generate the ods document
the | handle to the template file |
Definition at line 413 of file acc_bilan.class.php.
References $a, $dirname, $r, $ret, $tmp, db, header_txt(), and noalyss_str_replace().
Referenced by generate().
Acc_Bilan::generate_plain | ( | $p_file | ) |
generate the plain file (rtf,txt, or html)
the | handle to the template file |
Definition at line 544 of file acc_bilan.class.php.
References $a, $r, $ret, convert_to_rtf(), db, header_txt(), and noalyss_str_replace().
Referenced by generate().
Acc_Bilan::get_request_get | ( | ) |
get data from the $_GET
Definition at line 299 of file acc_bilan.class.php.
References $g_parameter, $http, from, and to.
Acc_Bilan::load | ( | ) |
load from the database the document data
Definition at line 316 of file acc_bilan.class.php.
References $array, $res, $sql, db, DatabaseCore\fetch_array(), DatabaseCore\num_row(), and record_log().
Referenced by generate().
Acc_Bilan::send | ( | $p_result | ) |
send the result of generate plain to the browser
$p_result | is the string returned by generate_... |
Definition at line 670 of file acc_bilan.class.php.
References $a, $dirname, and $res.
Referenced by generate().
|
static |
Definition at line 785 of file acc_bilan.class.php.
References $_GET, $a, $cn, $form, $r, Dossier\connect(), HtmlInput\hidden(), and HtmlInput\submit().
Acc_Bilan::verify | ( | ) |
verify that the saldo is good for the type of account
Definition at line 195 of file acc_bilan.class.php.
References $diff, $g_parameter, $res, $result, db, DatabaseCore\fetch_array(), filter_date(), from, sql_filter_per(), td(), to, tr(), and warning().
|
private |
check and warn if an accound has the wrong saldo
$p_message | legend of the fieldset |
$p_type | type of the Acccount ACT actif, ACTINV... |
$p_type | the saldo must debit or credit |
Definition at line 116 of file acc_bilan.class.php.
References $count, $exercice, $g_parameter, $i, $line, $obj, $periode, $res, $ret, $sql, db, DatabaseCore\fetch_array(), filter_date(), from, h, DatabaseCore\num_row(), sql_filter_per(), and to.
Referenced by verify().
Acc_Bilan::$b_id |
id of the bilan (bilan.b_id)
Definition at line 36 of file acc_bilan.class.php.
Acc_Bilan::$db |
database connection
Definition at line 35 of file acc_bilan.class.php.
Acc_Bilan::$from |
from periode
Definition at line 37 of file acc_bilan.class.php.
Referenced by display_form(), and filter_date().
Acc_Bilan::$to |