Store UI cleanup and rework

This commit is contained in:
bl3kunja-FW
2026-05-31 11:23:31 +02:00
parent fc831478de
commit 09ab1c3e29
7 changed files with 356 additions and 124 deletions
+2 -2
View File
@@ -432,7 +432,7 @@ def log_payment():
total = float(data.get('total', 0))
balance_before = float(data.get('balance_before', 0))
balance_after = float(data.get('balance_after', 0))
buyer = (data.get('buyer') or '').strip()
seller = (data.get('seller') or '').strip()
cart_items = data.get('cart_items', []) # [{id, name, price, qty, image}]
# Deduct stock for each sold item
@@ -448,7 +448,7 @@ def log_payment():
# Update balance atomically with payment log
data_manager.set_balance(balance_after)
if data_manager.log_payment(items, total, balance_before, balance_after, buyer):
if data_manager.log_payment(items, total, balance_before, balance_after, seller):
return jsonify({'success': True})
return jsonify({'success': False, 'message': 'Error logging payment'}), 400
except Exception as e: