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

{% block report %}
<table class="table table-striped table-bordered">
    <tr>
		<th>{% trans "Email" %}</th>
		<th>{% trans "Name" %}</th>
		<th>{% trans "Num lines" %}</th>
		<th>{% trans "Num items" %}</th>
		<th>{% trans "Value" %}</th>
		<th>{% trans "Date of creation" %}</th>
		<th>{% trans "Time since creation" %}</th>
    </tr>
    {% for basket in objects %}
    <tr>
        <td>{{ basket.owner.email|default:"-" }}</td>
        <td>{{ basket.owner.get_full_name|default:"-" }}</td>
        <td>{{ basket.num_lines }}</td>
        <td>{{ basket.num_items }}</td>
        <td>{{ basket.total_incl_tax|currency }}</td>
        <td>{{ basket.date_created }}</td>
        <td>{{ basket.time_since_creation }}</td>
    </tr>
    {% endfor %}
</table>
    {% if page_obj %}
        {% include "catalogue/partials/pagination.html" %}
    {% endif %}
{% endblock %}
