I have been using an advanced PDF template for our statements for the last 2-3 months without error, but today they have started erroring.
I have removed some of the custom code I added, and this has stopped them erroring (indicating the error is in this part of the code), but this code has not been altered recently.
Is there anything that has changed in the background in NetSuite that could be causing issues with this:
<#if line.description?starts_with("Invoice")>
<#if line.charge != line.amountremaining>
<#assign apptran = line.charge-line.amountremaining>
${apptran?string.currency}
</#if>
</#if>
<#if line.description?starts_with("Payment")>
<#if line.payment != line.amountremaining>
<#assign apptran = line.payment-line.amountremaining>
${apptran?string.currency}
</#if>
</#if>
I tried removing the ?string.currency flag to see if that helped, and I've also tried each of the two main if statements individually, but all of these variations still give the error.
It just says:
An unexpected error has occurred. Please click here to notify support and provide your contact information.
which is not overly helpful.
The template runs OK on a preview - but the preview doesn't have any transactions, so there are no line.descriptions, so the statements won't trigger.
Are the 'line.charge-line.amountremaining' and 'line.payment-line.amountremaining' tags valid? They have worked fine for the last few months, so I can't see why they would suddenly stop working now??
Any ideas??