SekiPOS server sync

This commit is contained in:
2026-06-23 15:20:14 -04:00
parent 5704980dbd
commit ccd1836d38
15 changed files with 1063 additions and 149 deletions

View File

@@ -1,5 +1,6 @@
import os
import time
import uuid
from flask import Blueprint, render_template, request, jsonify, current_app
from flask_login import login_required, current_user
from core.db import get_db_connection
@@ -81,7 +82,8 @@ def process_checkout():
with get_db_connection() as conn:
cur = conn.cursor()
cur.execute('INSERT INTO sales (date, total, payment_method) VALUES (CURRENT_TIMESTAMP, ?, ?)', (total, payment_method))
sale_uuid = str(uuid.uuid4())
cur.execute('INSERT INTO sales (date, total, payment_method, uuid) VALUES (CURRENT_TIMESTAMP, ?, ?, ?)', (total, payment_method, sale_uuid))
sale_id = cur.lastrowid
for item in cart: