{% extends "django_program/base.html" %} {% block title %}Order {{ order.reference }}{% endblock %} {% block content %} {# ---- Billing Info ---- #}

Billing Information

Name
{{ order.billing_name|default:"--" }}
Email
{{ order.billing_email|default:"--" }}
Company
{{ order.billing_company|default:"--" }}
{% if order.voucher_code %}
Voucher
{{ order.voucher_code }}
{% endif %}
{# ---- Line Items ---- #}

Line Items

{% if order.discount_amount %} {% endif %} {% for item in order.line_items.all %} {% if order.discount_amount %} {% endif %} {% endfor %} {% if order.discount_amount %} {% endif %}
Description Qty Unit PriceDiscountLine Total
{{ item.description }} {{ item.quantity }} ${{ item.unit_price }} {% if item.discount_amount %}-${{ item.discount_amount }}{% else %}--{% endif %} ${{ item.line_total }}
Subtotal ${{ order.subtotal }}
Total Discount -${{ order.discount_amount }}
Total ${{ order.total }}
{# ---- Payment History ---- #} {% if order.payments.all|length %}

Payment History

{% for payment in order.payments.all %} {% endfor %}
Method Amount Date Status
{{ payment.get_method_display }} ${{ payment.amount }} {{ payment.created_at|date:"N j, Y, g:i A" }} {% if payment.status == "succeeded" %} {{ payment.get_status_display }} {% elif payment.status == "pending" or payment.status == "processing" %} {{ payment.get_status_display }} {% elif payment.status == "failed" %} {{ payment.get_status_display }} {% elif payment.status == "refunded" %} {{ payment.get_status_display }} {% else %} {{ payment.get_status_display }} {% endif %}
{% endif %} {% endblock %}