diff --git a/gestaoRaul/categories/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/categories/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..5d1fd8f
Binary files /dev/null and b/gestaoRaul/categories/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/categories/__pycache__/admin.cpython-313.pyc b/gestaoRaul/categories/__pycache__/admin.cpython-313.pyc
new file mode 100644
index 0000000..7567127
Binary files /dev/null and b/gestaoRaul/categories/__pycache__/admin.cpython-313.pyc differ
diff --git a/gestaoRaul/categories/__pycache__/apps.cpython-313.pyc b/gestaoRaul/categories/__pycache__/apps.cpython-313.pyc
new file mode 100644
index 0000000..80a8870
Binary files /dev/null and b/gestaoRaul/categories/__pycache__/apps.cpython-313.pyc differ
diff --git a/gestaoRaul/categories/__pycache__/models.cpython-313.pyc b/gestaoRaul/categories/__pycache__/models.cpython-313.pyc
new file mode 100644
index 0000000..167d0ec
Binary files /dev/null and b/gestaoRaul/categories/__pycache__/models.cpython-313.pyc differ
diff --git a/gestaoRaul/categories/__pycache__/urls.cpython-313.pyc b/gestaoRaul/categories/__pycache__/urls.cpython-313.pyc
new file mode 100644
index 0000000..551f932
Binary files /dev/null and b/gestaoRaul/categories/__pycache__/urls.cpython-313.pyc differ
diff --git a/gestaoRaul/categories/__pycache__/views.cpython-313.pyc b/gestaoRaul/categories/__pycache__/views.cpython-313.pyc
new file mode 100644
index 0000000..3107098
Binary files /dev/null and b/gestaoRaul/categories/__pycache__/views.cpython-313.pyc differ
diff --git a/gestaoRaul/categories/migrations/__pycache__/0001_initial.cpython-313.pyc b/gestaoRaul/categories/migrations/__pycache__/0001_initial.cpython-313.pyc
new file mode 100644
index 0000000..11cbdbb
Binary files /dev/null and b/gestaoRaul/categories/migrations/__pycache__/0001_initial.cpython-313.pyc differ
diff --git a/gestaoRaul/categories/migrations/__pycache__/0002_rename_category_categories.cpython-313.pyc b/gestaoRaul/categories/migrations/__pycache__/0002_rename_category_categories.cpython-313.pyc
new file mode 100644
index 0000000..4e0c927
Binary files /dev/null and b/gestaoRaul/categories/migrations/__pycache__/0002_rename_category_categories.cpython-313.pyc differ
diff --git a/gestaoRaul/categories/migrations/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/categories/migrations/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..0974db0
Binary files /dev/null and b/gestaoRaul/categories/migrations/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/clients/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/clients/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..5b648d8
Binary files /dev/null and b/gestaoRaul/clients/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/clients/__pycache__/admin.cpython-313.pyc b/gestaoRaul/clients/__pycache__/admin.cpython-313.pyc
new file mode 100644
index 0000000..31fc0c6
Binary files /dev/null and b/gestaoRaul/clients/__pycache__/admin.cpython-313.pyc differ
diff --git a/gestaoRaul/clients/__pycache__/apps.cpython-313.pyc b/gestaoRaul/clients/__pycache__/apps.cpython-313.pyc
new file mode 100644
index 0000000..f7a8bb6
Binary files /dev/null and b/gestaoRaul/clients/__pycache__/apps.cpython-313.pyc differ
diff --git a/gestaoRaul/clients/__pycache__/models.cpython-313.pyc b/gestaoRaul/clients/__pycache__/models.cpython-313.pyc
new file mode 100644
index 0000000..ddb9737
Binary files /dev/null and b/gestaoRaul/clients/__pycache__/models.cpython-313.pyc differ
diff --git a/gestaoRaul/clients/__pycache__/urls.cpython-313.pyc b/gestaoRaul/clients/__pycache__/urls.cpython-313.pyc
new file mode 100644
index 0000000..2e8cf4c
Binary files /dev/null and b/gestaoRaul/clients/__pycache__/urls.cpython-313.pyc differ
diff --git a/gestaoRaul/clients/__pycache__/views.cpython-313.pyc b/gestaoRaul/clients/__pycache__/views.cpython-313.pyc
new file mode 100644
index 0000000..6406532
Binary files /dev/null and b/gestaoRaul/clients/__pycache__/views.cpython-313.pyc differ
diff --git a/gestaoRaul/clients/migrations/__pycache__/0001_initial.cpython-313.pyc b/gestaoRaul/clients/migrations/__pycache__/0001_initial.cpython-313.pyc
new file mode 100644
index 0000000..d1754bf
Binary files /dev/null and b/gestaoRaul/clients/migrations/__pycache__/0001_initial.cpython-313.pyc differ
diff --git a/gestaoRaul/clients/migrations/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/clients/migrations/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..8c9f9f0
Binary files /dev/null and b/gestaoRaul/clients/migrations/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/comandas/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/comandas/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..e2446e1
Binary files /dev/null and b/gestaoRaul/comandas/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/comandas/__pycache__/admin.cpython-313.pyc b/gestaoRaul/comandas/__pycache__/admin.cpython-313.pyc
new file mode 100644
index 0000000..ef38c48
Binary files /dev/null and b/gestaoRaul/comandas/__pycache__/admin.cpython-313.pyc differ
diff --git a/gestaoRaul/comandas/__pycache__/apps.cpython-313.pyc b/gestaoRaul/comandas/__pycache__/apps.cpython-313.pyc
new file mode 100644
index 0000000..362c70a
Binary files /dev/null and b/gestaoRaul/comandas/__pycache__/apps.cpython-313.pyc differ
diff --git a/gestaoRaul/comandas/__pycache__/htmx_views.cpython-313.pyc b/gestaoRaul/comandas/__pycache__/htmx_views.cpython-313.pyc
new file mode 100644
index 0000000..599eb80
Binary files /dev/null and b/gestaoRaul/comandas/__pycache__/htmx_views.cpython-313.pyc differ
diff --git a/gestaoRaul/comandas/__pycache__/models.cpython-313.pyc b/gestaoRaul/comandas/__pycache__/models.cpython-313.pyc
new file mode 100644
index 0000000..ab13c9c
Binary files /dev/null and b/gestaoRaul/comandas/__pycache__/models.cpython-313.pyc differ
diff --git a/gestaoRaul/comandas/__pycache__/urls.cpython-313.pyc b/gestaoRaul/comandas/__pycache__/urls.cpython-313.pyc
new file mode 100644
index 0000000..f9dd458
Binary files /dev/null and b/gestaoRaul/comandas/__pycache__/urls.cpython-313.pyc differ
diff --git a/gestaoRaul/comandas/__pycache__/views.cpython-313.pyc b/gestaoRaul/comandas/__pycache__/views.cpython-313.pyc
new file mode 100644
index 0000000..88ce378
Binary files /dev/null and b/gestaoRaul/comandas/__pycache__/views.cpython-313.pyc differ
diff --git a/gestaoRaul/comandas/htmx_views.py b/gestaoRaul/comandas/htmx_views.py
index 6aa19c7..f017cf7 100644
--- a/gestaoRaul/comandas/htmx_views.py
+++ b/gestaoRaul/comandas/htmx_views.py
@@ -1,7 +1,9 @@
-from django.shortcuts import render, redirect
+from django.shortcuts import render, redirect, HttpResponse
from comandas.models import Comanda, ProductComanda
from products.models import Product
+from payments.models import Payments
+from typePay.models import TypePay
def listProduct(request, comanda_id):
@@ -29,9 +31,30 @@ def removeProductComanda(request, productComanda_id):
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')
\ No newline at end of file
+ # return redirect('back')
+
+
+def reopenComanda(request, comanda_id):
+ comanda = Comanda.objects.get(id=comanda_id)
+ if comanda.status == 'CLOSED':
+ pass
+ else:
+ comanda.status = "OPEN"
+ comanda.save()
+ # return redirect('back')
+
+def paymentComanda(request, comanda_id):
+ typePayment = TypePay.objects.get(id=1)
+ consumo = ProductComanda.objects.filter(comanda=comanda_id)
+ comanda = Comanda.objects.get(id=comanda_id)
+ total = 0
+ for produto in consumo:
+ total += produto.product.price
+ pagamento = Payments(value=total, comanda=comanda, type_pay=typePayment,description='tipo de pagamento mokado')
+ pagamento.save()
+ comanda.status = 'CLOSED'
+ comanda.save()
+ return redirect('comandas')
diff --git a/gestaoRaul/comandas/migrations/__pycache__/0001_initial.cpython-313.pyc b/gestaoRaul/comandas/migrations/__pycache__/0001_initial.cpython-313.pyc
new file mode 100644
index 0000000..d0fb409
Binary files /dev/null and b/gestaoRaul/comandas/migrations/__pycache__/0001_initial.cpython-313.pyc differ
diff --git a/gestaoRaul/comandas/migrations/__pycache__/0002_productcomanda.cpython-313.pyc b/gestaoRaul/comandas/migrations/__pycache__/0002_productcomanda.cpython-313.pyc
new file mode 100644
index 0000000..6e8772c
Binary files /dev/null and b/gestaoRaul/comandas/migrations/__pycache__/0002_productcomanda.cpython-313.pyc differ
diff --git a/gestaoRaul/comandas/migrations/__pycache__/0003_comanda_status_alter_productcomanda_product.cpython-313.pyc b/gestaoRaul/comandas/migrations/__pycache__/0003_comanda_status_alter_productcomanda_product.cpython-313.pyc
new file mode 100644
index 0000000..14940c1
Binary files /dev/null and b/gestaoRaul/comandas/migrations/__pycache__/0003_comanda_status_alter_productcomanda_product.cpython-313.pyc differ
diff --git a/gestaoRaul/comandas/migrations/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/comandas/migrations/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..cf059df
Binary files /dev/null and b/gestaoRaul/comandas/migrations/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/comandas/templates/viewcomanda.html b/gestaoRaul/comandas/templates/viewcomanda.html
index 45a0bd4..194b22a 100644
--- a/gestaoRaul/comandas/templates/viewcomanda.html
+++ b/gestaoRaul/comandas/templates/viewcomanda.html
@@ -27,23 +27,34 @@ Detalhes {{comanda.name}}
{% endif %}
>Adicionar Produto
-
-
-
+
+
+
-
Nome: {{comanda.name}} |
Mesa: {{comanda.mesa}}
@@ -63,7 +74,11 @@ Detalhes {{comanda.name}}
| {{item.product.name}} |
R$ {{item.product.price}} |
- |
+ |
@@ -124,6 +139,24 @@ Detalhes {{comanda.name}}
+
+
diff --git a/gestaoRaul/comandas/urls.py b/gestaoRaul/comandas/urls.py
index 3501964..9bf1eec 100644
--- a/gestaoRaul/comandas/urls.py
+++ b/gestaoRaul/comandas/urls.py
@@ -20,6 +20,8 @@ htmx_urlpatterns = [
path('addProduct
//', htmx_views.addProduct, name='addProduct'),
path('removeProductComanda/', htmx_views.removeProductComanda, name='removeProductComanda'),
path('closeComanda/', htmx_views.closeComanda, name='closeComanda'),
+ path('reopenComanda/', htmx_views.reopenComanda, name='reopenComanda'),
+ path('paymentComanda/', htmx_views.paymentComanda, name='paymentComanda'),
]
urlpatterns += htmx_urlpatterns
\ No newline at end of file
diff --git a/gestaoRaul/db.sqlite3 b/gestaoRaul/db.sqlite3
index 710ba1e..71ce128 100644
Binary files a/gestaoRaul/db.sqlite3 and b/gestaoRaul/db.sqlite3 differ
diff --git a/gestaoRaul/gestaoRaul/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/gestaoRaul/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..c53d7ba
Binary files /dev/null and b/gestaoRaul/gestaoRaul/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/gestaoRaul/__pycache__/settings.cpython-313.pyc b/gestaoRaul/gestaoRaul/__pycache__/settings.cpython-313.pyc
new file mode 100644
index 0000000..d3b2366
Binary files /dev/null and b/gestaoRaul/gestaoRaul/__pycache__/settings.cpython-313.pyc differ
diff --git a/gestaoRaul/gestaoRaul/__pycache__/urls.cpython-313.pyc b/gestaoRaul/gestaoRaul/__pycache__/urls.cpython-313.pyc
new file mode 100644
index 0000000..c731622
Binary files /dev/null and b/gestaoRaul/gestaoRaul/__pycache__/urls.cpython-313.pyc differ
diff --git a/gestaoRaul/gestaoRaul/__pycache__/wsgi.cpython-313.pyc b/gestaoRaul/gestaoRaul/__pycache__/wsgi.cpython-313.pyc
new file mode 100644
index 0000000..387b821
Binary files /dev/null and b/gestaoRaul/gestaoRaul/__pycache__/wsgi.cpython-313.pyc differ
diff --git a/gestaoRaul/gestaoRaul/settings.py b/gestaoRaul/gestaoRaul/settings.py
index 7b4f20e..1655c38 100644
--- a/gestaoRaul/gestaoRaul/settings.py
+++ b/gestaoRaul/gestaoRaul/settings.py
@@ -52,6 +52,7 @@ INSTALLED_APPS = [
'comandas',
'categories',
'home',
+ 'payments',
]
MIDDLEWARE = [
diff --git a/gestaoRaul/home/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/home/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..01b80cc
Binary files /dev/null and b/gestaoRaul/home/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/home/__pycache__/admin.cpython-313.pyc b/gestaoRaul/home/__pycache__/admin.cpython-313.pyc
new file mode 100644
index 0000000..2c52e22
Binary files /dev/null and b/gestaoRaul/home/__pycache__/admin.cpython-313.pyc differ
diff --git a/gestaoRaul/home/__pycache__/apps.cpython-313.pyc b/gestaoRaul/home/__pycache__/apps.cpython-313.pyc
new file mode 100644
index 0000000..22c820b
Binary files /dev/null and b/gestaoRaul/home/__pycache__/apps.cpython-313.pyc differ
diff --git a/gestaoRaul/home/__pycache__/models.cpython-313.pyc b/gestaoRaul/home/__pycache__/models.cpython-313.pyc
new file mode 100644
index 0000000..f4e503b
Binary files /dev/null and b/gestaoRaul/home/__pycache__/models.cpython-313.pyc differ
diff --git a/gestaoRaul/home/__pycache__/urls.cpython-313.pyc b/gestaoRaul/home/__pycache__/urls.cpython-313.pyc
new file mode 100644
index 0000000..90cb376
Binary files /dev/null and b/gestaoRaul/home/__pycache__/urls.cpython-313.pyc differ
diff --git a/gestaoRaul/home/__pycache__/views.cpython-313.pyc b/gestaoRaul/home/__pycache__/views.cpython-313.pyc
new file mode 100644
index 0000000..059fdc4
Binary files /dev/null and b/gestaoRaul/home/__pycache__/views.cpython-313.pyc differ
diff --git a/gestaoRaul/home/migrations/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/home/migrations/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..50aa47a
Binary files /dev/null and b/gestaoRaul/home/migrations/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/mesas/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/mesas/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..f21da1e
Binary files /dev/null and b/gestaoRaul/mesas/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/mesas/__pycache__/admin.cpython-313.pyc b/gestaoRaul/mesas/__pycache__/admin.cpython-313.pyc
new file mode 100644
index 0000000..da39b22
Binary files /dev/null and b/gestaoRaul/mesas/__pycache__/admin.cpython-313.pyc differ
diff --git a/gestaoRaul/mesas/__pycache__/apps.cpython-313.pyc b/gestaoRaul/mesas/__pycache__/apps.cpython-313.pyc
new file mode 100644
index 0000000..8d681dc
Binary files /dev/null and b/gestaoRaul/mesas/__pycache__/apps.cpython-313.pyc differ
diff --git a/gestaoRaul/mesas/__pycache__/models.cpython-313.pyc b/gestaoRaul/mesas/__pycache__/models.cpython-313.pyc
new file mode 100644
index 0000000..f92f119
Binary files /dev/null and b/gestaoRaul/mesas/__pycache__/models.cpython-313.pyc differ
diff --git a/gestaoRaul/mesas/__pycache__/urls.cpython-313.pyc b/gestaoRaul/mesas/__pycache__/urls.cpython-313.pyc
new file mode 100644
index 0000000..70948c8
Binary files /dev/null and b/gestaoRaul/mesas/__pycache__/urls.cpython-313.pyc differ
diff --git a/gestaoRaul/mesas/__pycache__/views.cpython-313.pyc b/gestaoRaul/mesas/__pycache__/views.cpython-313.pyc
new file mode 100644
index 0000000..deb4687
Binary files /dev/null and b/gestaoRaul/mesas/__pycache__/views.cpython-313.pyc differ
diff --git a/gestaoRaul/mesas/migrations/__pycache__/0001_initial.cpython-313.pyc b/gestaoRaul/mesas/migrations/__pycache__/0001_initial.cpython-313.pyc
new file mode 100644
index 0000000..b487576
Binary files /dev/null and b/gestaoRaul/mesas/migrations/__pycache__/0001_initial.cpython-313.pyc differ
diff --git a/gestaoRaul/mesas/migrations/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/mesas/migrations/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..7176606
Binary files /dev/null and b/gestaoRaul/mesas/migrations/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/payments/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/payments/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..51c00e9
Binary files /dev/null and b/gestaoRaul/payments/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/payments/__pycache__/admin.cpython-313.pyc b/gestaoRaul/payments/__pycache__/admin.cpython-313.pyc
new file mode 100644
index 0000000..14089d9
Binary files /dev/null and b/gestaoRaul/payments/__pycache__/admin.cpython-313.pyc differ
diff --git a/gestaoRaul/payments/__pycache__/apps.cpython-313.pyc b/gestaoRaul/payments/__pycache__/apps.cpython-313.pyc
new file mode 100644
index 0000000..4f6f335
Binary files /dev/null and b/gestaoRaul/payments/__pycache__/apps.cpython-313.pyc differ
diff --git a/gestaoRaul/payments/__pycache__/models.cpython-313.pyc b/gestaoRaul/payments/__pycache__/models.cpython-313.pyc
new file mode 100644
index 0000000..fe8c717
Binary files /dev/null and b/gestaoRaul/payments/__pycache__/models.cpython-313.pyc differ
diff --git a/gestaoRaul/payments/migrations/0001_initial.py b/gestaoRaul/payments/migrations/0001_initial.py
new file mode 100644
index 0000000..750b11b
--- /dev/null
+++ b/gestaoRaul/payments/migrations/0001_initial.py
@@ -0,0 +1,30 @@
+# Generated by Django 5.1.4 on 2024-12-20 17:33
+
+import django.db.models.deletion
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ ('clients', '0001_initial'),
+ ('comandas', '0003_comanda_status_alter_productcomanda_product'),
+ ('typePay', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Payments',
+ fields=[
+ ('id', models.AutoField(primary_key=True, serialize=False)),
+ ('value', models.DecimalField(decimal_places=2, max_digits=10)),
+ ('description', models.CharField(max_length=255)),
+ ('datetime', models.DateTimeField(auto_now_add=True)),
+ ('client', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='clients.client')),
+ ('comanda', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='comandas.comanda')),
+ ('type_pay', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='typePay.typepay')),
+ ],
+ ),
+ ]
diff --git a/gestaoRaul/payments/migrations/__pycache__/0001_initial.cpython-313.pyc b/gestaoRaul/payments/migrations/__pycache__/0001_initial.cpython-313.pyc
new file mode 100644
index 0000000..07e806a
Binary files /dev/null and b/gestaoRaul/payments/migrations/__pycache__/0001_initial.cpython-313.pyc differ
diff --git a/gestaoRaul/payments/migrations/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/payments/migrations/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..a6e8988
Binary files /dev/null and b/gestaoRaul/payments/migrations/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/products/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/products/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..9b5494e
Binary files /dev/null and b/gestaoRaul/products/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/products/__pycache__/admin.cpython-313.pyc b/gestaoRaul/products/__pycache__/admin.cpython-313.pyc
new file mode 100644
index 0000000..a6312be
Binary files /dev/null and b/gestaoRaul/products/__pycache__/admin.cpython-313.pyc differ
diff --git a/gestaoRaul/products/__pycache__/apps.cpython-313.pyc b/gestaoRaul/products/__pycache__/apps.cpython-313.pyc
new file mode 100644
index 0000000..0229290
Binary files /dev/null and b/gestaoRaul/products/__pycache__/apps.cpython-313.pyc differ
diff --git a/gestaoRaul/products/__pycache__/models.cpython-313.pyc b/gestaoRaul/products/__pycache__/models.cpython-313.pyc
new file mode 100644
index 0000000..b466f73
Binary files /dev/null and b/gestaoRaul/products/__pycache__/models.cpython-313.pyc differ
diff --git a/gestaoRaul/products/__pycache__/urls.cpython-313.pyc b/gestaoRaul/products/__pycache__/urls.cpython-313.pyc
new file mode 100644
index 0000000..7982663
Binary files /dev/null and b/gestaoRaul/products/__pycache__/urls.cpython-313.pyc differ
diff --git a/gestaoRaul/products/__pycache__/views.cpython-313.pyc b/gestaoRaul/products/__pycache__/views.cpython-313.pyc
new file mode 100644
index 0000000..f7e3e8a
Binary files /dev/null and b/gestaoRaul/products/__pycache__/views.cpython-313.pyc differ
diff --git a/gestaoRaul/products/migrations/__pycache__/0001_initial.cpython-313.pyc b/gestaoRaul/products/migrations/__pycache__/0001_initial.cpython-313.pyc
new file mode 100644
index 0000000..3fb0764
Binary files /dev/null and b/gestaoRaul/products/migrations/__pycache__/0001_initial.cpython-313.pyc differ
diff --git a/gestaoRaul/products/migrations/__pycache__/0002_product_image_product_quantity.cpython-313.pyc b/gestaoRaul/products/migrations/__pycache__/0002_product_image_product_quantity.cpython-313.pyc
new file mode 100644
index 0000000..70d05a7
Binary files /dev/null and b/gestaoRaul/products/migrations/__pycache__/0002_product_image_product_quantity.cpython-313.pyc differ
diff --git a/gestaoRaul/products/migrations/__pycache__/__init__.cpython-313.pyc b/gestaoRaul/products/migrations/__pycache__/__init__.cpython-313.pyc
new file mode 100644
index 0000000..1245cc7
Binary files /dev/null and b/gestaoRaul/products/migrations/__pycache__/__init__.cpython-313.pyc differ
diff --git a/gestaoRaul/templates/static/comandas/js/viewcomanda.js b/gestaoRaul/templates/static/comandas/js/viewcomanda.js
index b4d641b..67e5b77 100644
--- a/gestaoRaul/templates/static/comandas/js/viewcomanda.js
+++ b/gestaoRaul/templates/static/comandas/js/viewcomanda.js
@@ -7,6 +7,14 @@ function open_remove_product_comanda() {
document.getElementById('remove-product-comanda').style.display = 'block';
}
+function modal_payment_comanda() {
+ document.getElementById('payment-comanda').style.display = 'block';
+}
+
+function close_modal_payment_comanda() {
+ document.getElementById('payment-comanda').style.display = 'none';
+}
+
function closeModal() {
document.getElementById('Modal-add-product').style.display = 'none';
}
@@ -49,6 +57,53 @@ function imprimirFichas() {
}
+function imprimirConta() {
+ reloadPage();
+ const element = document.getElementById("list-products-comanda");
+ const style = ``;
+ const agora = new Date();
+ var dateString = agora.getDay() + '/' + agora.getMonth() + '/' + agora.getFullYear() + ' - ' + agora.getHours() + ':' + agora.getMinutes()+' - Raul Rock Bar & Café';
+
+ if (element) {
+ var content = element.innerHTML;
+ // console.log(content);
+ content = content.replace(/