{% extends 'paxalia/base.html' %} {% load static %}{% load i18n %} {% block title %}{% trans "Billing" %} – Paxalia Analytics{% endblock %} {% block page_title %}Billing{% endblock %} {% block page_subtitle %}Revenue, subscriptions, and transactions{% endblock %} {% block filter_bar %} {% include 'paxalia/includes/filter_bar.html' %} {% endblock %} {% block dashboard_content %}
{% trans "Total Revenue" %} ${{ total_revenue|floatformat:2 }}
{% trans "Revenue Today" %} ${{ today_revenue|floatformat:2 }}
{% trans "Revenue This Month" %} ${{ month_revenue|floatformat:2 }}
{% trans "Active Subscriptions" %} {{ active_subscriptions }}
{% trans "Total Donations" %} ${{ total_donations|floatformat:2 }}
{% trans "Revenue this month (MRR proxy)" %} ${{ revenue_trend.current_month_revenue|floatformat:2 }}
{% trans "Projected ARR (run-rate)" %} ${{ revenue_trend.projected_arr|floatformat:2 }}

{% trans "Daily Income" %} – {{ date_range_label }}

{% for key, value in request.GET.items %} {% if key != 'compare' %} {% endif %} {% endfor %}
{% if chart_income %}
{% else %}
{% trans "No income data for this period." %}
{% endif %}

{% trans "Monthly Revenue Trend (MRR proxy)" %} – {% trans "last 12 months" %}

{% trans "Sum of paid invoices per calendar month — a proxy for subscription MRR, not the subscription value itself. See the Billing Integration docs for why." %}

{% if revenue_trend.values %}
{% else %}
{% trans "No revenue data yet." %}
{% endif %}

{% trans "Churn" %}

{% if churn %}

{% blocktrans with baseline=churn.baseline_label following=churn.following_label %}Customers who paid in {{ baseline }} but not in {{ following }}.{% endblocktrans %}

{% trans "Customer churn" %} {{ churn.churned_customers }} / {{ churn.baseline_customers }} ({{ churn.customer_churn_pct }}%)
{% trans "Revenue churn" %} ${{ churn.churned_revenue|floatformat:2 }} / ${{ churn.baseline_revenue|floatformat:2 }} ({{ churn.revenue_churn_pct }}%)
{% else %}
{% trans "Not enough invoice history yet to compute churn." %}
{% endif %}

{% trans "Failed Payments" %}

{% if dunning.summary %}

{% trans "Last 90 days, grouped by status." %}

{% for row in dunning.summary %} {% endfor %}
{% trans "Status" %}{% trans "Count" %}{% trans "Amount" %}
{{ row.status }} {{ row.count }} ${{ row.total|floatformat:2 }}
{% else %}
{% trans "No failed or pending payments in the last 90 days." %}
{% endif %}

{% trans "Top Plans" %}

{% for plan in top_plans %} {% empty %} {% endfor %}
{% trans "Plan" %} {% trans "Users" %}
{{ plan.current_plan__slug }} {{ plan.count }}
{% trans "No subscription data yet." %}

{% trans "Recent Transactions" %}

{% for inv in recent_invoices %} {% empty %} {% endfor %}
{% trans "Invoice" %} {% trans "User" %} {% trans "Amount" %} {% trans "Date" %}
{{ inv.invoice_number }} {{ inv.user.username }} ${{ inv.amount }} {{ inv.date|date:'Y-m-d' }}
{% trans "No transactions yet." %}
{% endblock %} {% block page_scripts %} {% endblock %}