{% extends 'oscar/dashboard/vouchers/voucher_detail.html' %} {% load currency_filters %} {% load sorting_tags %} {% load i18n %} {% block header %} {% endblock header %} {% 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 "Orders that used this voucher" %}

{% include 'oscar/dashboard/partials/form_fields.html' with form=form %} {% if is_filtered %} {% trans "Reset" %} {% endif %}
{% if is_filtered %}

{% trans "Orders matching search" %}

{% else %}

{% trans "All orders" %}

{% endif %}
{% 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 status" %} {% trans "Voucher code" %} {% trans "Order total" %} {% trans "Discount" %} {% trans "Date placed" %}
{{ order.number }} {{ order.status }} {{ discount.voucher_code }} {{ order.total_incl_tax|currency:order.currency }} {{ discount.amount|currency:order.currency }} {{ order.date_placed }}
{% include 'oscar/dashboard/partials/pagination.html' %} {% endblock %} {% block extrastyles %} {{ block.super }} {% endblock %}