{% macro render_amount(ledger, amount, class="num") %} {% if amount is none or amount.number is none -%} {%- else -%} {{- amount.number | format_currency(amount.currency, True) }} {{ amount.currency -}} {%- endif %} {% endmacro %}