{% macro render_amount(ledger, amount, class="num") %}
{% if amount is none or amount.number is none -%}
  <span class='{{ class }}'></span>
{%- else -%}
  <span class='{{ class }}' title='{{ ledger.commodities.name(amount.currency) }}'>
    {{- amount.number|format_currency(amount.currency)|incognito }} {{ amount.currency -}}
  </span>
{%- endif %}
{% endmacro %}

{% macro render_num(ledger, currency, number) -%}
<span title='{{ ledger.commodities.name(currency) }}'>{{ number|format_currency(currency)|incognito }} {{ currency }}</span>
{%- endmacro %}
