whisper-money/app
Víctor Falcón 00b2ca7c55 fix: Budget period not found on last day of period (#91)
## 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
2026-02-01 11:33:10 +01:00
..
Actions Add category type field support (#2) 2025-12-01 20:19:47 +01:00
Console/Commands fix: Budget period not found on last day of period (#91) 2026-02-01 11:33:10 +01:00
Enums Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
Events Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
Http fix: Budget period not found on last day of period (#91) 2026-02-01 11:33:10 +01:00
Jobs feat: Load transactions history on budget created (#72) 2026-01-22 11:10:15 +01:00
Listeners feat: Sync new users to Resend contacts (#85) 2026-01-28 21:25:58 +01:00
Mail feat: New discord offer 2026-01-10 10:27:32 +01:00
Models fix: Budget period not found on last day of period (#91) 2026-02-01 11:33:10 +01:00
Policies Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
Providers feat: Release budgets feature to all users (#84) 2026-01-28 09:56:52 +01:00
Services feat: Sync new users to Resend contacts (#85) 2026-01-28 21:25:58 +01:00