{% extends "base.html" %} {% block content %}

Sales

Revenue, voucher count, and individual transactions sourced from the vouchers table. Filter by range and source, then export the current view as CSV for accounting.

↓ Download CSV
{# Top summary stats — 2 cols on mobile portrait, auto-fit on desktop #}
Total Sales
₱{{ summary.total_pesos }}
{{ summary.count }} voucher{{ '' if summary.count == 1 else 's' }}
Minutes Granted
{{ summary.total_minutes }}
≈ {{ summary.total_minutes | duration }}
Avg per Voucher
₱{{ summary.avg_pesos }}
over {{ summary.count }} sale{{ '' if summary.count == 1 else 's' }}
Viewing
{% if range_filter == 'today' %}Today {% elif range_filter == '7d' %}7 days {% elif range_filter == '30d' %}30 days {% else %}All time{% endif %}
source: {{ source_filter }}

Date Range

{% set ranges = [('today', 'Today'), ('7d', 'Last 7 days'), ('30d', 'Last 30 days'), ('all', 'All time')] %} {% for slug, label in ranges %} {{ label }} {% endfor %}

Source

{% set sources = [('all', 'All'), ('vend', 'Vend'), ('extend', 'Extend'), ('custom', 'Custom')] %} {% for slug, label in sources %} {{ label }} {% endfor %}
{% if rows %}
{% for v in rows %} {% endfor %}
Date Code Source Time Paid MAC
{{ v.created }} {{ v.code }} {{ v.source }} {{ v.minutes_total | duration }} ₱{{ v.paid_pesos }} {% if v.mac %}{{ v.mac }} {% else %}{% endif %}
{% if row_limit_hit %}

Showing first 200 rows of the current filter. Narrow the range or download the CSV to see everything.

{% endif %} {% else %}
No sales in this view.
Try widening the range or switching source.
{% endif %}
{% endblock %}