{% extends "cms/base.html" %} {% block title %}{{ order.display_number }} — Order{% endblock %} {% block page_title %}Order{% endblock %} {% block extra_head %} {% endblock %} {% block cms_content %}

{{ order.display_number }}

{{ order.created_at|date:"d M Y, H:i" }}  ·  {% 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 %}
Back
Invoice Sent to {{ order.customer_email }} {% if email_logs %} Sent {{ email_logs.0.sent_at|date:"d M Y, H:i" }} {% if email_logs|length > 1 %} · {{ email_logs|length }} times{% endif %} {% else %} Not sent yet {% endif %}
{% if email_logs %}
{% else %}
No invoice email has been sent for this order yet.
{% endif %}
Order & Payment
{% for item in order.items.all %} {% endfor %} {% if order.tax_amount %} {% endif %} {% if order.balance_due > 0 %} {% endif %}
Item Qty Unit Total
{{ item.product_name }}
{% if item.domain_name %}
{{ item.domain_name }} ({{ item.registration_years }} yr)
{% endif %} {% if item.custom_description %}
{{ item.custom_description }}
{% endif %}
{{ item.quantity }} £{{ item.unit_price }} £{{ item.total_price }}
VAT £{{ order.tax_amount }}
Total £{{ order.total }}
Paid £{{ order.amount_paid }}
Stripe Charges{% if order.stripe_fee_is_estimated %} (estimated){% endif %} {% if order.stripe_fee_effective %}−£{{ order.stripe_fee_effective }}{% else %}£0.00{% endif %}
Profit £{{ order.net_profit }}
Balance Due £{{ order.balance_due }}
{% if order.paid_at or order.card_last4 or order.stripe_payment_intent_id %}
Payment Details
{% if order.order_kind %} {% endif %} {% if order.paid_at %} {% endif %} {% if order.stripe_payment_intent_id %} {% endif %}
Type{{ order.order_kind }}
Details {{ order.paid_at|date:"d M Y, H:i" }}{% if order.cardholder_name %} by {{ order.cardholder_name }}{% endif %}{% if order.card_country %}, {{ order.card_country }}{% endif %}{% if order.card_postcode %}, {{ order.card_postcode }}{% endif %}{% if order.card_last4 %}, {{ order.card_brand|default:"card" }} ending {{ order.card_last4 }}{% endif %}
Stripe {{ order.stripe_payment_intent_id|truncatechars:22 }}
{% endif %}
{% if order.customer_notes %}
Customer Notes
{{ order.customer_notes }}
{% endif %}
Internal Notes
{% for item in order.items.all %} {% if item.domain_name %}
Domain — {{ item.domain_name }}
{% if item.domain_registration %} {% with reg=item.domain_registration %} {% if reg.registrar_order_id %} {% endif %} {% if reg.registered_at %} {% endif %} {% if reg.error_message %} {% endif %}
Status {% if reg.status == 'registered' %}Registered {% elif reg.status == 'failed' %}Failed {% else %}Pending{% endif %}
Registrar ID{{ reg.registrar_order_id }}
Registered{{ reg.registered_at|date:"d M Y" }}
Error{{ reg.error_message }}
{% endwith %} {% else %}
No registration record yet.
{% endif %}
{% endif %} {% endfor %}
{% csrf_token %}
Customer Edit
{% if order.customer_phone %}{% endif %} {% if order.customer_company %}{% endif %} {% if order.customer_address %}{% endif %} {% if order.customer_postcode %}{% endif %} {% if order.customer_country %}{% endif %}
Name{{ order.customer_name }}
Email{{ order.customer_email }}
Phone{{ order.customer_phone }}
Company{{ order.customer_company }}
Address{{ order.customer_address }}
Postcode{{ order.customer_postcode }}
Country{{ order.customer_country }}
Status
{% csrf_token %}
{% with ag=order.agreements.first %} {% if ag %}
{% if ag.is_accepted %}Signed by {{ ag.signed_name }}, {{ ag.accepted_at|date:"d M Y, H:i" }} {% else %}Sent to {{ ag.sent_to_email }}{% if ag.sent_at %}, {{ ag.sent_at|date:"d M Y, H:i" }}{% endif %}, awaiting signature {% endif %}
{% endif %} {% if ag %}Resend Deal Link{% else %}Send Deal Link{% endif %} {% endwith %} {% if order.status != 'refunded' and order.status != 'cancelled' %}
{% csrf_token %}
{% else %}
{% if order.status == 'refunded' %}Order has been refunded{% else %}Order is cancelled{% endif %}
{% endif %}
{% endblock %}