Various chechout improvements: subtotal rounding, placeholder color, and weight input now in grams for better UX.

This commit is contained in:
2026-03-09 03:53:28 -03:00
parent 43cc2a3caa
commit 9f59e122ef
2 changed files with 144 additions and 29 deletions

5
app.py
View File

@@ -138,7 +138,10 @@ def index():
@app.route("/checkout")
@login_required
def checkout():
return render_template("checkout.html", user=current_user)
with sqlite3.connect(DB_FILE) as conn:
# Fetching the same columns the scanner expects
products = conn.execute('SELECT barcode, name, price, image_url, stock, unit_type FROM products').fetchall()
return render_template("checkout.html", user=current_user, products=products)
@app.route("/upsert", methods=["POST"])