{% load i18n %} {% if loyalty_program_enabled %} {% endif %} {% for order in object_list %} {% if loyalty_program_enabled %} {% endif %} {% endfor %}
{% trans 'Number' %} {% trans 'Date' %} {% trans 'Purchased items' %} {% trans 'Total' %}{% trans 'Loyalty points' %}{% trans 'Payment method' %} {% trans 'Status' %} {% trans 'Invoice' %}
{{ order.number }} {{ order.created }} {{ order.purchaseditem_set.all|join:', ' }} {{ order.get_total_display }} {% with order.loyalty_points_earned as loyalty_points_earned %} {% if loyalty_points_earned > 0 %} +{{ loyalty_points_earned }} {% endif %} {% endwith %} {% with order.loyalty_points_used as loyalty_points_used %} {% if loyalty_points_used > 0 %} -{{ loyalty_points_used }} {% endif %} {% endwith %} {{ order.payment_method.get_method_display }} {{ order.get_status_display }} {% if order.total > 0 and order.status == order.STATUS_AWAITING_PAYMENT %} {{ order.render_payment_button }} {% endif %} {% for invoice in order.invoices.all %} {{ invoice }}
{% empty %} {% if order.status != order.STATUS_AWAITING_PAYMENT and order.status != order.STATUS_CANCELLED %} {% trans 'Preparing...' %} {% endif %} {% endfor %}