{% 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" %}

{% if voucher.limit_usage_by_group %} {% endif %}
{% trans "Name" %} {{ voucher.name }}
{% trans "Description" %} {{ voucher.offers.first.description|safe }}
{% trans "Code" %} {{ voucher.code }}
{% trans "Num child codes" %} {{ children.count }}
{% trans "Priority" %} {{ voucher.priority }}
{% trans "Start datetime" %} {{ voucher.start_datetime }}
{% trans "End datetime" %} {{ voucher.end_datetime }}
{% trans "Desktop Image" %} {% if voucher.offers.first %} {% include "oscar/dashboard/vouchers/voucher_thumbnail.html" with record=voucher.offers.first.desktop_image %} {% endif %}
{% trans "Mobile Image" %} {% if voucher.offers.first %} {% include "oscar/dashboard/vouchers/voucher_thumbnail.html" with record=voucher.offers.first.mobile_image %} {% endif %}
{% trans "Usage" %} {{ voucher.get_usage_display }}
{% trans "Condition" %} {{ voucher.condition.description|safe }}
{% trans "Discount" %} {{ voucher.benefit.description|safe }}
{% trans "Usage is limited to specific user groups?" %} {% if voucher.limit_usage_by_group %} {% trans "Yes" %} {% else %} {% trans "No" %} {% endif %}
{% trans "Whitelisted User Groups" %} {% for group in voucher.groups.all %} {{ group.name }} {% endfor %}
{% trans "Offer Group" %} {{ voucher.offer_group.name|default:"-" }}

{% 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 %}