How to Convert Number i.e. 1000 in words means “One Thousand”
Hi
you can use num2text(XXX)
hi
In ax there is function called NumeralsToStr()
This function is in Global Class in AOT.
Regards,
Janak Talekar
Look for following methods under Global class -
- numeralsToTxt
- numeralsToTxt_EN
- numeralsToTxt_ES
- numeralsToTxt_FR
- numeralsToTxt_NL
You can use method that suits your requirement.
Hello,
I know this methods. But How to use this method
what do you mean by how to use ???
these are the static methods
directly you can call these methods…
Global::numeralsToTxt(12345.20);
Just tried to show you a sample…
static void numtotxt(Args _args)
{
real i;
;
i= 459;
print numeralsToTxt(i);
pause;
}
you try this in jobs and see. You might get some idea.
Below job will remove asterisks that gets prefixed -
static void TestNumeralsToTxt(Args _args)
{
AmountCur AmountCur;
str val;
;
AmountCur = 715.99;
val = numeralsToTxt_EN(AmountCur);
val = substr(val,5, strlen(val)-4);
print val;
pause;
}
hi,
I have requirement of converting the invoice amount into words.
i have created this method in global class to convert to words ,but while returning the amount its returning amount in wrong manner . words are jumbling like first word coming second postion and first word coming in second postion.
Like:- (559147.00) five hundred fifty nine thousand one hundred fourty seven
Any other method for conversion to word can u please tell me.
Regards,
piyush
hi piyush,
did u tried the way what kranti is suggested.it should work.
if not, can you post your code then you can get better solution.
hi Ven,
thanks dear, I have done it.
Thanks & Regards