Answers for "https://forum.manager.io/t/currency-for-amount-in-words/22025/3"

0

https://forum.manager.io/t/currency-for-amount-in-words/22025/3

{% 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}}
Posted by: Guest on June-04-2021

Code answers related to "https://forum.manager.io/t/currency-for-amount-in-words/22025/3"

Browse Popular Code Answers by Language