@if($timesheets->isNotEmpty())
@foreach($timesheets as $timesheet)
|
{{ $timesheet->sub_code }} |
{{ $timesheet->timesheet_date }} |
{{ $timesheet->item_code }} |
{{ $timesheet->activity }} |
{{ $timesheet->peoples }} |
{{ $timesheet->allocated_hour }} |
{{ $timesheet->spent_hour }} |
{{ $timesheet->total_spent_hour }} |
@php
$tsh = strtok($timesheet->total_spent_hour, ':');
$ah = strtok($timesheet->allocated_hour, ':');
@endphp
@if($tsh > $ah)
{{ $timesheet->remaining_hour }}
@else
{{ $timesheet->remaining_hour }}
@endif
|
@if(auth()->user()->can('access', 'timesheets add'))
@endif
|