{% extends 'pos/base.html' %} {% block stylesheets %} {% endblock %} {% block content %}
{% if error %}
⚠️ {{ error }}
{% else %} {% with pinfo=party_info %}
{% if ledger_type == 'party' %}{{ pinfo.type_label }} Ledger {% elif ledger_type == 'bank' %}Bank Ledger {% else %}Account Ledger{% endif %}
{{ pinfo.name }}
{{ pinfo.coa_code }} — {{ pinfo.coa_name }}  ·  {{ date_from|date:"d M Y" }} → {{ date_to|date:"d M Y" }}
Reset
Opening Balance
{{ opening_bal|floatformat:2 }} {{ opening_side }}
Total Debit
{{ total_dr|floatformat:2 }}
Total Credit
{{ total_cr|floatformat:2 }}
Closing Balance
{{ closing_bal|floatformat:2 }} {{ closing_side }}
{{ rows|length }} transaction{{ rows|length|pluralize }} | Period: {{ date_from|date:"d M Y" }}  →  {{ date_to|date:"d M Y" }} {% if pinfo.code %} | Code: {{ pinfo.code }} {% endif %} | Account: {{ pinfo.coa_code }}
{% if not rows %} {% endif %} {% for row in rows %} {% endfor %} {% if rows %} {# remarks empty #} {% endif %}
# Date Ref # Type Description / Party Remarks Debit (Dr) Credit (Cr) Balance
— {{ date_from|date:"d/m/Y" }} — Opening Opening Balance — — — {{ opening_bal|floatformat:2 }} {{ opening_side }}
📋
No transactions in this period
{{ forloop.counter }} {{ row.date|date:"d/m/Y" }} {{ row.ref }} {{ row.txn_type }}
{{ row.description }}
{% if row.party_name %}
{{ row.party_name }}
{% endif %}
{% if row.remarks %} {{ row.remarks }} {% else %} — {% endif %} {% if row.debit %}{{ row.debit|floatformat:2 }}{% else %}—{% endif %} {% if row.credit %}{{ row.credit|floatformat:2 }}{% else %}—{% endif %} {{ row.balance|floatformat:2 }} {{ row.balance_side }}
CLOSING TOTALS {{ total_dr|floatformat:2 }} {{ total_cr|floatformat:2 }} {{ closing_bal|floatformat:2 }} {{ closing_side }}
{% endwith %} {% endif %}
{% endblock %}