Knowledgebase: Document Templates
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

Yes. For example, let's say you need to add 1.81 the 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)
© AIT Translation Management Solutions, . Awesome Software Tools for Translators and Translation Agencies.
Privacy Policy | Data Processing Agreement