Base Tag Library

calc

Let's you perform calculations with b@se tags

Example

[%calc [@grand_total@] - [@sub_total@] + 10 * 2 /%]

Usage

The calc tag lets you perform arithmetic on base tags and static integers for a variety of results.

You can perform calculations between static values, base tags, results from formatting with any of the operators below.

This can also be combined with the set tag for more advanced calculations

calc Parameters

Name Description
* Multiply
/ Divide
+ Add
- Subtract
% Remainder
** Power
( ) Brackets to specify the order of operations

1 related articles found: