diff --git a/app/Livewire/Admin/Invoices.php b/app/Livewire/Admin/Invoices.php index 128f1d4..6c18f2e 100644 --- a/app/Livewire/Admin/Invoices.php +++ b/app/Livewire/Admin/Invoices.php @@ -68,7 +68,10 @@ class Invoices extends Component 'years' => Invoice::query() ->orderByDesc('issued_on') ->pluck('issued_on') - ->map(fn ($date) => $date?->format('Y')) + // ->local() even for a year (R19): on New Year's night the UTC + // year is still the previous one, so the filter would offer a + // year the operator is no longer in. + ->map(fn ($date) => $date?->local()->format('Y')) ->filter() ->unique() ->values(),