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

← Back to Orders

Order {{ order.order_number }}

Status: {{ order.get_status_display }}

Total: {{ order.total_amount }}
Created {{ order.created_at|date:"d M Y, H:i" }}

Customer

{{ order.customer.name }}

{{ order.customer.phone|default:"No phone recorded" }}

{{ order.customer.email|default:"No email recorded" }}

{{ order.customer.delivery_address|default:"No delivery address recorded" }}

Order information

Assigned staff: {{ order.assigned_to|default:"Unassigned" }}

Created by: {{ order.created_by|default:"—" }}

Last updated: {{ order.updated_at|date:"d M Y, H:i" }}

{% if order.decline_reason %}

Decline reason: {{ order.decline_reason }}

{% endif %}{% if order.notes %}

Notes: {{ order.notes }}

{% endif %}

Items

{% for item in order.items.all %}{% empty %}{% endfor %}
ProductSKUVariantQtyUnit priceLine total
{{ item.product_name }}{{ item.sku|default:"—" }}{{ item.variant|default:"—" }}{{ item.quantity }}{{ item.unit_price }}{{ item.line_total }}
No items recorded.

Invoice and payments

{% if order.invoice %}

Invoice: {{ order.invoice.invoice_number }} · {{ order.invoice.get_status_display }} · Total {{ order.invoice.total_amount }}

{% for payment in order.invoice.payments.all %}{% empty %}{% endfor %}
MethodReferenceAmountStatusRecorded
{{ payment.get_method_display|default:payment.method }}{{ payment.external_reference|default:"—" }}{{ payment.amount }}{{ payment.get_status_display }}{{ payment.created_at|date:"d M Y, H:i" }}
No payments recorded.
{% else %}

No invoice has been created for this order.

{% endif %}

Available workflow actions

These buttons submit POST requests to the existing workflow routes. Decline requires a reason.

{% if can_accept %}
{% csrf_token %}
{% endif %} {% if can_hold %}
{% csrf_token %}
{% endif %} {% if can_decline %}
{% csrf_token %}
{% endif %}

Only actions allowed by the order's current state and your permissions will succeed. Workflow processing is validated server-side.

{% endblock %}