{% extends "base.html" %} {% load gross from prices_i18n %} {% load i18n %} {% load staticfiles %} {% load discount_amount_for from prices %} {% block title %}{% trans "Order" %} {{ order }} — {{ block.super }}{% endblock %} {% block outerbreadcrumb %} {% if order.user == user %} {% endif %} {% endblock outerbreadcrumb %} {% block content %} {# This view is available by just knowing url, #} {# so we don't show all details (like delivery address) #} {# unless current user is owner of the order. #}
{% if order.user == user %}
{% trans "Billing address" %}
{% include "userprofile/snippets/address-details.html" with address=order.billing_address %}
{% if order.is_shipping_required %}
{% trans "Shipping address" %}
{% include "userprofile/snippets/address-details.html" with address=order.shipping_address %}
{% endif %} {% endif %}
{% for group in groups %}
{% blocktrans with number=forloop.counter %}Shipment #{{ number }}{% endblocktrans %} {{ group.get_status_display }}
{% for item in group %} {% endfor %} {% if group.shipping_price.gross %} {% endif %}
{% trans "Name" %} {% trans "Price" %} {% trans "Subtotal" %}
{% trans "Total" %} {% gross group.get_total %}
{{ item.product }}{% if item.quantity != 1 %} ×{{ item.quantity }}{% endif %} {% gross item.get_price_per_item %} {% gross item.get_total %}
{% trans "Shipping" %} {% gross group.shipping_price %} {% gross group.shipping_price %}
{% endfor %} {% if order.discount_amount %}
{{ order.discount_name }}
{% gross order.discount|discount_amount_for:order.total %}
{% endif %} {% if order.discount_amount or groups|length > 1 %}
{% trans "Total" %}
{% gross order.total %}
{% endif %} {% endblock content %}