From fb54815df143f148ddf943121f16d7c6868074c8 Mon Sep 17 00:00:00 2001 From: nanoy Date: Sun, 2 Dec 2018 19:50:15 +0100 Subject: [PATCH] Ajustement des flottants --- gestion/views.py | 2 +- staticfiles/manage.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gestion/views.py b/gestion/views.py index 4f0826d..d30dc70 100644 --- a/gestion/views.py +++ b/gestion/views.py @@ -91,10 +91,10 @@ def manage(request): "pay_buttons": pay_buttons }) +@csrf_exempt @active_required @login_required @permission_required('gestion.add_consumptionhistory') -@csrf_exempt def order(request): """ Process the given order. Called by a js/JQuery script. diff --git a/staticfiles/manage.js b/staticfiles/manage.js index 7577025..39e174a 100644 --- a/staticfiles/manage.js +++ b/staticfiles/manage.js @@ -56,11 +56,11 @@ function generate_html(){ html ="" for(k=0;k' + product.name + '' + String(product.amount) + '' + String(product.quantity * product.amount) + ''; + html += '' + product.barcode + '' + product.name + '' + String(product.amount) + '' + String(Number((product.quantity * product.amount).toFixed(2))) + ''; } for(k=0; k' + menu.name + '' + String(menu.amount) + '' + String(menu.quantity * menu.amount) + ''; + html += '' + menu.barcode + '' + menu.name + '' + String(menu.amount) + '' + String(Number((menu.quantity * menu.amount).toFixed(2))) + ''; } $("#items").html(html) updateTotal(); @@ -74,9 +74,9 @@ function updateTotal(){ for(k=0; k