{% extends 'dashboard/base.html' %} {% load static %} {% load humanize %} {% block title %}Billing History - Peza API{% endblock %} {% block breadcrumb %}Billing History{% endblock %} {% block content %}

Billing History

Subscriptions & payment records

Successful
{{ successful_count|default:0 }}
Pending
{{ pending_count|default:0 }}
Total Spent
MWK {{ total_spent|default:0|floatformat:0|intcomma }}

Transactions

{% if transactions %} {{ page_obj.paginator.count }} item{{ page_obj.paginator.count|pluralize }} {% endif %}
{% if transactions %}
{% for tx in transactions %} {% endfor %}
Date ID Plan Amount Provider Status Action
{{ tx.created_at|date:"M d, Y" }}
{{ tx.created_at|time:"H:i" }}
{{ tx.charge_id|slice:":8" }}…{{ tx.charge_id|slice:"-4:" }} {{ tx.plan.name|default:"—" }} MWK {{ tx.amount|floatformat:0|intcomma }}
{% if 'airtel' in tx.operator_ref_id|lower or tx.operator_ref_id == '1' %} Airtel {% elif 'tnm' in tx.operator_ref_id|lower or tx.operator_ref_id == '2' %} TNM {% else %} {{ tx.mobile|default:"—" }} {% endif %}
{% if tx.status == 'success' %} Success {% elif tx.status == 'pending' %} Pending {% elif tx.status == 'failed' %} Failed {% else %} {{ tx.get_status_display }} {% endif %} {% if tx.status == 'pending' %} {% elif tx.status == 'success' %} ✓ Done {% endif %}
Showing {{ page_obj.start_index }}-{{ page_obj.end_index }} of {{ page_obj.paginator.count }} transaction{{ page_obj.paginator.count|pluralize }}
{% if page_obj.has_other_pages %} {% endif %} New Plan
{% else %}

No transactions yet

Subscribe to a plan to get started.

Subscribe Now
{% endif %}
{% endblock %}