UCM Blog

Latest News and Updates from the Ultimate Client Manager team

Template tag arithmetic improvements

Template tags now support + – and * arithmetic, here is an example that is used in the “external_invoice” template:

Total: {TOTAL_AMOUNT_DUE} <br>
+10: {TOTAL_AMOUNT_DUE+10} <br>
10%: {TOTAL_AMOUNT_DUE*0.10} <br>
50%: {TOTAL_AMOUNT_DUE*0.50} <br>
-50: {TOTAL_AMOUNT_DUE-50} <br>

This produces the following output:

Total: $100.00 EUR 
+10: $110 EUR 
10%: $10 EUR 
50%: $50 EUR 
-50: $50 EUR

 

And for example, in the “quote_pdf” template you can use these tags:

{TOTAL_AMOUNT}
{TOTAL_AMOUNT*0.10}
{TOTAL_AMOUNT*0.45}
{TOTAL_AMOUNT*0.45}
{currency:TOTAL_AMOUNT}
{currency:TOTAL_AMOUNT*0.10}
{currency:TOTAL_AMOUNT*0.45}
{currency:TOTAL_AMOUNT*0.45}

which gives this output:

85
8.5
38.25
38.25
$85.00
$8.50
$38.25
$38.25
dtbakerTemplate tag arithmetic improvements
Share this post