checkout/src/purchase/templates/purchase/reports.html

47 lines
1.6 KiB
HTML
Raw Normal View History

{% extends "common/base.html" %}
2022-09-25 19:51:21 +02:00
{% load static i18n purchase django_htmx %}
{% block extrahead %}
<link rel="stylesheet" href="{% static "purchase/css/reports.css" %}">
{% endblock %}
{% block content %}
2022-04-25 23:04:49 +02:00
<h1>{% translate "Reports" %}</h1>
<h2>{% translate "General" %}</h2>
2022-04-25 22:24:01 +02:00
<ul>
2022-04-26 18:19:53 +02:00
<li>{% translate "Total turnover:" %} {{ turnover|currency }}</li>
2022-04-25 23:04:49 +02:00
<li>{% translate "Average basket:" %} {{ average_basket|currency }}</li>
2022-04-25 22:24:01 +02:00
</ul>
2022-04-26 18:19:53 +02:00
<h3>{% translate "By day" %}</h3>
<h4>{% translate "Turnover" %}</h4>
<ul>
{% for date, turnover in turnover_by_day.items %}
<li>{{ date }} : {{ turnover|currency }}</li>
{% endfor %}
</ul>
<h4>{% translate "Average basket" %}</h4>
<ul>
{% for date, average in average_basket_by_day.items %}
<li>{{ date }} : {{ average|currency }}</li>
{% endfor %}
</ul>
2022-09-25 19:51:21 +02:00
{% include "purchase/snippets/htmx_plot.html" with url='purchase:by_hour_plot' %}
2022-04-26 20:08:13 +02:00
2022-04-25 23:04:49 +02:00
<h2>{% translate "Products" %}</h2>
{% include "purchase/snippets/report_products.html" %}
2022-09-25 19:51:21 +02:00
{% include "purchase/snippets/htmx_plot.html" with url='purchase:products_plots' %}
2022-04-25 18:59:32 +02:00
2022-04-25 23:04:49 +02:00
<h2>{% translate "Turnover by payment method" %}</h2>
2022-04-25 18:59:32 +02:00
{% include "purchase/snippets/report_payment_methods.html" %}
2022-04-25 23:04:49 +02:00
<h2>{% translate "Baskets without payment method" %}</h2>
2022-04-25 18:59:32 +02:00
{% include "purchase/snippets/report_no_payment_method.html" %}
2022-09-25 19:51:21 +02:00
{% endblock %}
2022-04-25 18:59:32 +02:00
2022-09-25 19:51:21 +02:00
{% block extrascript %}
2023-03-25 21:37:35 +01:00
<script src="{% static 'vendor/htmx-1.8.6/htmx.min.js' %}" defer></script>
2022-09-25 19:51:21 +02:00
{% django_htmx_script %}
{% endblock %}