Knowledgebase
Is this possible to compare some value of a variable with another one before viewing it?
Posted by Maksim Karganov (AIT) on 03 June 2011 05:54 PM

Question: Is this possible to compare some value of a variable with another one before viewing it?

Answer: Yes. For example, you need to add 1.81 to variable \INVOICE_PAID\ if INVOICE_DUE>77.47 and INVOICE_IS_PAID.

The code in the template will be as follows:

\If( INVOICE_IS_PAID && INVOICE_DUE>77.47)\
Total payments received: \CLIENT_CURRENCY\\INVOICE_PAID+1.81\
Amount due: \CLIENT_CURRENCY\\INVOICE_DUE\
\else\ Total payments received: \CLIENT_CURRENCY\\INVOICE_PAID\
Amount due: \CLIENT_CURRENCY\\INVOICE_DUE\
\endif\

(46 vote(s))
Helpful
Not helpful

Comments (0)