Updated Templating and Invoice Formats
Submitted by Ben_Charlton on Fri, 19/06/2015 - 12:00
I recently updated the template and in particular the invoiceitems.jrxml template
Going forward it produces nice invoices. However
I question the backward compatibilty.
Basically no line items get displayed at all on invoices prior to changinge to 1.8
I assume it has to do with the target.print parameter...
Re: Updated Templating and Invoice Formats
I assume that if its null that will boolean as false..
($F{target.template} == null || !$F{target.template.entity.printAggregate}) && ($F{target.print} || $F{target.total}.compareTo(BigDecimal.ZERO) != 0)
hence this print expression will always return as false for old invoices.
Solutions>?
EDIT:
($F{target.template} == null || !$F{target.template.entity.printAggregate})|| $F{target.total}.compareTo(BigDecimal.ZERO) != 0
the above will work for older invoices...hence maybe the target.print is returning as null for old invoices and the 2nd half of the expression is always false.
Re: Updated Templating and Invoice Formats
Can you try the attached?
Re: Updated Templating and Invoice Formats
Yep adding the check for null sorts it out.
I also checked the suppressed template items are still supressed with that change