bug: add product balcao resolved

This commit is contained in:
2025-01-15 13:42:15 -03:00
parent 43d9cd9c5b
commit 8a13a8806a
14 changed files with 16 additions and 14 deletions

View File

@@ -11,6 +11,7 @@ from payments.models import Payments
from typePay.models import TypePay
def listProductBalcao(request, comanda_id, search_product):
comanda_id = request.GET.get("id-comanda-balcao")
if search_product == '*':
produtos_mais_vendidos = list(ProductComanda.objects.values('product').annotate(
quantidade=Count('product'),
@@ -83,7 +84,3 @@ def paymentBalcao(request, comanda_id):
pagamento.save()
return redirect('viewBalcao')
#"GET /balcao/addProductBalcaoTeclado83/1/1/ HTTP/1.1" 200 747
#"GET /balcao/addProductBalcaoTeclado83/13/1/ HTTP/1.1" 500 133103

View File

@@ -18,6 +18,7 @@
<div class="grid-container">
<div style="text-align: center;">
<h1>Venda Balcão</h1>
<input hidden id="id-comanda-balcao" type="text" name="id-comanda-balcao" value="{{comanda.id}}">
<div>
<button id="pagarComanda" onclick="modal_payment_comanda()"
@@ -74,7 +75,7 @@
<article
name="productBox"
id="productId-{{ product.id }}"
onclick="addProductClick({{product.id}} , {{comanda.id}})"
onclick="addProductClick({{product.id}})"
style="background-color: #293552;">
<p hidden id="{{forloop.counter0}}">{{product.id}}</p>
<p hidden id="comanda{{forloop.counter0}}">{{comanda.id}}</p>
@@ -88,7 +89,7 @@
<article
name="productBox"
id="productId-{{ product.id }}"
onclick="addProductClick({{product.id}} , {{comanda.id}})"
onclick="addProductClick({{product.id}} )"
style="background-color: #293552;">
{{product.name}} <br>
R$ {{product.price}}