{% extends "pos/base.html" %} {% load static %} {% block title %}Multi Sub-Tenant Business Closing{% endblock %} {% block stylesheets %} {% endblock %} {% block heading %}Multi Sub-Tenant Business Closing{% endblock %} {% block content %}
{% for st in sub_tenants %}
{% endfor %}
Multi Sub-Tenant Business Closing — {{ start_date }}{% if start_date != end_date %} to {{ end_date }}{% endif %}
{% if not tenant_data %}
No active sub-tenants found. Please create sub-tenants first or select at least one above.
{% else %}
{% for t in tenant_data %}
{{ t.name }}
Grand Sale {{ t.sale.grand_sale|floatformat:2 }}
Total Cash {{ t.cash.total|floatformat:2 }}
{% endfor %} {% 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 sub-tenants

{% 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
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 sub-tenants

{% 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 }}
3. Payments Flow (Per Sub-Tenant)
{% for flow in bank_flow_data %}
{# Sub-tenant header (collapsible) #}
{{ flow.sub_tenant_name }} {{ flow.bank_cards|length }} bank{{ flow.bank_cards|length|pluralize }}
{# Bank cards grid #}
{% for card in flow.bank_cards %}
{{ card.name|title }}
{% for h in card.heads %} {% endfor %}
Opening Amount {{ card.opening|floatformat:2 }}
{{ h.label }} {{ h.amount|floatformat:2 }}
Closing Amount {{ card.closing|floatformat:2 }}
{% empty %}

No banks found for this sub-tenant.

{% endfor %}
{% empty %}

No bank flow data available.

{% endfor %} {% endif %} {# end if tenant_data #}
{% endblock %} {% block javascripts %} {% endblock %}