Пример #1
0
 public static function attendanceCount($employeeID)
 {
     // Calculating Attendance
     $date = date('d');
     $month = date('m');
     $year = date('Y');
     $firstDay = $year . '-' . $month . '-' . $date;
     $presentCount = Attendance::countPresentDays($month, $year, $employeeID);
     $totalDays = date('t', strtotime($firstDay));
     $holiday_count = count(DB::select(DB::raw("select * from holidays where MONTH(date)=" . $month)));
     $workingDays = $totalDays - $holiday_count;
     return "{$presentCount}/{$workingDays}";
 }