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

{% block report %}
{% if objects %}
	<table class="table table-striped table-bordered">
		<tr>
			<th>Order number</th>
			<th>User</th>
			<th>Total incl. tax</th>
			<th>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 %}">View</a>
			</td>
		</tr>
		{% endfor %}
	</table>
    {% if page_obj %}
        {% include "catalogue/partials/pagination.html" %}
    {% endif %}
{% else %}
	<p>No results found.</p>
{% endif %}
{% endblock %}
