mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
feat: update status comanda for PAYING
This commit is contained in:
@@ -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')
|
||||
Reference in New Issue
Block a user