{% extends "consol/base.html" %}{% load consol_tags %} {% block title %}Trial balances{% endblock %} {% block content %}

Trial balances

Upload one CSV per entity per period. Re-uploading replaces the current version (history kept).

Upload

{% csrf_token %} {{ form.as_p }}

Format: account,name,debit,credit,counterparty. Counterparty is the group entity code for intercompany lines. Amounts in the entity's functional currency; the TB must balance to zero.

Validation feedback

{% if parsed %} {% if parsed.errors %}

Upload rejected — nothing was saved.

{% endif %} {% for w in parsed.warnings %}

{{ w }}

{% endfor %}

Lines read: {{ parsed.rows|length }} · debits {{ parsed.total_debit|money }} · credits {{ parsed.total_credit|money }}

{% else %}

Upload a file to see checks: required columns, numeric amounts, known counterparties, debits = credits, unmapped accounts.

{% endif %}

Current trial balances

{% for u in uploads %} {% endfor %}
PeriodEntityFileUploadedBy
{{ u.period.label }}{{ u.entity.code }} · {{ u.entity.functional_currency }}{{ u.filename }} {{ u.uploaded_at|date:"d M Y H:i" }}{{ u.uploaded_by|default:"—" }}View lines
{% endblock %}