" %}
{{ commodity_macros.render_amount(ledger, value.units) }} |
{% else %}
{{ value }} |
{% endif %}
{% endmacro %}
{% macro querytable(ledger, contents, types, rows, filter_empty=None, footer=None) %}
The querytable macro is deprecated, please switch to the frontend-rendered query result.
See fava.ext.fava_ext_test for an example of how to use them.
{% if contents %}
{{ contents }}
{% elif types %}
{% for name, type in types %}
{{ name }} |
{% endfor %}
{% for row in rows if filter_empty == None or not row[filter_empty].is_empty() %}
{% for name, type in types %}
{{ querycell(ledger, name, row[name], type) }}
{% endfor %}
{% endfor %}
{% if footer %}
{% for type, value in footer %}
{{ querycell(ledger, '', value, type) }}
{% endfor %}
{% endif %}
{% endif %}
{% endmacro %}