How to use num2words for In Words amount

Hi,

I want to show in words amount in Indonesian language, can I use num2words command in print format? what is the best way to do this?

Thankyou

Jevon

Please try it.

{{ frappe.utils.money_in_words(doc.grand_total, "IDR")}}

Hi thankyou for replying

It worked but it shows the ‘Saja’ “Only” text which is not correct in Indonesian translation. how to remove the “only” text

Jevon

If you want to remove “only” then apply it.

{{ frappe.utils.money_in_words(doc.grand_total, "IDR") | replace ("only", " ")}}

reference:

It worked for me by changing the only written in indonesian language.

{{ frappe.utils.money_in_words(doc.grand_total, "IDR") | replace ("saja.", " ")}}

thanks for your help!
Jevon