Covert Number to Words

MadhanMadhan Member Posts: 96
Great Day All,

I would like to know, if there is any method of coverting number to words in Navision, which takes care of various currency formats.

Right now, i am using check report (FormatNoText Fuction), which takes care of coverting only in the case of Local currency.

But, in the case of different currency, how to do?

Example:

100.20 INR = One Hundred Rupees and Twenty Paise Only.
100.20 USD = ?

Comments

  • ara3nara3n Member Posts: 9,257
    I don't think there is, but you could write one.

    you need to split the 100 and .20 and call FormatNoText Function twice. Then you need a field to the currency table for the cents description (Paise)

    The code would look like this
    Currency.get("Currency code");
    
    MyAmount := 100;
    MyAmountText := formatNoText(MyAmount);
    
    MyDecimal := 0.20;
    MyDecimalText := formatNoText(MyAmount);
    
    
    
    TextToPrint :=  MyAmountText + ' ' + Currency.Description +  ' ' +
    MyDecimalText + ' ' + Currency."Decimal Description"
    
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.