Conditional section in ODT template for email
Submitted by sorrentovet on Fri, 02/10/2020 - 13:44
Hi everyone,
I'm trying to include a conditional section for an email odt template based on invoice amount but with no success so far.
Basically, I want to show text and an image (therefor my thinking of a conditional section) when OpenVPMS.invoice.amount > 400.
Below are the fields in the document:
...and this is my conditional section logic:
I get the feeling 'invoiceAmount' is seen as 'text' when being evaluated and I don't know how to convert it to a number. At the moment the section displays no matter the invoice amount.
Any help appreciated!
Cheers,
Anton
Re: Conditional section in ODT template for email
This is a known bug in OpenOffice: https://bz.apache.org/ooo/show_bug.cgi?id=45969
As a workaround, try recreating your email template as a JasperReport.
Re: Conditional section in ODT template for email
Not that familiar with JasperReports but it's as good a time as ever to learn!
Thanks!