{% extends 'oscar/dashboard/layout.html' %} {% load currency_filters %} {% load i18n %} {% block title %} {{ voucher }} | {% trans "Vouchers" %} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block headertext %} {{ voucher }} {% endblock %} {% block dashboard_content %}

{% trans "Voucher details" %}

{% include "oscar/dashboard/vouchers/partials/voucher_details_table.html" %}

{% trans "Attached offers" %}

{% if voucher.offers.exists %} {% for offer in voucher.offers.all %} {% endfor %} {% else %} {% endif %}
{% trans "Offer name" %} {% trans "Start date" %} {% trans "End date" %} {% trans "Is available?" %} {% trans "Priority" %} {% trans "Incentive" %} {% trans "Condition" %} {% trans "Restrictions" %}
{{ offer.name }} {{ offer.start_datetime|default:"-" }} {{ offer.end_datetime|default:"-" }} {% if offer.is_available %} {% trans "Yes" %} {% else %} {% trans "No" %} {% endif %} {{ offer.priority }} {{ offer.benefit.description|safe }} {{ offer.condition.description|safe }} {% for restriction in offer.availability_restrictions %} {% if not restriction.is_satisfied %} {% else %} {{ restriction.description }}
{% endif %} {% endfor %}
{% trans "No offers are attached to this voucher." %}

{% trans "Voucher performance" %}

{% trans "Number of basket additions" %}{{ voucher.num_basket_additions }}
{% trans "Number of orders" %}{{ voucher.num_orders }}
{% trans "Total discount" %}{{ voucher.total_discount|currency }}

{% trans "Recent orders" %}

{% if not discounts %} {% else %} {% for discount in discounts %} {% with order=discount.order %} {% endwith %} {% endfor %} {% endif %}
{% trans "No orders have been placed that use this voucher." %}
{% trans "Order number" %} {% trans "Order total" %} {% trans "Discount" %} {% trans "Date placed" %}
{{ order.number }} {{ order.total_incl_tax|currency:order.currency }} {{ discount.amount|currency:order.currency }} {{ order.date_placed }}
{% if not voucher.voucher_set %} {% trans "Edit" %} {% trans "or" %} {% else %} {% trans "Edit set" %} {% trans "or" %} {% endif %} {% if not voucher.voucher_set %} {% trans "Delete" %} {% else %} {% trans "Delete from set" %} {% endif %} {% trans "or" %} {% trans "cancel" %}
{% endblock dashboard_content %}