{% extends "base.html" %} {% from "_macros.html" import open_fields, severity_chip %} {% block title %}Compare · {{ current.name }} — rwa-filer dash{% endblock %} {% block content %} {% set rid = current.return_id %}
Compare

Compare two returns

Why they differ, then cell by cell and rule by rule. Either side may be any file the dashboard opens: a resubmission against the instance already filed, or this return against the one your current system produces for the same date. The earlier one is the baseline; each finding says which return the Bank's own rules point at.

{% if working.adjusted %}

Compares the files as they were opened: the overrides drafted for {{ current.name }} are not applied here.

{% endif %}
{% if error %} {% endif %} {% if not view %}

Opened this session

{% if others %}

Compare {{ current.name }} with:

{% for other in others %} {{ other.name }} {{ other.ret.header.module }} · {{ other.ret.header.reference_date.isoformat() }} · {{ other.ret.facts.height | count }} facts {% endfor %} {% else %}

No other return is open. Open the other version here.

{% endif %}
{% call open_fields(values, modules) %}
The file opened becomes the earlier version; swap the two on the next page.
{% endcall %}
{% else %} {% set base = "/returns/" ~ rid ~ "/compare" %} {% set against = view.later.return_id if swap else view.earlier.return_id %}
Earlier
{{ view.earlier.name }}
{{ view.earlier.ret.header.module }} · {{ view.earlier.ret.header.reference_date.isoformat() }} · {{ view.earlier.ret.facts.height | count }} facts · {{ view.blocking_before }} blocking
Swap
Later
{{ view.later.name }}
{{ view.later.ret.header.module }} · {{ view.later.ret.header.reference_date.isoformat() }} · {{ view.later.ret.facts.height | count }} facts · {{ view.blocking_after }} blocking
{% if view.identical %}
Identical: the same header and the same {{ view.unchanged | count }} cells
{% else %}
Changed
{{ view.counts["changed"] | count }}
Added
{{ view.counts["added"] | count }}
Removed
{{ view.counts["removed"] | count }}
Unchanged
{{ view.unchanged | count }}
{% endif %} {% set cmp = view.comparison %}

{% if cmp.is_equivalent %}Equivalent{% else %}{{ view.findings | length }} finding{{ "s" if view.findings | length != 1 }} to explain{% endif %}

{{ cmp.cells.height | count }} cells compared{% if not cmp.rules_compared %} · no rule book is packaged for the module, so rules were not compared{% endif %}
{% if cmp.is_equivalent %}

The same header and templates, nothing unplaced, and no difference beyond the rounding the two files state.

{% endif %}
{% for key, label, cells in view.categories %} {{ cells | count }} {{ label }} {% endfor %}
{% for item in view.findings %}
{{ item.number }}Points at {{ item.points_at }}{% if item.cells %}{{ item.cells | count }} cell{{ "s" if item.cells != 1 }}{% endif %} {{ item.title }} {{ item.detail }} {% if item.rules %} {% for rule in item.rules[:6] %}{{ rule.rule_id }} · {{ rule.earlier }} → {{ rule.later }}{% endfor %}{% if item.rules | length > 6 %}and {{ item.rules | length - 6 }} more{% endif %} {% endif %}
{% endfor %} {% if cmp.indicators or cmp.baseline_unplaced or cmp.candidate_unplaced or cmp.shared_breaks %}
{% for code, pair in cmp.indicators.items() %}
{{ code }} is {{ {True: "reported", False: "declared not reported", None: "not mentioned"}[pair[0]] }} in {{ cmp.names.baseline }} and {{ {True: "reported", False: "declared not reported", None: "not mentioned"}[pair[1]] }} in {{ cmp.names.candidate }}.
{% endfor %} {% for side_name, unplaced in [(cmp.names.baseline, cmp.baseline_unplaced), (cmp.names.candidate, cmp.candidate_unplaced)] %}{% for found in unplaced %}
{{ found.code }} in {{ side_name }} — {{ found.message }}
{% endfor %}{% endfor %} {% if cmp.shared_breaks %}
Broken in both — {{ cmp.shared_breaks | join(", ") }}: not a difference, but neither return satisfies {{ "it" if cmp.shared_breaks | length == 1 else "them" }}.
{% endif %}
{% endif %}
{% if view.header %}

Header

{% for name, pair in view.header.items() %}{% endfor %}
{{ name }}{{ pair[0] or "—" }} → {{ pair[1] or "—" }}
{% endif %}

What it did to the verdict

blocking findings {{ view.blocking_before }} → {{ view.blocking_after }} · {{ view.still_broken }} rule{{ "s" if view.still_broken != 1 }} broken in both

Fixed in the later version ({{ view.fixed | length }})

{% for rule in view.fixed %}
{{ severity_chip(rule.severity) }}{{ rule.rule_id }}{{ rule.label or "No label published" }}
{% else %}

None.

{% endfor %}

Newly broken ({{ view.broken | length }})

{% for rule in view.broken %}{{ severity_chip(rule.severity) }}{{ rule.rule_id }}{{ rule.label or "No label published" }}{% else %}

None.

{% endfor %}
{% if not view.identical %}

By table

{% for item in view.tables %} {{ item.table }}{{ item.total | count }} {{ item.changed }} changed · {{ item.added }} added · {{ item.removed }} removed {% endfor %}

{% if view.finding %}Cells of finding {{ view.finding }}{% elif view.table %}Cells in {{ view.table }}{% else %}Cells that differ{% endif %}

{% for cell in view.cells %} {% set owner = view.earlier if cell.change == "removed" else view.later %} {% endfor %}
CellChangeCategoryBeforeAfterDifference
{{ cell.address }} {{ cell.change }} {{ cell.category_label }}{% if cell.finding %} · #{{ cell.finding }}{% endif %} {{ cell.before or "—" }} {{ cell.after or "—" }} {{ cell.delta }}
{{ view.matched | count }} cell{{ "s" if view.matched != 1 }}{% if view.pages > 1 %} · page {{ view.page }} of {{ view.pages }}{% endif %} {% if view.page > 1 %}Previous{% endif %} {% if view.page < view.pages %}Next{% endif %}
{% endif %} {% endif %} {% endblock %} {% block command %}
Same on the command line: rwa-filer compare EARLIER LATER (why they differ) and rwa-filer diff EARLIER LATER (every changed cell)
{% endblock %}