Hi all,
i tried to convert amount in words as Indian currency but in case of amount is in lacs
or above conversion is not properly.
My formula in CR is:
1.
formula= Towords(truncate(890010.89), 0) + " and " + towords(abs(100 * (truncate(890010.89)- 890010.89)), 0) + " centavos";
2.
local stringvar sNumber := cstr(Sum (890010.89));
local numbervar whole := truncate(Sum (890010.89));
local numbervar pos := instrrev(sNumber, '.');
local numbervar decimal := 0;
if pos > 0 then
(
decimal := CDbl(right(sNumber, length(sNumber) - pos));
);
Uppercase(ToWords(whole, 0) + ' Rupee(s) and ' + ToWords(decimal, 0) + ' Paise Only');
Note: Above formulas working properly upon thousands but for thousands above not working...
Please help me for proper conversion either in terms of lacs or above..