{% load django_ledger %} {% load i18n %}
{% if tx_digest.by_unit %} {% endif %} {% for bs_role, bs_role_data in tx_digest.balance_sheet.items %} {% if bs_role_data.is_block %} {% for acc_role, acc_data in bs_role_data.roles.items %} {% for acc in acc_data.accounts %} {% if tx_digest.by_unit %} {% endif %} {% endfor %} {% endfor %} {% if bs_role != 'equity' %} {% endif %} {% endif %} {% endfor %}
{% trans 'Account' %}{% trans 'Unit' %}{% trans 'Type' %} {% trans 'Balance Through' %} {{ tx_digest.to_date | date }} {% trans 'Actions' %}

{{ bs_role | upper }}

{{ acc_data.role_name | upper }}
{% icon 'bi:arrow-return-right' 16 %} {{ acc.code }} {{ acc.name }}
{% if acc.unit_name %} {{ acc.unit_name }} {% endif %} {% if acc.balance_type == 'debit' %} {% icon 'bi:arrow-bar-down' 16 %} {% trans 'debit' %} {% elif acc.balance_type == 'credit' %} {% icon 'bi:arrow-bar-up' 16 %} {% trans 'credit' %} {% else %} {{ acc.balance_type }} {% endif %} {% currency_symbol %}{{ acc.balance | currency_format }}
{{ acc_data.role_name | upper }} {% trans 'TOTAL' %}: {% currency_symbol %}{{ acc_data.total_balance | currency_format }}
{% trans 'TOTAL' %} {{ bs_role | upper }} {% currency_symbol %}{{ bs_role_data.total_balance | currency_format }}
{% trans 'Retained Earnings' %} {% currency_symbol %}{{ tx_digest.group_balance.GROUP_EARNINGS | currency_format }}
{% trans 'TOTAL EQUITY' %} {% currency_symbol %}{{ tx_digest.group_balance.GROUP_EQUITY | currency_format }}
{% trans 'TOTAL EQUITY & LIABILITIES' %} {% currency_symbol %}{{ tx_digest.group_balance.GROUP_LIABILITIES_EQUITY | currency_format }}