Difference between revisions of "CommonFormula"
(→%NOW_DATE) |
m (→variables) |
||
Line 38: | Line 38: | ||
==%PILOT== | ==%PILOT== | ||
pilot id | pilot id | ||
+ | ==%USER_ID== | ||
+ | user id | ||
==%LASTNAME== | ==%LASTNAME== | ||
member lastname | member lastname | ||
Line 44: | Line 46: | ||
==%NOW_DATE== | ==%NOW_DATE== | ||
current date (format is YYYY-MM-DD hh:mm:ss) | current date (format is YYYY-MM-DD hh:mm:ss) | ||
− | |||
==%START_DATE== | ==%START_DATE== | ||
Date of flight beginning (format is YYYY-MM-DD hh:mm:ss) | Date of flight beginning (format is YYYY-MM-DD hh:mm:ss) | ||
− | |||
==%USER_TZ== | ==%USER_TZ== | ||
member timezone | member timezone | ||
==%ENTITY_TZ== | ==%ENTITY_TZ== | ||
structure/entity timezone | structure/entity timezone |
Revision as of 17:51, 10 May 2010
Contents
conditional processing
(test) ? true-case : false-case
conditional processing with operator OR/AND
( test1 OR test2 ) ? true-case : false-case ( test1 AND test2 ) ? true-case : false-case
functions
max(a,b)
return the maximum between a and b
min(a,b)
return the minimum between a and b
abs(a)
return the absolute value of a
roundCeil(a,b)
return the a value round top to b
Example:
roundCeil(106,5) return 110
getAccount(a, %PILOT)
return the account id of the account type id "a" from the member %PILOT
Example:
getAccount(1, %PILOT) return 4
getBalance(a)
return the balance of the account a Example:
getBalance(1) return 25.01 getBalance(getAccount(1, %PILOT)) return 35.01
variables
%DURATION
flight time input into the form
%COUNTER_DEPARTURE
counter departure input into the form
%COUNTER_ARRIVAL
counter arrival input into the form
%PILOT
pilot id
%USER_ID
user id
%LASTNAME
member lastname
%FIRSTNAME
member firstname
%NOW_DATE
current date (format is YYYY-MM-DD hh:mm:ss)
%START_DATE
Date of flight beginning (format is YYYY-MM-DD hh:mm:ss)
%USER_TZ
member timezone
%ENTITY_TZ
structure/entity timezone