{#- Small pieces the pages share: icons, and the chips for severity and status. -#} {%- macro icon(name) -%} {%- endmacro -%} {%- macro severity_chip(severity) -%} {%- if severity == "ERROR" -%}Error {%- else -%}Warning {%- endif -%} {%- endmacro -%} {%- macro status_chip(row) -%} {%- if row.status == "FAIL" -%}{{ severity_chip(row.severity) }} {%- elif row.status == "PASS" -%}Passed {%- else -%}Not evaluated {%- endif -%} {%- endmacro -%} {#- The rule's text as the Bank's workbook states it (Rules page and the cell panel). -#} {%- macro rule_text(rule) -%} {%- if rule.expression -%}

The rule, as the Bank's workbook states it

{{ rule.expression }}
{% if rule.scope %}

Scope

{{ rule.scope }}
{% endif %}
{%- endif -%} {%- endmacro -%} {#- One unsatisfied evaluation: where, the values it read, and each cell on the grid. ``here`` is the (table, sheet, open key, row, column) of the cell being looked at, if any. -#} {%- macro failure_card(failure, grid_url, rule_id, here=none) -%}
{{ "At " ~ failure.place if failure.place else "One evaluation over the whole template" }}
{% if failure.addresses %}
{% for address in failure.addresses[:24] %} {% set is_here = here is not none and (address.table, address.sheet, address.open_key, address.row, address.column) == here %} {{ address.table }}{% if address.sheet %} z{{ address.sheet }}{% endif %}{% if address.open_key %} {{ address.open_key }}{% endif %} r{{ address.row }} c{{ address.column }} {% endfor %} {% if failure.addresses | length > 24 %}and {{ failure.addresses | length - 24 }} more{% endif %}
{% endif %}
{%- endmacro -%} {#- The file and header fields of a form that opens a return (Open and Compare pages). -#} {%- macro open_fields(values, modules) -%}

Return header

A fact table (.parquet or .csv) carries no header, so the entity, the reference date and the module are required for one. A workbook or an XBRL instance states its own; anything entered here overrides it.

{{ caller() }}
{%- endmacro -%}