Bradford Factor Points

@php $total_days = 0; $total_points = $grand_total = 0; if(count($attendanceRecords)>0 && isset($attendanceRecords[0])) { $bradford_points = $attendanceRecords[0]['no_of_workdays']; $total_days = $attendanceRecords[0]['no_of_workdays']; $total_points = $attendanceRecords[0]['no_of_workdays']; } $grand_total = $total_points; @endphp @php if(count($attendanceRecords)>0 && isset($attendanceRecords[1])) { $total_days += $attendanceRecords[1]['no_of_workdays']; $bradford_points = 2*2*$total_days; $total_points = $bradford_points; } else { $total_days = 0; $bradford_points = 0; $total_points = 0; } $grand_total = ($total_points != 0) ? $total_points : $grand_total; @endphp @php if(count($attendanceRecords)>0 && isset($attendanceRecords[2])) { $total_days += $attendanceRecords[2]['no_of_workdays']; $bradford_points = 3*3*$total_days; $total_points = $bradford_points; } else { $total_days = 0; $bradford_points = 0; $total_points = 0; } $grand_total = ($total_points != 0) ? $total_points : $grand_total; @endphp @php if(count($attendanceRecords)>0 && isset($attendanceRecords[3])) { $total_days += $attendanceRecords[3]['no_of_workdays']; $bradford_points = 4*4*$total_days; $total_points = $bradford_points; } else { $total_days = 0; $bradford_points = 0; $total_points = 0; } $grand_total = ($total_points != 0) ? $total_points : $grand_total; @endphp @php if(count($attendanceRecords)>0 && isset($attendanceRecords[4])) { $total_days += $attendanceRecords[4]['no_of_workdays']; $bradford_points = 5*5*$total_days; $total_points = $bradford_points; } else { $total_days = 0; $bradford_points = 0; $total_points = 0; } $grand_total = ($total_points != 0) ? $total_points : $grand_total; @endphp
Number Of Days off? Total Number of Days off? Bradford Factor Points
1st Absence 1 X 1 X {{----}} {{$total_days}} {{$total_points}}
2nd Absence2 X 2 X {{----}} {{$total_days}} {{$total_points}}
3rd Absence3 X 3 X {{----}} {{$total_days}} {{$total_points}}
4th Absence4 X 4 X {{----}} {{$total_days}} {{$total_points}}
5th Absence5 X 5 X {{----}} {{$total_days}} {{$total_points}}
{{-- @if($user->role == 'admin' || $user->isHomeManager($employee->work_place)) {{count($employeeAttendance)}} @endif --}}
{{--
--}} {{--
--}}

Absence Log

@forelse($attendanceRecords as $attendanceRecord) @empty @endforelse
Start Date Return Date Number of Days Off Day(s) of The Week Sick Note Provided Return To Work Interview
{{ date(config('choicescrm.date_format_forms'), strtotime($attendanceRecord['start_date']))}} {{ date(config('choicescrm.date_format_forms'), strtotime($attendanceRecord['return_date']))}} {{$attendanceRecord['no_of_workdays']}} {{$attendanceRecord['days_of_the_week']}} {{ $attendanceRecord['sick_note_provided'] }} View
No record found