{% extends "base.html" %} {% from "_macros.html" import severity_chip %} {% block title %}Build & sign off · {{ current.name }} — rwa-filer dash{% endblock %} {% block content %} {% set rid = current.return_id %} {% set latest = view.latest %} {% set written = latest and latest.record.package.written %}
Build & sign off

Build, sign off, verify

Write the XBRL filing package, record who approved it against the file's checksum, and check that the file you upload is the file that was approved. Each step is the one rwa-filer build, signoff and verify take, and records the same things.

{% if error %} {% endif %}
  1. ✓Validate{{ "submittable" if current.validation.is_submittable else current.validation.blocking | length ~ " blocking" }}{% if working.adjusted %} with the overrides{% endif %}
  2. {{ "✓" if written else "2" }}Build{% if written %}{{ latest.record.package.instance.content | length | count }} bytes written{% elif latest %}not written{% else %}the .xbrl and its manifest{% endif %}
  3. {{ "✓" if latest and latest.signoff else "3" }}Sign off{{ latest.signoff.approver if latest and latest.signoff else "bound to the file's checksum" }}
  4. {{ "✓" if latest and latest.verification == () else "4" }}Verify{% if latest and latest.verification is not none %}{{ "the files agree" if not latest.verification else latest.verification | length ~ " problem(s)" }}{% else %}before you upload{% endif %}
{% if view.draft_problem %}

{{ view.draft_problem }}

{% endif %} {% if view.drafts %}
    {% for item in view.drafts %} {% set a = item.adjustment %}
  • {{ a.describe() }} {{ item.action | replace("_", " ") }} {{ item.before | figure }} → {{ item.after | figure }}
    “{{ a.reason }}”
  • {% endfor %}
{% if view.effect %} {% set e = view.effect %} {% set rules_url = "/returns/" ~ rid ~ "/rules" %}
With these overrides: {{ "nothing blocks submission" if e.submittable else e.blocking_after ~ " blocking finding" ~ ("s" if e.blocking_after != 1 else "") }}

Blocking findings {{ e.blocking_before }} → {{ e.blocking_after }} · rule breaks {{ e.breaks_before }} → {{ e.breaks_after }}{% if e.structure_after %} · {{ e.structure_after }} structure finding{{ "s" if e.structure_after != 1 }}{% endif %}. The overview, the rules and the template grid show the return this way too.

{% if e.broken %}

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

{% endif %} {% if e.stopped %}

No longer run ({{ e.stopped | length }})

Broken as opened, and not run with the overrides. A rule that does not run is not passed: nothing checks the figures it reads.

{% endif %} {% if e.fixed %}

Fixed ({{ e.fixed | length }})

{% endif %} {% if e.no_longer_run %}

{{ e.no_longer_run | count }} rule{{ "s" if e.no_longer_run != 1 }} that held as opened {{ "do" if e.no_longer_run != 1 else "does" }} not run with the overrides. See what does not run.

{% endif %} {% endif %} {% else %}

No override drafted. A build files the return exactly as it was opened.

{% endif %}

{{ "Build again" if latest else "Build the filing package" }}

{% if not current.validation.is_submittable %}
{{ "With the overrides" if working.adjusted else "As opened" }}, the return has {{ current.validation.blocking | length }} blocking finding{{ "s" if current.validation.blocking | length != 1 }}

Nothing is written while a published rule is broken unless you choose to write it anyway; the manifest records that you did. A structure finding stops the file whatever you choose.

{% endif %}
{% if latest %} {% set package = latest.record.package %}

{{ "Package written" if written else "Nothing was written" }}

build {{ latest.index + 1 }} of {{ view.builds }} · {{ latest.record.built_at | moment }}{% if latest.record.author %} · {{ latest.record.author }}{% endif %}
{% if not written %}

{{ blocked }}

{% else %} {% set instance = package.instance %}

Wrote {{ package.instance_path.name }}: {{ instance.facts | count }} fact{{ "s" if instance.facts != 1 }} from {{ instance.cells | count }} cell{{ "s" if instance.cells != 1 }}, {{ instance.filing_indicators | length }} template{{ "s" if instance.filing_indicators | length != 1 }} reported, {{ instance.content | length | count }} bytes. {% if package.zip_path %}Upload {{ package.zip_path.name }}.{% else %}Upload the instance as it is.{% endif %}

{% if latest.record.forced and not package.validation.is_submittable %}

Written anyway: the manifest records that validation found {{ package.validation.blocking | length }} blocking finding{{ "s" if package.validation.blocking | length != 1 }}.

{% endif %} {% if latest.record.applied %}

{{ latest.record.applied | length }} override{{ "s" if latest.record.applied | length != 1 }} applied, each recorded in the manifest{% if latest.record.ledger %} and the ledger{% endif %}.

{% endif %}
Folder{{ package.instance_path.parent }}
Instance SHA-256{{ latest.sha256 }}
Templates filed{% for code in instance.filing_indicators %}{{ code }}{% endfor %}
{% for file in latest.files %}{{ file.label }}{% endfor %}
{% endif %}
{% if written %}

Sign off

{% if latest.signoff %} {% set approval = latest.signoff %}

Signed off by {{ approval.approver }} ({{ approval.role }}) at {{ approval.at }}{% if not approval.submittable %}, although the validation found blocking findings{% endif %}.

{% if approval.statement %}

“{{ approval.statement }}”

{% endif %}
Instance SHA-256 {{ approval.instance_sha256 }}
Manifest SHA-256 {{ approval.manifest_sha256 }}
{% if approval.ledger_head %}
Ledger head {{ approval.ledger_head }}
{% endif %} {% else %}

The approval is bound to the instance's SHA-256. If the file changes afterwards, it no longer verifies.

{% if not package.validation.is_submittable %} {% endif %}
{% endif %}
{% if latest.verification is none %}

Checks that the instance and zip are the files the manifest describes, that the sign-off was given for exactly them, and that the audit ledger is intact. Verify again just before you upload if the folder has been out of your hands.

{% elif not latest.verification %}
The files, the sign-off and the ledger agree
{% else %}
The package does not verify
    {% for problem in latest.verification %}
  • {{ problem }}
  • {% endfor %}
{% endif %}
{% endif %} {% endif %}
{% endblock %} {% block command %}
Same on the command line: rwa-filer build {{ current.name }} --out filing/ --author NAME, then rwa-filer signoff and rwa-filer verify on the manifest.
{% endblock %}