{% extends 'admin/base.html' %} {% block title %}Payments{% endblock %} {% block page_title %}Payment History{% endblock %} {% block content %} {# 1. Filter Section (Now correctly placed inside the block) #}
{% if is_super %} {% endif %}
{# 2. Statistics Grid #}
๐Ÿงพ
{{ logs.total }}
Total Transactions
โœ…
{{ successful_count }}
Successful
โŒ
{{ failed_count }}
Failed
๐Ÿ’ฐ
โ‚ฆ{{ "{:,.2f}".format(total_collected) }}
Total Collected
๐Ÿ“‹ Subscriber Transactions ๐Ÿฆ View Net Settlements โ†’
{# NEW COLUMN #} {% for log in logs.items %} {% set sub = subscribers.get(log.subscriber_id) %} {# NEW: Site Name Display #} {% else %} {% endfor %}
# Reference Subscriber SiteAmount Paid Status Date
{{ log.id }} {{ log.paystack_ref or 'โ€”' }} {% if sub %}
{{ sub.first_name }} {{ sub.surname }}
{{ sub.email }}
{% elif log.subscriber_id %} #{{ log.subscriber_id }} {% else %} โ€” {% endif %}
{{ sub.site.slug if sub else 'โ€”' }} โ‚ฆ{{ "{:,.2f}".format(log.amount) if log.amount else 'โ€”' }} {% if log.status == 'success' %} Success {% elif log.status == 'failed' %} Failed {% else %} {{ log.status or 'โ€”' }} {% endif %} {{ log.created_at.strftime('%d %b %Y %H:%M') if log.created_at else 'โ€”' }}
No payment records yet
๐Ÿ’ก This page shows amounts paid by subscribers. To see net revenue after Paystack fees, visit Settlements โ†’
{% endblock %}