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
- Replace all .cfm endpoints with .php (PHP backend migration)
- Update debug strings and test walkthrough documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Parse RoleID from myBusinesses API. CashCollectionSheet now shows
role-appropriate messaging: staff keeps cash, admin deposits to business.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add cancelOrder parameter to completeTask API method
- Add Cancel Order button below Collect Cash in task detail
- Show confirmation alert before canceling
- On confirm, call complete endpoint with CancelOrder: true
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>