From 376b8c54a6e4ea9d441e50d8084f4b1f43ec5d62 Mon Sep 17 00:00:00 2001 From: SekiDesu0 Date: Fri, 13 Mar 2026 18:07:09 -0300 Subject: [PATCH] Version bump to v2.0, updated checkout and dicom --- migrate.py | 7 - templates/checkout.html | 179 +++++++++++++++- templates/dicom.html | 398 +++++++++++++++++++++++------------ templates/macros/navbar.html | 2 +- 4 files changed, 438 insertions(+), 148 deletions(-) diff --git a/migrate.py b/migrate.py index aedae21..5e58c8d 100644 --- a/migrate.py +++ b/migrate.py @@ -5,13 +5,6 @@ DB_FILE = 'db/pos_database.db' def upgrade_db(): try: with sqlite3.connect(DB_FILE) as conn: - # Add stock column - conn.execute("ALTER TABLE products ADD COLUMN stock REAL DEFAULT 0") - print("Successfully added 'stock' column.") - - # App.py also expects unit_type, adding it to prevent future headaches - conn.execute("ALTER TABLE products ADD COLUMN unit_type TEXT DEFAULT 'unit'") - print("Successfully added 'unit_type' column.") conn.execute("ALTER TABLE dicom ADD COLUMN image_url TEXT;") print("Successfully added 'image_url' column.") diff --git a/templates/checkout.html b/templates/checkout.html index 69240ab..2c5d804 100644 --- a/templates/checkout.html +++ b/templates/checkout.html @@ -75,6 +75,30 @@ + + @@ -311,6 +344,29 @@ + {% endblock %} {% block scripts %} {% endblock %} diff --git a/templates/dicom.html b/templates/dicom.html index 863c547..ca31680 100644 --- a/templates/dicom.html +++ b/templates/dicom.html @@ -1,80 +1,29 @@ {% extends "macros/base.html" %} -{% from 'macros/modals.html' import confirm_modal, scanner_modal %} +{% from 'macros/modals.html' import confirm_modal %} -{% block title %}Ventas{% endblock %} - -{% block head %} - -{% endblock %} +{% block title %}Dicom{% endblock %} {% block content %} -
- -
-
-
-
Registrar Movimiento
- -
-
- - -
-
- - -
- -
- - -
- -
- -
- - - -
-
- -
-
- -
- - -
-
-
- -
+
- -
- - + +
+
+ + +
+
- + @@ -87,21 +36,21 @@ - - - - - + + + +
FotoFoto Nombre Deuda Total Última Nota
{% if d[5] %} - {% else %}
- +
{% endif %}
{{ d[1] }}{{ d[3] }}{{ d[4] }} - {{ d[1] }}{{ d[3] }}{{ d[4] }} + + + + + + + + +{% call confirm_modal('deleteDebtModal', 'Eliminar Registro', 'btn-danger', 'Eliminar Permanente', 'executeForgiveDebt()') %} +
+ +

¿Estás seguro de que quieres perdonar la deuda y eliminar completamente a del registro?

+

Esta acción no se puede deshacer.

+
+{% endcall %} {% endblock %} {% block scripts %} {% endblock %} \ No newline at end of file diff --git a/templates/macros/navbar.html b/templates/macros/navbar.html index 368f398..081411e 100644 --- a/templates/macros/navbar.html +++ b/templates/macros/navbar.html @@ -1,7 +1,7 @@