{% extends 'oscar/dashboard/layout.html' %} {% load i18n %} {% load currency_filters %} {% block body_class %}{{ block.super }} 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 %} {% block customer_information %} {% if order.guest_email %} {% elif order.user %} {% else %} {% endif %}
{% trans "Customer Information" %}
{% trans "Name" %} {% trans "Email address" %}
{% trans "Customer checked out as a guest." %} {{ order.email }}
{% trans "Name" %} {% trans "Email address" %}
{{ order.user.get_full_name|default:"-" }} {{ order.user.email|default:"-" }}
{% trans "Customer has deleted their account." %}
{% endblock customer_information %} {% block order_information %}
{% trans "Order information" %}
{% trans "Order Total" %} {% trans "Date of purchase" %} {% trans "Time of purchase" %} {% trans "Status" %}
{{ order.total_incl_tax|currency:order.currency }} {{ order.date_placed|date }} {{ order.date_placed|time }} {{ order.status|default:"N/A" }}
{% endblock order_information %} {% block additional_order_information %} {% endblock additional_order_information %}

{% trans "Order Details" %}

{% trans "Items ordered" %}

{% csrf_token %} {% block order_lines %} {% for line in lines %} {% endfor %} {% with discounts=order.basket_discounts %} {% if discounts %} {% for discount in discounts %} {% endfor %} {% else %} {% endif %} {% endwith %} {% if order.has_shipping_discounts %} {% for discount in order.shipping_discounts %} {% endfor %} {% else %} {% endif %} {% with surcharges=order.surcharges.all %} {% if surcharges %} {% for charge in surcharges %} {% endfor %} {% endif %} {% endwith %}
{% trans "Line ID" %} {% trans "Quantity" %} {% trans "Product" %} {% trans "UPC" %} {% trans "Status" %} {% trans "Supplier" %} {% trans "Supplier SKU" %} {% trans "Price excl tax (before discounts)" %} {% trans "Price inc tax (before discounts)" %} {% trans "Actions" %}
#{{ line.id }} {{ line.quantity }} {% if line.product %} {{ line.title }} {% else %} {{ line.title }} {% endif %} {{ line.upc|default:"-" }} {{ line.status|default:"-" }} {% if line.partner %} {{ line.partner_name }} {% else %} {{ line.partner_name }} {% endif %} {{ line.partner_sku }} {{ line.line_price_before_discounts_excl_tax|currency:order.currency }} {{ line.line_price_before_discounts_incl_tax|currency:order.currency }} {% trans "View" %}
{% trans "Discount" %} {{ order.total_discount_excl_tax|currency:order.currency }} {{ order.total_discount_incl_tax|currency:order.currency }}
{% trans "Basket total (excl. discounts)" %} {{ order.basket_total_before_discounts_excl_tax|currency:order.currency }} {{ order.basket_total_before_discounts_incl_tax|currency:order.currency }}
{% trans "Discount" %} {{ discount.offer_name }} - {{ discount.amount|currency:order.currency }}
{% trans "Basket total (inc. discounts)" %} {{ order.basket_total_excl_tax|currency:order.currency }} {{ order.basket_total_incl_tax|currency:order.currency }}
{% trans "Basket total" %} {{ order.basket_total_excl_tax|currency:order.currency }} {{ order.basket_total_incl_tax|currency:order.currency }}
{% trans "Shipping total (excl. discounts)" %} {{ order.shipping_before_discounts_excl_tax|currency:order.currency }} {{ order.shipping_before_discounts_incl_tax|currency:order.currency }}
{% trans "Discount" %} {{ discount.offer_name }} - {{ discount.amount|currency:order.currency }}
{% trans "Shipping total (inc. discounts)" %} {{ order.shipping_excl_tax|currency:order.currency }} {{ order.shipping_incl_tax|currency:order.currency }}
{% trans "Shipping total" %} {{ order.shipping_excl_tax|currency:order.currency }} {{ order.shipping_incl_tax|currency:order.currency }}
{% blocktrans with name=charge.name %}Surcharge {{ name }}{% endblocktrans %} {{ charge.excl_tax|currency:order.currency }} {{ charge.incl_tax|currency:order.currency }}
{% trans "Order total" %} {{ order.total_excl_tax|currency:order.currency }} {{ order.total_incl_tax|currency:order.currency }}
{% endblock order_lines %} {% comment %} This is the important block within this template: you will almost certainly want to override this block to provide your own form widgets that suit your order processing flow. The default contents shows a range of widgets - more than is sensible really. {% endcomment %} {% block line_actions %}

{% trans "With selected lines" %}:

{% endblock line_actions %}
{% csrf_token %} {% block order_actions %}

{% trans "Change order status" %}:

{% if order_status_form.has_choices %} {% include "oscar/dashboard/partials/form_fields.html" with form=order_status_form %}
{% else %} {% trans "This order can't have its status changed." %} {% endif %}
{% endblock %}
{% block order_status_changes %}

{% trans "Status Changes" %}

{% with status_changes=order.status_changes.all %} {% if status_changes %} {% for status_change in status_changes %} {% endfor %} {% else %} {% endif %}
{% trans "From" %} {% trans "To" %} {% trans "Date" %}
{{ status_change.old_status }} {{ status_change.new_status }} {{ status_change.date_created }}
{% trans "No status changes." %}
{% endwith %} {% endblock %} {% block shipping_events %}

{% trans "Shipping Events" %}

{% with events=order.shipping_events.all %} {% if events %} {% for event in events %} {% with line_qtys=event.line_quantities.all %} {% endwith %} {% endfor %} {% else %} {% endif %}
{% trans "Date" %} {% trans "Event" %} {% trans "Lines" %} {% trans "Reference" %}
{{ event.date_created }} {{ event.event_type.name }} {% for line_qty in event.line_quantities.all %} {% blocktrans with title=line_qty.line.title event_qty=line_qty.quantity total_qty=line_qty.line.quantity %} {{ title }} (quantity {{ event_qty }}/{{ total_qty }}) {% endblocktrans %} {% endfor %} {{ event.notes|default:"-" }}
{% trans "No shipping events." %}
{% endwith %} {% endblock %} {% block payment_events %}

{% trans "Payment Events" %}

{% with events=order.payment_events.all %} {% if events %} {% for event in events %} {% with line_qtys=event.line_quantities.all %} {% endwith %} {% endfor %} {% else %} {% endif %}
{% trans "Date" %} {% trans "Event" %} {% trans "Amount" %} {% trans "Lines" %} {% trans "Reference" %}
{{ event.date_created }} {{ event.event_type.name }} {{ event.amount|currency:order.currency }} {% for line_qty in event.line_quantities.all %} {% trans "Product:" %} {{ line_qty.line.title }} - {% trans "quantity" %} {{ line_qty.quantity }}
{% endfor %}
{{ event.reference|default:"-" }}
{% trans "No payment events." %}
{% endwith %} {% endblock %}
{% block tab_shipping %}

{% trans "Shipping" %}

{% trans "Method name" %} {{ order.shipping_method }}
{% trans "Method code" %} {{ order.shipping_code|upper }}
{% trans "Charge (incl tax)" %} {{ order.shipping_incl_tax|currency:order.currency }}
{% trans "Charge (excl tax)" %} {{ order.shipping_excl_tax|currency:order.currency }}
{% trans "Address" %} {% for field in order.shipping_address.active_address_fields %} {{ field }}
{% endfor %} {% trans "Update" %}
{% trans "Phone" %} {{ order.shipping_address.phone_number|default:"-" }}
{% trans "Instructions" %} {{ order.shipping_address.notes|default:"-"|linebreaks }}
{% endblock %}
{% block tab_payment %} {% 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:order.currency }} {{ source.amount_debited|currency:order.currency }} {{ source.amount_refunded|currency:order.currency }} {{ source.reference|default:"-" }}
{% else %}
{% trans "No payment sources found for this order." %}
{% endif %} {% endwith %} {% block payment_transactions %} {% if payment_transactions %}

{% trans "Transactions" %}

{% for txn in payment_transactions %} {% endfor %}
{% trans "Source" %} {% trans "Amount" %} {% trans "Reference" %} {% trans "Status" %} {% trans "Date" %}
{{ txn.source.source_type }} {{ txn.amount|currency:order.currency }} {{ txn.reference|default:"-" }} {{ txn.status|default:"-" }} {{ txn.date_created }}
{% endif %} {% endblock %} {% endblock %}
{% block tab_discounts %} {% with discounts=order.discounts.all %}

{% trans "Discounts" %}

{% if discounts %} {% for discount in discounts %} {% endfor %}
{% trans "Type" %} {% trans "Voucher" %} {% trans "Offer name" %} {% trans "Frequency" %} {% trans "Message" %} {% trans "Amount" %}
{{ discount.get_category_display }} {{ discount.voucher.code|default:"-" }} {% if discount.offer %} {{ discount.offer.name }} {% else %} {{ discount.offer_name }} {% endif %} {{ discount.frequency }} {{ discount.message|default:"-" }} {{ discount.amount|currency:order.currency }}
{% else %}
{% trans "No discounts were applied to this order." %}
{% endif %} {% endwith %} {% endblock %}
{% block tab_notes %}

{% trans "Notes" %}

{% with notes=order.notes.all %} {% if notes %} {% for note in notes %} {% endfor %} {% else %} {% endif %}
{% trans "Date" %} {% trans "User" %} {% trans "Type" %} {% trans "Message" %} {% trans "Admin" %}
{{ note.date_created }} {{ note.user|default:"-" }} {{ note.note_type|default:"-" }} {{ note.message|linebreaks }} {% if note.is_editable %} {% trans "Edit" %}
{% csrf_token %}
{% endif %}
{% trans "No notes available." %}
{% endwith %}
{% csrf_token %} {% include "oscar/dashboard/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 %} {{ block.super }} oscar.dashboard.orders.initTabs(); oscar.dashboard.orders.initTable(); {% endblock %}