Functions in document templates
From Planfix
Functions can be used when automatically formatting documents using templates. Functions simplify how data is displayed in your documents. For example, you can use formulas to automatically display numbers as words or calculate order costs.
Formulas
To add a formula to a document, use the following syntax: %%%FORMULA%%%.
A FORMULA is an expression for calculating the value of a field, just like in a calculated field.
Example:
%%%TEXT({{DataTag.Service.Quantity}}*{{DataTag.Service.Cost}};".2f")%%%
In the example above, data from the "Service" data tag is added to the formula using the corresponding variables. The two values are multiplied, and the result is the value of the total cost of a specific service or product. The TEXT() function formats the value as a human-readable text string.