|
-
July 19th, 2011, 03:21 PM
#1
Need help with formula
Hi, I need Some help. i have report which generate invoice, there is two amount field one in $ and other is PK , In $ field always some value but some time pk field is null,
Now
i need some formula which is check,when PK field is null then convert $ field in word else convert pk field
hope you are understand my question
I use blow formula to convrt number into word this formula working perfectly
currencyvar tt;
currencyvar dect;
tt :={ship.comm_amount};
dect := tt - Truncate(tt);
tt := truncate(tt);
dect := dect * 100;
if dect = 0 then
UPPERCASE('$ ' + ToWords (tt,0 )) + ' ONLY'
else
UPPERCASE('$ ' + ToWords (tt,0) + ' And CENT ' + ToWords(dect,0)) + ' ONLY ';
Thanks in advance
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|