Currency for "Amount in words"

#1

Hi,
Is there a way to put the currency with the “Amount in words”.
For example; I am from UAE and the currency here is AED/Dirhams.
An invoice amounted for 100.00; when selected “Amount in words” shows, “One Hundred only”.
Is there a way to add “AED One hundred only” or “Dirhams One hundred only”.

if there is a way, please share your tricks.

#2

There is no method.

#3

If you copy the theme you are using to a custom theme and insert this code:

{% capture amount %}{% for total in table.totals %}{% if total.label == "Total" %}{{ total.text }}{% endif %}{% endfor %}{% endcapture %}
{% capture anc %}{% for total in table.totals %}{% if total.label == "Total" %}{% assign an=total.number %}{% endif %}{% endfor %}{% endcapture %}
{% capture amount_in_words %}{% for total in table.totals %}{% if total.label == "Total" %}{{ total.number | spell_out }}{% endif %}{% endfor %}{% endcapture %}
{% capture cents%}{{an| plus: 0 | modulo: 1| times: 100 | round: 0}}{%endcapture%}
{% capture cents_in_words %}{% if cents != "0" %}{{cents|prepend: " and " | append: "/100 "}}{%else%} Only{% endif %}{% endcapture %}
{{amount_in_words}}{{cents_in_words}}

You will produce this when there are nothing after the decimal point


And this when there are cents.

I am located in United States and I am not familiar with the notation of your currency, but if you want to add the currency before it, you can do so by putting AED before the

{{amount_in_words}}{{cents_in_words}}

in the last line of the copy I gave you. Hope this helps.