Fix an error when computing and displaying sums

This commit is contained in:
Alexis MÃtaireau 2020-07-28 22:29:28 +02:00
parent 3bf456e9cf
commit 468f51f129
3 changed files with 11 additions and 4 deletions

View file

@ -6,7 +6,6 @@
<title>{% if title %}{{ title }} - {% endif %}{{ config.SITE_NAME }}</title> <title>{% if title %}{{ title }} - {% endif %}{{ config.SITE_NAME }}</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css"> -->
<link rel="stylesheet" type="text/css" href="/static/app.css"> <link rel="stylesheet" type="text/css" href="/static/app.css">
<link rel="stylesheet" type="text/css" href="/static/icomoon.css"> <link rel="stylesheet" type="text/css" href="/static/icomoon.css">
<link rel="stylesheet" type="text/css" href="/static/purecss.css"> <link rel="stylesheet" type="text/css" href="/static/purecss.css">

View file

@ -1,8 +1,8 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block body %} {% block body %}
{% for email, order in delivery.orders.items() %} {% for group_id, order in delivery.orders.items() %}
<h3>{{ request.groups.groups[email].name }}</h3> <h3>{{ request.groups.groups[group_id].name }}</h3>
{% include "includes/order_summary.html" %} {% include "includes/order_summary.html" %}
<hr class="page-break"> <hr class="page-break">
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}

View file

@ -282,6 +282,14 @@ async def show_orders_summary(request, response, id):
filename=utils.prefix("résumé-de-commandes.pdf", delivery), filename=utils.prefix("résumé-de-commandes.pdf", delivery),
) )
@app.route("/distribution/{id}/résumé-de-commandes.html", methods=["GET"])
async def show_orders_summary(request, response, id):
delivery = Delivery.load(id)
response.html(
"delivery/show_orders_summary.html",
delivery=delivery,
display_prices=True
)
@app.route("/distribution/{id}/rapport-complet.xlsx", methods=["GET"]) @app.route("/distribution/{id}/rapport-complet.xlsx", methods=["GET"])
async def generate_report(request, response, id): async def generate_report(request, response, id):