Expressions can be any valid python expressions.
The following special elements are recognized in
the expressions to compute accounting data:
{bal|crd|deb|pbal|nbal}{pieu}[account
selector][journal items domain]
.
-
bal, crd, deb, pbal, nbal
: balance, debit, credit, positive balance,
negative balance.
-
p, i, e
: respectively variation over the period,
initial balance, ending balance
-
The
account selector
is a like expression on the account code (eg
70%, etc).
-
The
journal items domain
is an Flectra domain filter on journal items.
-
balu[]
: (u for unallocated) is a special
expression that shows the unallocated
profit/loss of previous
fiscal years.
Expressions can involve other KPI, sub KPI and
query results by name (eg kpi1 + kpi2,
kpi2.subkpi1, query1.field1).
Additionally following variables are available
in the evaluation context:
-
sum, min, max, len, avg
: behave as expected, very similar to the
python builtins.
-
datetime, datetime, dateutil
: the python modules.
-
date_from, date_to
: beginning and end date of the period.
-
AccountingNone
: a null value that behaves as 0 in
arithmetic operations.