{% extends "cms/base.html" %} {% block title %}Orders{% endblock %} {% block page_title %}Orders{% endblock %} {% block extra_head %} {% endblock %} {% block cms_content %}

Orders ({{ total_count }})

{% if status_filter %}{% endif %} {% if cat_filter %}{% endif %} {% if search %}✕{% endif %}
{% for b in rev_boxes %}
£{{ b.revenue|floatformat:2 }}
{{ b.label }}
{{ b.count }} order{{ b.count|pluralize }}
{% endfor %}
Filter by Status
All {{ total_count }} {% for val, label, cnt in statuses_with_counts %} {{ label }} {{ cnt }} {% endfor %}
Total Revenue
£{{ total_revenue|floatformat:2 }}
from orders with payment received
{% if orders %} {% for order in orders %} {% endfor %}
# Order Customer Items Total Status Date & Time Actions
{{ forloop.counter }} {{ order.display_number }}
{{ order.customer_name }}
{{ order.customer_email }}
{% if order.customer_phone %}
{{ order.customer_phone }}
{% endif %}
{% for item in order.items.all %}{{ item.product_name }}{% if not forloop.last %}, {% endif %}{% endfor %}
£{{ order.total }}
{% if order.amount_paid and order.amount_paid != order.total %}
Paid: £{{ order.amount_paid }}
{% endif %} {% if order.balance_due > 0 %}
£{{ order.balance_due }} due
{% endif %}
{% if order.status == 'paid' or order.status == 'completed' %} {{ order.get_status_display }} {% elif order.status == 'deposit_paid' or order.status == 'processing' %} {{ order.get_status_display }} {% elif order.status == 'cancelled' %} {{ order.get_status_display }} {% elif order.status == 'refunded' %} {{ order.get_status_display }} {% else %} {{ order.get_status_display }} {% endif %} {{ order.created_at|date:"d M Y, H:i" }} {% if order.status == 'paid' or order.status == 'completed' %}
{% csrf_token %}
{% endif %}
{% if orders.has_other_pages %}
Page {{ orders.number }} of {{ orders.paginator.num_pages }} — {{ orders.paginator.count }} orders
{% if orders.has_previous %} {% endif %} {% for num in orders.paginator.page_range %} {% if num == orders.number %} {{ num }} {% elif num >= orders.number|add:'-2' and num <= orders.number|add:'2' %} {{ num }} {% endif %} {% endfor %} {% if orders.has_next %} {% endif %}
{% endif %} {% else %}

{% if search or status_filter %}No orders match your filters.{% else %}No orders yet.{% endif %}

{% endif %}
{% endblock %}