{% extends "base.html" %} {% from "_macros.html" import deny_chip, deny_note, failure_card, issue_callout, issue_chip, rule_text, status_chip %} {% block title %}Rules · {{ current.name }} — rwa-filer dash{% endblock %} {% block content %} {% set base = "/returns/" ~ current.return_id ~ "/rules" %} {% set grid_url = "/returns/" ~ current.return_id ~ "/templates" %} {% set labels = {"FAIL": "Failed", "PASS": "Passed", "NOT_EVALUATED": "Not evaluated"} %}
Rules

{{ "Why the return is blocked" if not current.validation.is_submittable and view.counts["FAIL"] else "The published rules" }}

{{ (view.counts.values() | sum) | count }} rules enforced for {{ current.ret.header.module }}, evaluated the way the taxonomy's XBRL formulas evaluate them. Pick a rule to see the cells it read.

{% if view.status == "FAIL" and not review.errors_only %} {% endif %}
{% if view.status == "FAIL" and view.review.active %}

{{ current.validation.status | title }} · {{ view.hidden_errors }} error occurrence(s) and {{ view.hidden_warnings }} warning occurrence(s) hidden. Review filter settings

{% endif %}
{{ view.matched | count }} {{ labels[view.status] | lower }} rule{{ "s" if view.matched != 1 }}{% if view.pages > 1 %} · page {{ view.page }} of {{ view.pages }}{% endif %}
{% if view.rows %} {% if view.pages > 1 %}
{% if view.page > 1 %}Previous{% endif %} {% if view.page < view.pages %}Next{% endif %}
{% endif %} {% else %}

No rule matches.{% if view.status == "FAIL" and not view.query and not view.template and not view.counts["FAIL"] %} Nothing is broken.{% endif %}

{% endif %}
{% if view.selected %} {% set rule = view.selected %}
{{ status_chip(rule.row) }}{{ deny_chip(rule.row) }}{{ rule.row.rule_id }} {{ rule.row.templates | join(" · ") }}

{{ rule.row.label or "No label published" }}

{{ deny_note(rule.row, rule.published) }} {% for item in rule.issues %}{{ issue_callout(item) }}{% endfor %}
Evaluations that hold
{{ rule.row.satisfied | count }}
{{ "Visible breaks" if review.active else "Evaluations that break" }}
{{ (rule.row.unsatisfied - rule.row.hidden) | count }}
{% if rule.row.status == "NOT_EVALUATED" %}
Not evaluated because
{{ rule.row.reason }}
{{ rule.reason_text }}{% if rule.detail %}: {{ rule.detail }}{% endif %}
{% endif %}
{{ rule_text(rule) }} {% if rule.failures %}

Where it breaks{% if (rule.row.unsatisfied - rule.row.hidden) > rule.failures | length %} — the first {{ rule.failures | length }} of {{ rule.row.unsatisfied - rule.row.hidden }} visible{% endif %}

{% for failure in rule.failures %}{{ failure_card(failure, grid_url, rule.row.rule_id) }}{% endfor %}
{% endif %}
{% endif %}
{% endblock %}