{% extends "base.html" %} {% from "_macros.html" import severity_chip %} {% block title %}Investigate · {{ current.name }} — rwa-filer dash{% endblock %} {% block content %} {% set base = "/returns/" ~ current.return_id ~ "/investigate" %} {% set grid_url = "/returns/" ~ current.return_id ~ "/templates" %} {% set rules_url = "/returns/" ~ current.return_id ~ "/rules" %}
Investigate

Where the breaks come from

{% if current.detail and current.detail.spec.group_code %}The return uses the supplied group {{ current.detail.spec.group_code }}. Select a rule to investigate it on the template or compare the unit results below.{% else %}Every broken rule, run again on each part of the return by itself. A part that breaks a rule on its own figures is where to look; one that meets it is not.{% endif %}

{% if view and view.dimensions | length > 1 %} {% endif %}
{% if not view %} {% set unread = current.reading.unread_columns %}

This return was opened without breakdown columns

Choose a breakdown column to investigate a break. If the file includes group figures, select their code to validate and file those rows. Otherwise the return is built from the monetary detail.

{% if unread %}
Break the return down by
{% for column in unread %}{% endfor %}
{% include "_group_picker.html" %}
The file is read again; the return opened now stays open beside it.
{% else %}

{% if current.path.suffix.lower() in (".csv", ".parquet") %}This file has no columns beyond the fact table's own.{% else %}Breakdown columns are read from a fact table (.parquet or .csv): a workbook or an XBRL instance carries only the summed figures.{% endif %} Add a column such as business_unit with one row per part of each cell, and open the file with it.

{% endif %}
{% else %}
{{ "Visible breaks in the return" if review.active else "Breaks in the return" }}
{{ view.broken | count }}
{{ view.error_rules }} Error rule{{ "s" if view.error_rules != 1 }} · {{ view.warning_rules }} Warning rule{{ "s" if view.warning_rules != 1 }}
Traced to one {{ view.dimension }}
{{ view.traced | count }} of {{ view.broken | count }}
break on one member's figures alone
Members behind them
{{ view.breaking | length }} of {{ view.members }}
{{ view.breaking[:3] | join(" · ") }}{% if view.breaking | length > 3 %} and {{ view.breaking | length - 3 }} more{% endif %}
{% if view.searched_hidden %}
Hidden by the total
{{ view.hidden_count | count }}
hold in the return, break inside a member
{% endif %}

Who is out, on which rule, by how much

each member's own gap: one side of the rule less the other
{% if view.rows %}
{% for column in view.columns %}{% endfor %} {% for row in view.rows %} {% for hit in row.cells %} {% set column = view.columns[loop.index0] %} {% if hit and hit.count %}{{ hit.amount }}{{ ("all " ~ hit.of) if hit.count == hit.of and hit.of > 2 else ("both" if hit.count == hit.of and hit.of == 2 else (hit.count ~ " of " ~ hit.of)) }}{% else %}{{ hit.amount if hit else "-" }}{% endif %} {% endfor %} {% endfor %}
Broken rule The return{{ column.label }}
{{ severity_chip(row.severity) }}{{ row.rule_id }}{{ row.label or "No label published" }}{{ row.breaks }} break{{ "s" if row.breaks != 1 }} {{ row.whole }}{% if row.unexplained %}{{ row.unexplained }} in no member{% endif %}
{% if current.detail.spec.group_code %}

Insufficient detail means the unit figures do not cover the inputs to the group check.

{% else %}

A dash means the member meets the rule on its own rows, or has no figure in the cells it reads.{% if view.clean %} Meet every {{ "visible " if review.active }}broken rule on their own figures: {{ view.clean[:12] | join(", ") }}{% if view.clean | length > 12 %} and {{ view.clean | length - 12 }} more{% endif %}.{% endif %}

{% endif %} {% else %}

{{ "No return breaks match the review filters." if review.active else "No rule breaks in this return." }}

{% endif %}
{% if current.detail.spec.group_code %}
Reported text by unit
{% for fact in current.detail.text_cells(current.ret) %} {% else %}{% endfor %}
Template cell{{ view.dimension }}Reported text
{% if fact[view.dimension] == current.detail.spec.group_code %}{% endif %}{{ fact.table }}{% if fact.sheet %} [z{{ fact.sheet }}]{% endif %}{% if fact.open_key %} [{{ fact.open_key }}]{% endif %} [r{{ fact.row }}][c{{ fact.column }}]{% if fact[view.dimension] == current.detail.spec.group_code %}{% endif %} {{ fact[view.dimension] or 'Unspecified unit' }}{{ fact.text_value }}
No text values supplied.
{% endif %} {% if view.searched_hidden %}

Hold in the return, break inside a member

{{ view.hidden_count | count }} place{{ "s" if view.hidden_count != 1 }}

None of these blocks the return. They are listed because a figure that only ties in total is usually two figures that are wrong. Only rules over amounts are searched: a percentage or a count cannot be judged on part of the rows.

{% if view.hidden %} {% else %}

Nothing: every {{ view.dimension }} meets, on its own figures, each rule the return meets.

{% endif %}
{% endif %}
{% endif %} {% endblock %} {% block command %}{% if view %}
Same breakdown on the command line: rwa-filer validate {{ current.name }} --breakdown {{ view.dimensions | join(",") }}{% if current.detail.spec.group_code %} --group-code {{ current.detail.spec.group_code }}{% endif %}
{% endif %}{% endblock %}