{% extends "base.html" %} {% load humanize %} {% block page_title %}Transaction Ledger{% endblock %} {% block content %}
Filters
{% for val, label in category_choices %} {% endfor %}
{% for val, label in method_choices %} {% endfor %}
Reset
{% if active_filter_items %}
Active: {% for item in active_filter_items %} {{ item.label }}: {{ item.value }} {% endfor %} Clear all
{% endif %}
Total Charged UGX {{ ledger_total_charged|floatformat:0|intcomma }} All billed amounts
Net Balance UGX {{ ledger_running_balance|floatformat:0|intcomma }} {% if ledger_running_balance > 0 %}Outstanding{% elif ledger_running_balance < 0 %}Credit{% else %}Cleared{% endif %}
Transactions {{ ledger_transaction_count|intcomma }} {{ ledger_student_count|intcomma }} student{{ ledger_student_count|pluralize }}
{% if selected_student and selected_student_summary %}
{{ selected_student.student_name }}
{{ selected_student.display_student_id }}{% if selected_student_summary.classroom %} · {{ selected_student_summary.classroom }}{% endif %}{% if selected_student_summary.term %} · {{ selected_student_summary.term }}{% endif %}
Charged: UGX {{ selected_student_summary.total_charged|floatformat:0|intcomma }} Paid: UGX {{ selected_student_summary.total_paid|floatformat:0|intcomma }} Balance: UGX {{ selected_student_summary.balance|floatformat:0|intcomma }}
Profile Statement {% if selected_student_summary.action_bill_id %} Add Payment {% endif %}
{% endif %}

Ledger Detail

{{ ledger_transaction_count|intcomma }} row{{ ledger_transaction_count|pluralize }}
{% if ledger_rows %}
{% if show_student_group_headers %} {% endif %}
{% for row in ledger_rows %} {% if show_student_group_headers %} {% ifchanged row.student_pk %} {% endifchanged %} {% endif %} {% endfor %}
Date Type Student ID Student Name Classroom Term Category Method Charged Paid {{ balance_column_label }} Notes Actions
{{ row.student_name }} {{ row.reg_no }} {% if row.classroom %}{{ row.classroom }}{% endif %}
Charged: UGX {{ row.student_total_charged|floatformat:0|intcomma }} Paid: UGX {{ row.student_total_paid|floatformat:0|intcomma }} Balance: UGX {{ row.student_balance|floatformat:0|intcomma }}
{% if row.student_action_bill_id %} Pay {% endif %}
{{ row.date|date:"d M Y" }} {{ row.type_label }} {{ row.reg_no }} {{ row.student_name }} {{ row.classroom }} {{ row.term }} {{ row.category }} {% if row.payment_method %} {{ row.payment_method }} {% else %}-{% endif %} {% if row.amount_charged %}{{ row.amount_charged_display|floatformat:0|intcomma }}{% else %}-{% endif %} {% if row.amount_paid %}{{ row.amount_paid_display|floatformat:0|intcomma }}{% else %}-{% endif %} {{ row.running_balance|floatformat:0|intcomma }} {{ row.notes|default:"-"|truncatechars:60 }}
{% else %}

No transactions found for the selected filters.

Clear Filters
{% endif %}
{% endblock %}