{% extends "base.html" %} {% block title %}Reports{% endblock %} {% block content %}

Reports

Outstanding Payments Collections Report

{% if report_type == 'outstanding' %}

Outstanding Payments Report (for {{ selected_month_name }} {{ report_year }})

{% if outstanding_customers %}
{% for customer in outstanding_customers %} {% endfor %}
Name Phone Address Plan Monthly Charge STB No.
{{ customer.name }} {{ customer.phone_number }} {{ customer.address }} {{ customer.plan_details }} ₹ {{ "%.2f"|format(customer.monthly_charge) }} {{ customer.set_top_box_number }}
{% elif request.args.get('month') and request.args.get('year') %}

No outstanding payments found for the selected period.

{% else %}

Please select a month and year to generate the report.

{% endif %} {% endif %} {% if report_type == 'collections' %}

Collections Report

{% if _form_submitted_and_valid %}

Summary ({{ start_date }} to {{ end_date }})

Total Cash Collected: ₹ {{ "%.2f"|format(total_cash) }}

Total Online Collected: ₹ {{ "%.2f"|format(total_online) }}

Grand Total Collected: ₹ {{ "%.2f"|format(grand_total) }}


{% if collections %}
Individual Payments:
{% for payment in collections %} {% endfor %}
Date Customer Amount Method Billing Period
{{ payment.payment_date.strftime('%d-%b-%Y') }} {{ payment.customer.name }} ₹ {{ "%.2f"|format(payment.amount_paid) }} {{ payment.payment_method }} {{ payment.billing_period_display }}
{% else %}

No collections found for the selected period.

{% endif %} {% else %}

Please select a date range to generate the collections report.

{% endif %} {% endif %} {% if not report_type %}

Select a report type from above to get started.

{% endif %} {% endblock %}