Multiple bookings per room (early-checkout Departed + new Arrived, or NewBook double-bookings) caused COUNT(*) to exceed total room capacity. Switch to COUNT(DISTINCT COALESCE(room_number, newbook_id)) so each physical room counts once regardless of how many booking rows span it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| jobs | ||
| services | ||
| utils | ||
| auth.py | ||
| database.py | ||
| Dockerfile | ||
| main.py | ||
| requirements.txt | ||
| scheduler.py | ||
| schema.sql | ||