{% extends "pos/base.html" %} {% load static %} {% block title %}Multi-Branch Business Closing{% endblock %} {% block stylesheets %} {% endblock %} {% block heading %}Multi-Branch Business Closing{% endblock %} {% block content %}
{% for b in branches %}
{% endfor %}
Multi-Branch Business Closing — {{ start_date }}{% if start_date != end_date %} to {{ end_date }}{% endif %}
{% for t in tenant_data %}
{{ t.name }}
Grand Sale {{ t.sale.grand_sale|floatformat:2 }}
Total Cash {{ t.cash.total|floatformat:2 }}
{% endfor %} {# Combined card #} {% if tenant_data|length > 1 %}
Combined
Grand Sale {{ grand_sale.grand_sale|floatformat:2 }}
Total Cash {{ grand_cash.total|floatformat:2 }}
{% endif %}
1. Sale Section

Scroll horizontally to see all branches

{# Row 1: Branch names #} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {# Row 2: Sale / Return sub-headers #} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {# ── Cash ── #} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {# ── Credit ── #} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {# ── Vendor ── #} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {# ── Total ── #} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {# ── Grand Sale (Sale − Return) ── #} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %}
Head {{ t.name }} Grand Total
Sale ReturnSale Return
Cash{{ t.sale.cash_sale|floatformat:2 }} {{ t.sale.cash_return|floatformat:2 }}{{ grand_sale.cash_sale|floatformat:2 }} {{ grand_sale.cash_return|floatformat:2 }}
Credit{{ t.sale.credit_sale|floatformat:2 }} {{ t.sale.credit_return|floatformat:2 }}{{ grand_sale.credit_sale|floatformat:2 }} {{ grand_sale.credit_return|floatformat:2 }}
Vendor{{ t.sale.vendor_sale|floatformat:2 }} {{ t.sale.vendor_return|floatformat:2 }}{{ grand_sale.vendor_sale|floatformat:2 }} {{ grand_sale.vendor_return|floatformat:2 }}
Total{{ t.sale.total_sale|floatformat:2 }} {{ t.sale.total_return|floatformat:2 }}{{ grand_sale.total_sale|floatformat:2 }} {{ grand_sale.total_return|floatformat:2 }}
Grand Sale {{ t.sale.grand_sale|floatformat:2 }} {{ grand_sale.grand_sale|floatformat:2 }}
2. Cash Section

Scroll horizontally to see all branches

{% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %} {% for t in tenant_data %} {% endfor %} {% if tenant_data|length > 1 %} {% endif %}
Head {{ t.name }} Grand Total
Cash From Cash (Sale − Return){{ t.cash.cash_sr|floatformat:2 }}{{ grand_cash.cash_sr|floatformat:2 }}
Cash From Credit (Sale − Return){{ t.cash.credit_sr|floatformat:2 }}{{ grand_cash.credit_sr|floatformat:2 }}
Cash From Vendor (Sale − Return){{ t.cash.vendor_sr|floatformat:2 }}{{ grand_cash.vendor_sr|floatformat:2 }}
Credit Received / Recovery{{ t.cash.recovery|floatformat:2 }}{{ grand_cash.recovery|floatformat:2 }}
Vendor Payments{{ t.cash.vendor_pay|floatformat:2 }}{{ grand_cash.vendor_pay|floatformat:2 }}
Expense{{ t.cash.expense|floatformat:2 }}{{ grand_cash.expense|floatformat:2 }}
Salary{{ t.cash.salary|floatformat:2 }}{{ grand_cash.salary|floatformat:2 }}
Debitor{{ t.cash.debitor|floatformat:2 }}{{ grand_cash.debitor|floatformat:2 }}
Investor In-Out{{ t.cash.investor|floatformat:2 }}{{ grand_cash.investor|floatformat:2 }}
Total Cash{{ t.cash.total|floatformat:2 }}{{ grand_cash.total|floatformat:2 }}
{% if not tenant_data %}
No branches selected or no connected branches found. Please select at least one branch above.
{% endif %}
{% endblock %} {% block javascripts %} {% endblock %}