how to Remove 00/100 in Standard Check, If the Amount Has No. Value

Hi Guys,

I have a question regarding the Dynamics NAV Standard Check,

I'm Having trouble formatting the Amount in words Part of the check, since the requirement is to remove the 0/100
if the amount in payment journal Lines, has no decimal value

to be exact.

if the amount is 1000.00 the amount in words should be
-ONE THOUSAND (Currency) ONLY


and if the amount is 1000.25
- ONE THOUSAND AND 25/100 (CURRENCY) ONLY


hope someone knows how to edit the code for the report 1401
for this scenario

Thanks in advance.
have a nice day

Comments

  • kenyokenyo Member Posts: 40
    edited 2019-05-21
    i dont know the report and i am overall new but personally i would just do a MOD 1 on the amount and if its = 0 remove the 00/100 via STRING function
  • imclever1205imclever1205 Member Posts: 94
    In the Report, You will find a function called FormatNoText.
    In this Function, you will find
    AddToNoText(NoText,NoTextIndex,PrintExponent,(FORMAT(No * DecimalPosition) + '/' + FORMAT(DecimalPosition)));

    You can check If No = 0.00 then set the it to blank as
    AddToNoText(NoText,NoTextIndex,PrintExponent,' ')

    Hope it helps ! Do not forget your documentation.
  • basic0220basic0220 Member Posts: 43
    In the Report, You will find a function called FormatNoText.
    In this Function, you will find
    AddToNoText(NoText,NoTextIndex,PrintExponent,(FORMAT(No * DecimalPosition) + '/' + FORMAT(DecimalPosition)));

    You can check If No = 0.00 then set the it to blank as
    AddToNoText(NoText,NoTextIndex,PrintExponent,' ')

    Hope it helps ! Do not forget your documentation.

    Hi imclever1205
    Thank you for this, bit late to receive the notification on this forum. I totally forgot how to mark your comment as answer. thank you very much! :)
Sign In or Register to comment.