{% extends 'dashboard/layout.html' %} {% load currency_filters %} {% load i18n %} {% block body_class %}orders{% endblock %} {% block title %} {% blocktrans with number=order.number %}Order {{ number }}{% endblocktrans %} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block headertext %} {% blocktrans with number=order.number %}Order #{{ number }}{% endblocktrans %} {% endblock %} {% block dashboard_content %}

{% trans "Customer Information" %}

{% if order.user %}

{% trans "Name" %}

{{ order.user.get_full_name|default:"-" }}

{% trans "Email address" %}

{{ order.user.email|default:"-" }}

{% else %}

{% trans "Customer checked out anonymously." %}

{% endif %}

{% trans "Order information" %}

{% trans "Order Total" %}

{{ order.total_incl_tax|currency }}

{% trans "Date of purchase" %}

{{ order.date_placed|date:"d/m/y" }}

{% trans "Time of purchase" %}

{{ order.date_placed|date:"H:s" }}

{% trans "Status" %}

{{ order.status|default:"N/A" }}

{% trans "Order Details" %}

{% trans "Items ordered" %}

{% csrf_token %} {% for line in order.lines.all %} {% endfor %}
{% trans "Select" %} {% trans "Quantity" %} {% trans "Product" %} {% trans "UPC" %} {% trans "Status" %} {% trans "Supplier" %} {% trans "Supplier SKU" %} {% trans "Est. delivery date" %} {% trans "Price (before discounts)" %} {% trans "Actions" %}
{{ line.quantity }} {{ line.title }} {{ line.upc|default:"-" }} {{ line.status|default:"-" }} {{ line.partner_name }} {{ line.partner_sku }} {{ line.est_dispatch_date|default:"-" }} {{ line.line_price_before_discounts_incl_tax|currency }} {% trans "View" %}
{% trans "Discount" %} {{ order.total_discount_incl_tax|currency }}
{% trans "Shipping charge" %} {{ order.shipping_incl_tax|currency }}
{% trans "Total" %} {{ order.total_incl_tax|currency }}
{% block line_actions %}

With selected lines:

{% endblock line_actions %}

{% trans "Shipping Events" %}

{% with events=order.shipping_events.all %} {% if events %} {% for event in events %} {% with line_qtys=event.line_quantities.all %} {% endwith %} {% endfor %}
{% trans "Date" %} {% trans "Event" %} {% trans "Lines" %} {% trans "Notes" %}
{{ event.date }} {{ event.event_type.name }} {% for line_qty in event.line_quantities.all %} {% trans "Product:" %} {{ line_qty.line.title }} - {% trans "quantity" %} {{ line_qty.quantity }}
{% endfor %}
{{ event.notes }}
{% else %}

No shipping events.

{% endif %} {% endwith %}

{% trans "Payment Events" %}

{% with events=order.payment_events.all %} {% if events %} {% for event in events %} {% with line_qtys=event.line_quantities.all %} {% endwith %} {% endfor %}
{% trans "Date" %} {% trans "Event" %} {% trans "Amount" %} {% trans "Lines" %}
{{ event.date }} {{ event.event_type.name }} {{ event.amount|currency }} {% for line_qty in event.line_quantities.all %} {% trans "Product:" %} {{ line_qty.line.title }} - {% trans "quantity" %} {{ line_qty.quantity }}
{% endfor %}
{% else %}

{% trans "No payment events." %}

{% endif %} {% endwith %}
{% block tab_shipping %}
{% trans "Method" %} {{ order.shipping_method }}
{% trans "Charge (incl tax)" %} {{ order.shipping_incl_tax|currency }}
{% trans "Charge (excl tax)" %} {{ order.shipping_excl_tax|currency }}
{% trans "Address" %} {% for field in order.shipping_address.active_address_fields %} {{ field }}
{% endfor %}
{% endblock %}
{% if order.billing_address %}

{% trans "Billing address" %}

{% for field in order.billing_address.active_address_fields %} {{ field }}
{% endfor %}

{% endif %} {% with sources=order.sources.all %}

{% trans "Payment sources" %}

{% if sources %} {% for source in sources %} {% endfor %}
{% trans "Source" %} {% trans "Allocation" %} {% trans "Amount debited" %} {% trans "Amount refunded" %} {% trans "Reference" %}
{{ source.source_type }} {{ source.amount_allocated|currency }} {{ source.amount_debited|currency }} {{ source.amount_refunded|currency }} {{ source.reference|default:"-" }}
{% else %}

{% trans "No payment sources" %}

{% endif %} {% endwith %} {% block tab_transactions %}

{% trans "Transactions" %}

{% trans "No transaction data available." %}

{% endblock %}
{% block tab_discounts %}

{% trans "Discounts" %}

{% with discounts=order.discounts.all %} {% if discounts %} {% for discount in discounts %} {% endfor %}
{% trans "Voucher code" %} {% trans "Offer name" %} {% trans "Amount" %}
{{ discount.voucher_code|default:"-" }} {{ discount.offer.name }} {{ discount.amount|currency}}
{% else %}

{% trans "No discounts were applied in this order." %}

{% endif %} {% endwith %} {% endblock %}
{% block tab_emails %}

{% trans "Emails" %}

{% trans "No email data available." %}

{% endblock %}
{% block tab_notes %}

{% trans "Notes" %}

{% with notes=order.notes.all %} {% if notes %} {% for note in notes %} {% endfor %}
{% trans "Date" %} {% trans "User" %} {% trans "Type" %} {% trans "Message" %}
{{ note.date_created }} {{ note.user }} {{ note.note_type }} {{ note.message|linebreaks }} {% if note.is_editable %}  {% trans "Edit" %}
{% csrf_token %}
{% endif %}
{% endif %} {% endwith %}
{% csrf_token %} {% include "partials/form_fields.html" with form=note_form %}
{% trans "Notes are only editable for 5 minutes after being saved." %}
{% endblock %}
{% block extra_tabs %}{% endblock %}
{% endblock dashboard_content %} {% block onbodyload %} oscar.dashboard.orders.initTabs(); oscar.dashboard.orders.initTable(); {% endblock %}