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