diff --git a/gestaoRaul/categories/__pycache__/admin.cpython-310.pyc b/gestaoRaul/categories/__pycache__/admin.cpython-310.pyc index 0696802..c93574d 100644 Binary files a/gestaoRaul/categories/__pycache__/admin.cpython-310.pyc and b/gestaoRaul/categories/__pycache__/admin.cpython-310.pyc differ diff --git a/gestaoRaul/clients/__pycache__/admin.cpython-310.pyc b/gestaoRaul/clients/__pycache__/admin.cpython-310.pyc index cd98d29..f5b1a09 100644 Binary files a/gestaoRaul/clients/__pycache__/admin.cpython-310.pyc and b/gestaoRaul/clients/__pycache__/admin.cpython-310.pyc differ diff --git a/gestaoRaul/comandas/__pycache__/admin.cpython-310.pyc b/gestaoRaul/comandas/__pycache__/admin.cpython-310.pyc index 84b1566..4094585 100644 Binary files a/gestaoRaul/comandas/__pycache__/admin.cpython-310.pyc and b/gestaoRaul/comandas/__pycache__/admin.cpython-310.pyc differ diff --git a/gestaoRaul/comandas/__pycache__/htmx_views.cpython-310.pyc b/gestaoRaul/comandas/__pycache__/htmx_views.cpython-310.pyc index a2a96cc..897b583 100644 Binary files a/gestaoRaul/comandas/__pycache__/htmx_views.cpython-310.pyc and b/gestaoRaul/comandas/__pycache__/htmx_views.cpython-310.pyc differ diff --git a/gestaoRaul/comandas/htmx_views.py b/gestaoRaul/comandas/htmx_views.py index f3831c2..fd935b2 100644 --- a/gestaoRaul/comandas/htmx_views.py +++ b/gestaoRaul/comandas/htmx_views.py @@ -1,6 +1,7 @@ from django.shortcuts import render, redirect from comandas.models import Comanda, ProductComanda +from orders.models import Order from products.models import Product from payments.models import Payments from typePay.models import TypePay @@ -18,6 +19,12 @@ def listProduct(request, comanda_id): def addProduct(request, product_id, comanda_id): product_comanda = ProductComanda(comanda_id=comanda_id, product_id=product_id) product_comanda.save() + product = Product.objects.get(id=product_id) + comanda = Comanda.objects.get(id=comanda_id) + print(product.cuisine) + if product.cuisine == True: + order = Order(id_comanda=comanda, id_product=product, productComanda=product_comanda, obs='') + order.save() consumo = ProductComanda.objects.filter(comanda=comanda_id) total = 0 for produto in consumo: diff --git a/gestaoRaul/db.sqlite3 b/gestaoRaul/db.sqlite3 index 9d19f7d..ee86a20 100644 Binary files a/gestaoRaul/db.sqlite3 and b/gestaoRaul/db.sqlite3 differ diff --git a/gestaoRaul/gestaoRaul/__pycache__/settings.cpython-310.pyc b/gestaoRaul/gestaoRaul/__pycache__/settings.cpython-310.pyc index d849a14..eb19c77 100644 Binary files a/gestaoRaul/gestaoRaul/__pycache__/settings.cpython-310.pyc and b/gestaoRaul/gestaoRaul/__pycache__/settings.cpython-310.pyc differ diff --git a/gestaoRaul/gestaoRaul/__pycache__/urls.cpython-310.pyc b/gestaoRaul/gestaoRaul/__pycache__/urls.cpython-310.pyc index 02b3318..b263974 100644 Binary files a/gestaoRaul/gestaoRaul/__pycache__/urls.cpython-310.pyc and b/gestaoRaul/gestaoRaul/__pycache__/urls.cpython-310.pyc differ diff --git a/gestaoRaul/home/templates/home.html b/gestaoRaul/home/templates/home.html index 0d705fd..a9c7719 100644 --- a/gestaoRaul/home/templates/home.html +++ b/gestaoRaul/home/templates/home.html @@ -26,7 +26,7 @@ RRB&C - DashBoard {% block 'body' %}
-