feat: commission tracking based on wallet balances with payment history

- Commission = 5% of total wallet balances (not sales)
- Track commission payments in commission_payments table (migration 007)
- Show 'Due Now' = current commission - last payment amount
- Record payment form with amount and optional note
- Payment history table with date, balances, commission, paid, delta
- Delta shows difference between consecutive payments (new users = more owed)
- Seed phrase unlock reminder shows the commission due amount
- Stat warning highlight when commission is due
This commit is contained in:
NW
2026-06-23 13:01:15 +01:00
parent 76daf07bb4
commit a6d81cfe83
5 changed files with 184 additions and 64 deletions

View File

@@ -41,6 +41,7 @@ export async function runMigrations() {
(await import('./004_user_states.js')).default,
(await import('./005_audit_log.js')).default,
(await import('./006_subcategories.js')).default,
(await import('./007_commission_payments.js')).default,
];
for (let i = currentVersion; i < migrations.length; i++) {