Display 2 decimals in invoices

This commit is contained in:
Yohann D'ANELLO 2020-08-06 21:02:25 +02:00
parent 979628b02d
commit 5c01c0bb6c
2 changed files with 3 additions and 4 deletions

View File

@ -141,9 +141,8 @@ class InvoiceRenderView(LoginRequiredMixin, View):
invoice = Invoice.objects.filter(PermissionBackend.filter_queryset(request.user, Invoice, "view")).get(pk=pk)
products = Product.objects.filter(invoice=invoice).all()
# Informations of the BDE. Should be updated when the school will move.
invoice.place = "Gif-sur-Yvette"
invoice.my_name = "BDE ENS Paris-Saclay"
invoice.my_name = "BDE ENS Cachan"
invoice.my_address_street = "4 avenue des Sciences"
invoice.my_city = "91190 Gif-sur-Yvette"
invoice.bank_code = 30003

View File

@ -48,7 +48,7 @@
\newcommand {\ListeProduits}{
{% for product in products %}
{{ product.designation|safe|escape_tex }} & {{ product.amount_euros|safe|escape_tex }} & {{ product.quantity|safe|escape_tex }} & {{ product.total_euros|safe|escape_tex }} \cr
{{ product.designation|safe|escape_tex }} & {{ product.amount_euros|safe|escape_tex|floatformat:2 }} & {{ product.quantity|safe|escape_tex|floatformat:2 }} & {{ product.total_euros|safe|escape_tex|floatformat:2 }} \cr
{% endfor %}
}