Number Functions

ABS(A)

Absolute value of number A

ABS( quantity )

MAX(A, B, ...)

Maximum value of values A, B, ...

MAX( price1, price2, price3 )

MIN(A, B, ...)

Minimum value of values A, B, ...

MIN( price1, price2, price3 )

NUM(N, D)

Print number N with D digits, pad with leading zeroes

NUM( index, 4 )

NUM(N, D, P)

Print number N with D digits and P decimal places, pad with leading and trailing zeroes

NUM( quantity, 0, 2 )

CURR(N, D)

Print currency N with D digits, pad with leading zeroes

CURR( quantity, 4 )

CURR(N, D, P)

Print currency N with D digits and P decimal places, pad with leading and trailing zeroes

CURR( price, 0, 2 )

ROUND(D, S)

Rounds decimal number D with S scale, rounding half up

ROUND( quantity * price, 2 )