Update TrackingController.php

This commit is contained in:
nguentrungthat 2025-02-14 09:43:21 +07:00
parent 49b681566d
commit bb12c55ef6
1 changed files with 3 additions and 3 deletions

View File

@ -266,11 +266,11 @@ class TrackingController extends Controller
->where('status', 'check in');
if ($startDate && $endDate) {
$trackingData->whereBetween('created_at', [$startDate, $endDate . ' 23:59:59']);
$trackingData->whereBetween('time_string', [$startDate, $endDate . ' 23:59:59']);
} elseif ($startDate) {
$trackingData->where('created_at', '>=', $startDate);
$trackingData->where('time_string', '>=', $startDate);
} elseif ($endDate) {
$trackingData->where('created_at', '<=', $endDate . ' 23:59:59');
$trackingData->where('time_string', '<=', $endDate . ' 23:59:59');
}
$onTimeMorning = 0;