Luis
10/02/2023, 6:09 AMNElliott
10/02/2023, 7:19 AMNElliott
10/02/2023, 7:23 AM<#if record.amountpaid?number gt 0>
Luis
10/02/2023, 10:31 PMDavid B
10/03/2023, 1:24 AM<#if record.amountpaid != '' && record.amountpaid?number gt 0>
NElliott
10/03/2023, 7:50 AMLuis
10/03/2023, 1:55 PMLuis
10/03/2023, 1:56 PMNElliott
10/03/2023, 2:02 PMDavid B
10/03/2023, 9:59 PMrecord.amountpaid
includes the currency symbol, at least for me. Hence it fails the ?number
conversion.
When you save the template, NetSuite populates the fields with dummy data for testing. String fields like amountpaid get populated (sometimes?) with an empty string, which is why you get the error Can't convert this string to number: ""
if you 'submit anyway' and print an invoice, you instead see the error Can't convert this string to number: "$0.00"
David B
10/03/2023, 9:59 PMrecord.amountpaid?has_content && record.amountpaid?replace('[^\\d.]','','r')?number != 0
David B
10/03/2023, 10:03 PMamountpaid != '$0.00'
, but you're assuming the currency symbol will always be $
David B
10/03/2023, 10:04 PMamountpaid[1..]
IIRC, some currencies just use the 3-digit ISO currency code (e.g. "USD").
I also think this is controlled by a NetSuite account setting _*edit. yes, it's a company info setting if you have one currency, otherwise against each currency record: NS Help: Customizing Currency Formats_Luis
10/05/2023, 6:32 AM