|
@@ -197,7 +197,7 @@ private function attendance(array $unitIds, Carbon $startDate, Carbon $endDate):
|
|
|
'u.id',
|
|
'u.id',
|
|
|
'u.fantasy_name',
|
|
'u.fantasy_name',
|
|
|
DB::raw('COUNT(ca.id) as attendance_count'),
|
|
DB::raw('COUNT(ca.id) as attendance_count'),
|
|
|
- DB::raw('SUM(CASE WHEN ca.in_class = 1 THEN 1 ELSE 0 END) as present_count'),
|
|
|
|
|
|
|
+ DB::raw('SUM(CASE WHEN ca.in_class THEN 1 ELSE 0 END) as present_count'),
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
$total = (int) $rows->sum('attendance_count');
|
|
$total = (int) $rows->sum('attendance_count');
|