SekiPOS server sync
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user