{% import 'macros/_account_macros.html' as account_macros with context %} {% set sort_type = { "": 'num', "": 'num', "": 'num', } %} {% macro querycell(name, value, type_) %} {% set type = type_|string %} {% if type == "" %} {% for position in value|cost %} {% if position.units.number != 0 %} {{ position.units|format_amount }}
{% endif %} {% endfor %} {% elif type == "" %} {% if name == "account" %} {{ account_macros.account_name(value) }} {% else %} {{ value }} {% endif %} {% elif type == "" or type == "" %} {{ value|format_currency }} {% elif type == "" %} {{ value|format_amount }} {% elif type == "" %} {{ value|upper }} {% elif type == "" %} {{ value }} {% elif type == "" %} {{ value|join(',') }} {% elif type == "" %} {{ value or '' }} {% elif type == "" %} {{ value.units|format_amount }} {% else %} {{ value }} {% endif %} {% endmacro %} {% macro querytable(types, rows, filter_empty=None) %} {% for name, type in types %} {% endfor %} {% for row in rows if filter_empty == None or not row[filter_empty].is_empty() %} {% for name, type in types %} {{ querycell(name, row[name], type) }} {% endfor %} {% endfor %}
{{ name }}
{% endmacro %} {% macro download_links(query) -%} ({{ _('Download as') }} CSV{% if config['HAVE_EXCEL'] %}, XLS, XLSX, or ODS {% endif %}) {%- endmacro %}