{% extends "base.html" %} {% from "components/ui.html" import page_header, breadcrumb_nav, button, filter_badge %} {% block content %} {% set breadcrumbs = [ {'text': 'Payments'} ] %} {{ page_header( icon_class='fas fa-credit-card', title_text='Payments', subtitle_text='Track and record payments from clients', breadcrumbs=breadcrumbs, actions_html='' + '
' + 'Export to Excel' + 'Record Payment' + '
' ) }}

{{ _('Total Payments') }}

{{ summary.total_payments }}

{{ _('Total Amount') }}

{{ currency|currency_symbol }}{{ "%.2f"|format(summary.total_amount) }}

Completed

{{ summary.completed_count }}

{{ currency|currency_symbol }}{{ "%.2f"|format(summary.completed_amount) }}

{{ _('Gateway Fees') }}

{{ currency|currency_symbol }}{{ "%.2f"|format(summary.total_fees) }}

{{ _('Filter Payments') }}

Clear

{{ payments|length }} payment{{ 's' if payments|length != 1 else '' }} found

Export {% if current_user.is_admin %}
{% endif %}
{% if current_user.is_admin %} {% endif %} {% if payments %} {% for payment in payments %} {% if current_user.is_admin %} {% endif %} {% endfor %} {% endif %}
ID Invoice Amount Date Method Status Actions
#{{ payment.id }} {{ payment.invoice.invoice_number }} {{ payment.amount }} {{ payment.currency or 'EUR' }} {% if payment.gateway_fee %}
Fee: {{ payment.gateway_fee }} {{ payment.currency or 'EUR' }}
{% endif %}
{{ payment.payment_date.strftime('%Y-%m-%d') if payment.payment_date else '—' }} {{ payment.method or '—' }} {% if payment.status == 'completed' %} Completed {% elif payment.status == 'pending' %} Pending {% elif payment.status == 'failed' %} Failed {% elif payment.status == 'refunded' %} Refunded {% else %} {{ payment.status|title }} {% endif %} View
{% if not payments %} {% from "components/ui.html" import empty_state %} {% set actions %} Record Your First Payment Learn More {% endset %} {% if filters.status or filters.method or filters.date_from or filters.date_to %} {{ empty_state('fas fa-search', 'No Payments Match Your Filters', 'Try adjusting your filters to see more results. You can clear filters or record a new payment that matches your criteria.', actions, type='no-results') }} {% else %} {{ empty_state('fas fa-credit-card', 'No Payments Yet', 'Track payments received from clients to manage your cash flow. Record your first payment to get started!', actions, type='no-data') }} {% endif %} {% endif %}
{% if current_user.is_admin %} {% endif %} {% endblock %} {% block scripts_extra %} {% endblock %}