{% extends 'dashboard/reports/index.html' %}
{% load currency_filters %}
{% load i18n %}

{% block report %}
{% if objects %}
	<table class="table table-striped table-bordered">
		<tr>
			<th>{% trans "Order number" %}</th>
			<th>{% trans "User" %}</th>
			<th>{% trans "Total incl. tax" %}</th>
			<th>{% trans "Date placed" %}</th>
			<th></th>
		</tr>
		{% for order in objects %}
		<tr>
			<td>{{ order.number }}</td>
			<td>{{ order.user }}</td>
			<td>{{ order.total_incl_tax|currency }}</td>
			<td>{{ order.date_placed }}</td>
			<td>
				<a class="btn btn-info" href="{% url dashboard:order-detail order.number %}">{% trans "View" %}</a>
			</td>
		</tr>
		{% endfor %}
	</table>
    {% if page_obj %}
        {% include "catalogue/partials/pagination.html" %}
    {% endif %}
{% else %}
<p>{% trans "No results found." %}</p>
{% endif %}
{% endblock %}
