## Summary - Budget periods use `date` columns (`start_date`, `end_date`) but queries compared them against `now()` which includes a time component (e.g. `2026-01-31 15:30:00`). MySQL converts the date to midnight for comparison, so `end_date >= now()` evaluates to `'2026-01-31 00:00:00' >= '2026-01-31 15:30:00'` → **false** — causing "No active period" on the last day of every period. - Replaced `now()` with `today()` (date-only) in all budget period date comparisons across `Budget::getCurrentPeriod()`, `BudgetController::index()`, and `GenerateBudgetPeriods` command. ## Test plan - [x] Added 4 Pest tests covering the edge case (last day at various times, first day at end of day, index/show endpoints) - [x] All existing budget tests pass |
||
|---|---|---|
| .. | ||
| Actions | ||
| Console/Commands | ||
| Enums | ||
| Events | ||
| Http | ||
| Jobs | ||
| Listeners | ||
| Models | ||
| Policies | ||
| Providers | ||
| Services | ||