{% extends 'base.html' %} {% load static %} {% block title %}Payment Details - {{ payment.payment_id }}{% endblock %} {% block content %}

Payment Details {% if payment.payment_method == 'mpesa' and payment.mpesa_receipt_number %} - {{ payment.mpesa_receipt_number }} {% elif payment.payment_method == 'cash' and payment.cash_receipt_number %} - {{ payment.cash_receipt_number }} {% else %} - {{ payment.payment_id }} {% endif %}

{% if payment.status != 'completed' %} Edit Payment {% endif %} Back to Payments
Payment Information
{% if payment.processed_at %} {% endif %}
Payment ID: {{ payment.payment_id }}
Amount: KES {{ payment.amount }}
Payment Method: {{ payment.get_payment_method_display }}
Status: {{ payment.get_status_display }}
Date Created: {{ payment.created_at|date:"M d, Y H:i" }}
Date Processed: {{ payment.processed_at|date:"M d, Y H:i" }}
{% if payment.mpesa_reference %} {% endif %} {% if payment.bank_reference %} {% endif %} {% if payment.cash_receipt_number %} {% endif %} {% if payment.cash_received_by %} {% endif %} {% if payment.invoice %} {% endif %} {% if payment.notes %} {% endif %}
M-Pesa Reference: {{ payment.mpesa_reference }}
Bank Reference: {{ payment.bank_reference }}
Cash Receipt Number: {{ payment.cash_receipt_number }}
Cash Received By: {{ payment.cash_received_by.get_full_name|default:payment.cash_received_by.username }}
Related Invoice: {{ payment.invoice.invoice_number }}
Notes: {{ payment.notes }}
Customer Information
{% if payment.customer.profile_picture %} {% else %}
{{ payment.customer.initials }}
{% endif %}
{{ payment.customer.full_name }}

{{ payment.customer.customer_id }}

Email: {{ payment.customer.email }}
Phone: {{ payment.customer.phone }}
Package: {{ payment.customer.package.name|default:"No package" }}
Status: {{ payment.customer.get_status_display }}
{% if payment.status == 'pending' %}
Payment Actions
This payment is still pending. You can mark it as completed or failed.
{% csrf_token %}
{% csrf_token %}
{% endif %}
{% endblock %}