feat: update status comanda for PAYING

This commit is contained in:
2024-12-20 10:11:50 -03:00
parent dfb7418e7a
commit aed3b906a4
9 changed files with 37 additions and 7 deletions

View File

@@ -26,4 +26,12 @@ def removeProductComanda(request, productComanda_id):
total = 0
for produto in consumo:
total += produto.product.price
return render(request, "htmx_components/htmx_list_products_in_comanda.html",{'consumo': consumo, 'total': total})
return render(request, "htmx_components/htmx_list_products_in_comanda.html",{'consumo': consumo, 'total': total})
def closeComanda(request, comanda_id):
# id = request.POST.get('id-comanda')
# comanda_id = int(id)
comanda = Comanda.objects.get(id=comanda_id)
comanda.status = "PAYING"
comanda.save()
return redirect('comandas')