{# templates/dashboard/admin.html #} {% extends "base.html" %} {% block content %} {% if active_tab == "current" %}
Admin Dashboard
Welcome, {{ current_user.full_name or current_user.username }}.
Clear
Month Campaigns
{{ month_campaigns_created or 0 }}
Created in {{ month }}
Go Live
{{ month_campaigns_completed or 0 }}
Completed (Go Live/Report)
Backlog
{{ backlog_campaigns or 0 }}
Older than month, not live
Month Margin
₹ {{ "{:,.2f}".format((month_margin or 0)|float) }}
From approved quotes
Month Revenue
₹ {{ "{:,.2f}".format((month_revenue or 0)|float) }}
Non-draft invoices
Creator Cost
₹ {{ "{:,.2f}".format((month_creator_cost or 0)|float) }}
Approved quotes
Invoices (Month)
TI: {{ month_ti or 0 }} · PI: {{ month_pi or 0 }}
Overall moved to Consolidated tab
Pending Payments
Invoices older than 7 days and not fully paid
{{ payment_pendings|length }}
{% if not payment_pendings %}

No pending invoices.

{% else %}
{% for inv in payment_pendings %} {% endfor %}
Invoice Brand Balance Status Open
{{ inv.invoice_number }} {{ inv.brand.name if inv.brand else '-' }} ₹ {{ "{:,.2f}".format((inv.balance_amount or 0)|float) }} {% if inv.payment_status == 'UNPAID' %} UNPAID {% elif inv.payment_status == 'PARTIAL' %} PARTIAL {% else %} {{ inv.payment_status }} {% endif %} View
{% endif %}
{% else %} {# ----- Helpers for showing date range nicely ----- #} {% set _from_txt = cons_start.strftime('%d %b %Y') if cons_start else '—' %} {% set _to_txt = cons_end.strftime('%d %b %Y') if cons_end else '—' %} {% set _range_txt = _from_txt ~ " → " ~ _to_txt %}
Consolidated Dashboard
Time range view across creators, brands, campaigns, invoices and money metrics.
{{ _range_txt }} Pick dates and click Apply to refresh.
{% if admin_status %}{% endif %} {% if ops_id %}{% endif %}
Clear
{# Optional: show an empty-state when no range is selected #} {% if not cons_start or not cons_end %}
Select a date range
Choose From and To dates to load consolidated stats.
{% endif %}
Creators
{{ cons_creators or 0 }}
Unique creators in range
Brands
{{ cons_brands or 0 }}
Unique brands in range
Campaigns
{{ cons_campaigns or 0 }}
Campaigns created in range
Margin
₹ {{ "{:,.2f}".format((cons_margin or 0)|float) }}
From approved quotes
Revenue
₹ {{ "{:,.2f}".format((cons_revenue or 0)|float) }}
Non-draft invoices
Received
₹ {{ "{:,.2f}".format((cons_received or 0)|float) }}
Payments received
Outstanding
₹ {{ "{:,.2f}".format((cons_outstanding or 0)|float) }}
Pending receivables
Invoices (Overall in Range)
TI: {{ cons_ti or 0 }} · PI: {{ cons_pi or 0 }}
As per client: overall invoices moved here
Creator Cost
₹ {{ "{:,.2f}".format((cons_creator_cost or 0)|float) }}
Approved quotes cost
{% endif %} {% endblock %}