ANS-0288 · PRINTING, PDF & EMAIL TEMPLATES

How to Convert Numeric Values to English Words in NetSuite Transactions?

This guide provides NetSuite formulas to display transaction totals as written English words, including solutions for handling decimal cents.

Short answer

To convert a numeric value to English words in NetSuite, use the TO_CHAR(TO_DATE({your_field}, 'j'), 'jsp') formula. For handling cents, a more complex formula involving INITCAP, TRUNC, and CASE statements can be implemented to accurately represent the full amount in words.

Scenario

NetSuite users often need to display numeric transaction values, such as invoice totals, as written English words on printed documents. The standard NetSuite functionality does not inherently provide a direct method for this conversion, especially when dealing with decimal values representing cents. This requirement is common for legal or formal documentation where amounts must be spelled out.

Solution

NetSuite users can convert numeric values to English words using SQL-like formulas within saved searches or custom fields.

To convert a numeric value to its English word equivalent (e.g., 123 to "One Hundred Twenty-Three"):

TO_CHAR(TO_DATE({your_field}, 'j'), 'jsp')

This formula is straightforward but does not support decimal values (cents). For example, 123.45 would be converted as "One Hundred Twenty-Three" without addressing the 45 cents.

To accurately represent amounts including cents (e.g., 123.45 to "One Hundred Twenty-Three AND Forty-Five CENTS"), the following formula can be used. This example uses the standard TOTAL field from an Invoice:

INITCAP(TO_CHAR (TO_DATE (TRUNC ({TOTAL}), 'J'), 'JSP')  || CASE WHEN (({TOTAL} - trunc({TOTAL}))*100 > 0) THEN (' AND ' ||  TO_CHAR(TO_DATE (({TOTAL} - trunc({TOTAL}))*100, 'J'), 'JSP') || ' CENTS') ELSE ' ONLY' END)

This advanced formula first converts the whole number portion of the total, then checks if there are any cents. If cents are present, it converts the cents portion to words and appends "CENTS"; otherwise, it appends "ONLY".

Expert NetSuite Support

Need help with this NetSuite issue?

Printing, PDF & Email Templates consulting and configuration support

Talk to a consultant