fix: Backend-authoritative cash change calculation #3

Merged
schwifty merged 1 commit from schwifty/cash-change-backend-authoritative into main 2026-03-24 00:41:24 +00:00

1 commit

Author SHA1 Message Date
873cbba2aa fix: use backend-authoritative change amount for cash transactions
Instead of calculating change client-side (which doesn't account for
balance applied, fees, etc.), the app now uses the Change value returned
by the /tasks/complete.php endpoint after processing.

Changes:
- APIService.completeTask now returns CashCompletionResult with backend values
- Added CashCompletionResult struct (cashReceived, orderTotal, change, fees, routing)
- CashCollectionSheet shows confirmed backend change after completion
- Added ratingRequired error case to APIError enum
- Client-side estimate still shown as preview before confirmation
2026-03-24 00:41:10 +00:00