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 to variable \INVOICE_PAID\ 1.81 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)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).