{% extends "pos/base.html" %} {% load static %} {% block title %}Customer Ledger{% endblock %} {% block stylesheets %} {% endblock %} {% block heading %}Customer Ledger{% endblock %} {% block content %}
{% if customer_obj %}
Ledger for: {{ customer_obj.name|title }}
{% if aging_summary %}
Balance
{{ customer_obj.balance|floatformat:0 }}
{% for item in aging_summary %}
{{ item.label }} Days
{% if item.value %}{{ item.value|floatformat:0 }}{% else %}-{% endif %}
{% endfor %}
Aging Total
{{ aging_total|floatformat:0 }}
{% endif %}
{% for row in ledger %} {% endfor %}
# Date Description Invoice # Credit Debit Balance Age Action
{{ row.id }} {{ row.date }} {{ row.description|safe }} {{ row.invoice_no }} {{ row.credit }} {{ row.debit }} {{ row.balance }} {% if row.age_info %} {{ row.age_days }}d {% elif row.is_sale %} {# Sale invoice fully cleared — show green tick #} ✓ {% endif %} {% if row.id %} {% if 'edit_sale_bill' in allowed_features %} {% endif %} {% if 'delete_sale_bill' in allowed_features %} {% endif %} {% endif %}
Totals: {{ total_credit }} {{ total_debit }} {{ grand_total }}
{% if show_items_summary and items_summary_rows %}
Items Summary
{% for row in items_summary_rows %} {% endfor %}
Item Sale Qty Sale Amount Return Qty Return Amount Purchase Qty Purchase Amount Purch. Return Qty Purch. Return Amount
{{ row.name }} {{ row.sale_qty }} {{ row.sale_amount }} {{ row.return_qty }} {{ row.return_amount }} {{ row.purchase_qty }} {{ row.purchase_amount }} {{ row.purchase_return_qty }} {{ row.purchase_return_amount }}
TOTAL {{ items_summary_totals.sale_qty }} {{ items_summary_totals.sale_amount }} {{ items_summary_totals.return_qty }} {{ items_summary_totals.return_amount }} {{ items_summary_totals.purchase_qty }} {{ items_summary_totals.purchase_amount }} {{ items_summary_totals.purchase_return_qty }} {{ items_summary_totals.purchase_return_amount }}
{% endif %} {% else %}

Please select a customer and click Search.

{% endif %} {% endblock %} {% block javascripts %} {% endblock %}