Convert Amount to Words

Create a Transaction body field and uncheck the store value check box
In the Validating & Defaulting Add the Formula in the Default Value column by checking the formula checkbox
Formula :

CASE
WHEN {payment} = 0 THEN ‘ZERO’
ELSE
CASE
WHEN FLOOR({payment}) = {payment} THEN
TO_CHAR(TO_DATE(TO_CHAR(TRUNC({payment}, 0)), ‘J’), ‘JSP’) || ‘ ONLY’
ELSE
TO_CHAR(TO_DATE(TO_CHAR(TRUNC({payment}, 0)), ‘J’), ‘JSP’) || ‘ AND ‘ ||
TO_CHAR(FLOOR({payment} * 100) – FLOOR({payment}) * 100) || ‘/100 ONLY’
END
END

Example : Amount : 662.86
In Words : SIX HUNDRED SIXTY-TWO AND 86/100 ONLY

Leave a comment

Your email address will not be published. Required fields are marked *