{% extends 'oscar/dashboard/layout.html' %} {% load currency_filters %} {% load i18n %} {% block title %} {% blocktrans with name=offer.name %} {{ name }} | Offers {% endblocktrans %} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block header %} {% endblock header %} {% block dashboard_content %}
{% if offer.is_available %} {% trans "Offer currently available" %} {% else %} {% trans "Offer not available due to restrictions!" %} {% endif %} {% trans "Total cost:" %} {{ offer.total_discount|currency }} {% trans "Number of orders:" %} {{ offer.num_orders }} {% trans "Number of uses:" %} {{ offer.num_applications }}
{% trans "Date created:" %} {{ offer.date_created }}

{% trans "Offer details" %}

{% trans "Name" %} {{ offer.name }} {% trans "Edit" %}
{% trans "Description" %} {{ offer.description|safe|default:"-" }}
{% trans "Incentive" %} {{ offer.benefit.description|safe }} {% trans "Edit" %}
{% trans "Condition" %} {{ offer.condition.description|safe }} {% trans "Edit" %}
{% trans "Restrictions" %} {% for restriction in offer.availability_restrictions %} {% if not restriction.is_satisfied %} {{ restriction.description }}
{% else %} {{ restriction.description }}
{% endif %} {% endfor %}
{% trans "Edit" %}
{% if order_discounts %}
{% trans "Export to CSV" %}

{% trans "Orders that used this offer" %}

{% for discount in order_discounts %} {% with order=discount.order %} {% endwith %} {% endfor %}
{% trans "Order number" %} {% trans "Order date" %} {% trans "Order total" %} {% trans "Cost" %}
{{ order.number }} {{ order.date_placed }} {{ order.total_incl_tax|currency }} {{ discount.amount|currency }}
{% include 'oscar/dashboard/partials/pagination.html' %} {% endif %} {% endblock dashboard_content %}