{% extends 'oscar/dashboard/vouchers/voucher_detail.html' %} {% load currency_filters %} {% load sorting_tags %} {% load i18n %} {% 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 "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 "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 "Voucher code" %} {% trans "Order total" %} {% trans "Discount" %} {% trans "Date placed" %}
{{ order.number }} {{ discount.voucher_code }} {{ order.total_incl_tax|currency:order.currency }} {{ discount.amount|currency:order.currency }} {{ order.date_placed }}
{% trans "Edit" %} {% trans "or" %} {% trans "Delete" %} {% trans "or" %} {% trans "cancel" %}
{% endblock %}