1a175e805b2803988e1b59e6e9b86ba6733b7337
When no trips exist for a vehicle, the last-km endpoint now returns the vehicle's initial_km instead of 0, matching the PHP behavior: COALESCE(MAX(end_km), vehicle.initial_km, 0) Also fixed ordering from id DESC to end_km DESC for correctness. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Description
No description provided