Skip to content

Commit f7d470b

Browse files
fix: adjust date range logic for triwulan calculation in indexQuery method
1 parent 9e23a1e commit f7d470b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/Nova/TindakLanjut.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ public static function indexQuery(NovaRequest $request, $query)
183183
$currentDate = now();
184184
$startOfYear = $currentDate->copy()->startOfYear();
185185
$triwulan = match (true) {
186-
$currentDate->between($startOfYear, $startOfYear->copy()->addMonths(3)->addDays(10)) => 4,
187-
$currentDate->between($startOfYear->copy()->addMonths(3), $startOfYear->copy()->addMonths(6)->addDays(10)) => 1,
188-
$currentDate->between($startOfYear->copy()->addMonths(6), $startOfYear->copy()->addMonths(9)->addDays(10)) => 2,
189-
$currentDate->between($startOfYear->copy()->addMonths(9), $startOfYear->copy()->endOfYear()->addDays(10)) => 3,
186+
$currentDate->between($startOfYear, $startOfYear->copy()->addMonths(3)) => 4,
187+
$currentDate->between($startOfYear->copy()->addMonths(3), $startOfYear->copy()->addMonths(6)) => 1,
188+
$currentDate->between($startOfYear->copy()->addMonths(6), $startOfYear->copy()->addMonths(9)) => 2,
189+
$currentDate->between($startOfYear->copy()->addMonths(9), $startOfYear->copy()->endOfYear()) => 3,
190190
};
191191

192192
return $query->where('tahun', session('year'))

0 commit comments

Comments
 (0)