{% extends "controlpanel/base.html" %} {% load i18n lucide ui %} {% comment %} Platform billing: RosterChief charging the clubs (not clubs charging their members -- see billing/services). Two tables: every Plan (with its dated price history) and every Due currently owing across every club. Every action here already existed as a modal or a link before this restyle; nothing was added or removed, only reskinned to the industrial control-panel vocabulary (assets/controlpanel.css). {% endcomment %} {% block panel_title %}{% trans "Billing" %}{% endblock panel_title %} {% block breadcrumb %} billing | {{ plans|length }} plan{{ plans|length|pluralize }} | {{ owing|length }} club{{ owing|length|pluralize }} owing {% endblock breadcrumb %} {% block actions %} {% endblock actions %} {% block panel %} {% url 'controlpanel:plan_create' as plan_create_url %} {% trans "New plan" as new_plan_title %} {% trans "Create plan" as create_plan_label %} {% include "controlpanel/_modal_form.html" with modal_id="plan_create_modal" title=new_plan_title form=plan_form action_url=plan_create_url submit_label=create_plan_label submit_icon="plus" box_class="max-w-2xl" two_columns=True %} {# --- Plans ----------------------------------------------------------- #}
| {% trans "Plan" %} | {% trans "Timing" %} | {% trans "Clubs" %} | {% trans "Prices" %} | |
|---|---|---|---|---|
|
{{ plan.name }}
{% if plan.is_trial %}{% trans "Trial" %}{% endif %}
{% if not plan.is_active %}{% trans "Retired" %}{% endif %}
{% if plan.description %}{{ plan.description }} {% endif %}
|
{% comment %}
Named for what each measures from, because that is the easy
thing to get wrong: grace runs from the period START, not its
end.
{% endcomment %}
{% blocktrans count counter=plan.duration_months %}{{ counter }} month{% plural %}{{ counter }} months{% endblocktrans %}
{% blocktrans with days=plan.renewal_lead_days %}billed {{ days }}d before start{% endblocktrans %}
{% blocktrans with days=plan.grace_days %}grace {{ days }}d after start{% endblocktrans %}
|
{{ plan.club_count }} |
{% for price in plan.prices.all %}
€ {{ price.amount|floatformat:2 }}
{% blocktrans with active_from=price.active_from|date:"Y-m-d" %}from {{ active_from }}{% endblocktrans %}
{% if price.active_from > today %}{% trans "Scheduled" %}{% endif %}
{% empty %}
{% trans "No price — cannot be billed" %}
{% endfor %}
|
|
| {% trans "No plans yet." %} | ||||
| {% trans "Club" %} | {% trans "Period" %} | {% trans "Balance" %} | {% trans "Status" %} | |
|---|---|---|---|---|
|
{{ due.club.name }}
{{ due.plan.name }}
|
{{ due.period_start|date:"Y-m-d" }} → {{ due.period_end|date:"Y-m-d" }}
{% blocktrans with grace_until=due.grace_until|date:"Y-m-d" %}grace to {{ grace_until }}{% endblocktrans %}
|
€ {{ due.balance|floatformat:2 }} | {% if due.grace_until < today %} {% lucide "triangle-alert" size=11 %} {% trans "Overdue" %} {% elif due.period_end < today %} {% lucide "hourglass" size=11 %} {% trans "In grace" %} {% else %} {{ due.get_status_display }} {% endif %} | |
| {% trans "Nothing outstanding." %} | ||||