noalyss Version-9
|
contains function for the parsing and computing formulae . More...
Static Public Member Functions | |
static | array_to_csv ($array, $aheader, $p_filename) |
with the handle of a successull query, echo each row into CSV and send it directly More... | |
static | check_formula ($p_string) |
static | compute_amount ($p_cn, $p_expression, $p_cond_sql, $p_cond_anc_sql) |
compute the amount of the accounting ,analytic accounting or a card, the SQL condition from sql_filter_per must be transformed for ANALYTIC ACCOUNT More... | |
static | compute_periode ($p_cn, $p_from, $p_end) |
make the condition SQL for filtering on the period More... | |
static | find_computing_mode ($p_formula) |
return what to consider More... | |
static | parse_formula ($p_cn, $p_label, $p_formula, $p_start, $p_end, $p_eval=true, $p_type_date=0, $p_sql="") |
Data Fields | |
const | STR_PATTERN ="([\[\{]{1,2}[[:alnum:]]*%*(-[c,d,s,S]){0,1}[\]\}]{1,2})" |
< string pattern to use More... | |
contains function for the parsing and computing formulae .
Test are in scenario/test_parse_formula.php
Definition at line 31 of file impress.class.php.
|
static |
with the handle of a successull query, echo each row into CSV and send it directly
type | $array | of data |
type | $aheader | double array, each item of the array contains a key type (num) and a key title |
Definition at line 241 of file impress.class.php.
References $array, $e, $i, $row, and $value.
Referenced by Anc_GrandLivre\display_csv().
|
static |
Definition at line 170 of file impress.class.php.
References noalyss_str_replace().
Referenced by Acc_Report_MTable\check(), Forecast_Item_MTable\check(), and parse_formula().
|
static |
compute the amount of the accounting ,analytic accounting or a card, the SQL condition from sql_filter_per must be transformed for ANALYTIC ACCOUNT
DatabaseCore | $p_cn | |
string | $p_expression | part of a formula |
string | $p_cond_sql | SQL cond for accountancy |
string | $p_cond_sql | SQL cond for analytic accountancy |
Transform the $p_cond_sql , it comes from sql_filter_per
Definition at line 377 of file impress.class.php.
References $detail, $fiche, $res, elseif, find_computing_mode(), and noalyss_str_replace().
Referenced by parse_formula().
|
static |
make the condition SQL for filtering on the period
\DatabaseCore | $p_cn | |
int | $p_from | periode id |
int | $p_end | until periode id |
Exception |
Definition at line 320 of file impress.class.php.
References $current_exercice, $first_day, $last_day, $oPeriode, $p_end, and sql_filter_per().
Referenced by parse_formula().
|
static |
return what to consider
string | $p_formula |
Definition at line 293 of file impress.class.php.
References elseif.
Referenced by compute_amount().
|
static |
Definition at line 52 of file impress.class.php.
References $amount, $e, $from, $g_user, $line, $p_end, $p_start, $result, check_formula(), compute_amount(), compute_periode(), elseif, noalyss_str_replace(), remove_divide_zero(), sql_filter_per(), and STR_PATTERN.
Referenced by Acc_Bilan\compute_formula(), Anticipation\display(), and Acc_Report\get_row().
const Impress::STR_PATTERN ="([\[\{]{1,2}[[:alnum:]]*%*(-[c,d,s,S]){0,1}[\]\}]{1,2})" |
< string pattern to use
Definition at line 34 of file impress.class.php.
Referenced by parse_formula().