Timesheet Management

@if(auth()->user()->canCreateTimesheets()) @endif
@if($matter->hasExceededHours())
Exceeded Hours
{{ number_format($matter->exceeded_hours, 2) }}h
Over budget by {{ number_format($matter->exceeded_hours, 2) }} hours
Estimated Hours
{{ number_format($matter->total_estimated_hours, 2) }}h
Actual Hours
{{ number_format($totalHours, 2) }}h
@else
Remaining Hours
{{ number_format(max(0, $matter->total_estimated_hours - $totalHours), 2) }}h
Actual Hours
{{ number_format($totalHours, 2) }}h
Estimated Hours
{{ number_format($matter->total_estimated_hours, 2) }}h
@endif
@if($showForm)

{{ $editingTimesheet ? 'Edit Timesheet Entry' : 'Add New Timesheet Entry' }}

@error('description') {{ $message }} @enderror
@error('time_spent') {{ $message }} @enderror
@error('date') {{ $message }} @enderror

Hourly rate is set by system configuration

@if($time_spent && $hourly_rate)
Estimated Cost: €{{ number_format($time_spent * $hourly_rate, 2) }}
@endif @if($time_spent && $matter->total_estimated_hours > 0) @php $newTotalHours = $matter->total_actual_hours + $time_spent; $willExceed = $newTotalHours > $matter->total_estimated_hours; $exceededAmount = $willExceed ? $newTotalHours - $matter->total_estimated_hours : 0; @endphp @if($willExceed)
Warning: Adding {{ number_format($time_spent, 2) }} hours will exceed the estimated hours by {{ number_format($exceededAmount, 2) }} hours.
Current: {{ number_format($matter->total_actual_hours, 2) }}h | Estimated: {{ number_format($matter->total_estimated_hours, 2) }}h | After adding: {{ number_format($newTotalHours, 2) }}h
@elseif($newTotalHours > ($matter->total_estimated_hours * 0.8))
Notice: Adding {{ number_format($time_spent, 2) }} hours will use {{ number_format(($newTotalHours / $matter->total_estimated_hours) * 100, 1) }}% of estimated hours.
Remaining after adding: {{ number_format($matter->total_estimated_hours - $newTotalHours, 2) }}h
@endif @endif
@endif

Timesheet Entries

@if($timesheets->count() > 0)
@foreach($timesheets as $timesheet) @endforeach
Description Time Matter User Actions
{{ $timesheet->description }}
{{ $timesheet->formatted_time_spent }}
{{ $timesheet->matter->custom_id ?? 'N/A' }} {{ $timesheet->matter->subject }}
{{ $timesheet->createdBy->name }}
@if(auth()->user()->canUpdateTimesheets()) @endif @if(auth()->user()->canDeleteTimesheets()) @endif
Total {{ number_format($timesheets->sum('time_spent'), 2) }}h
{{ $timesheets->links() }}
@else

No timesheet entries

Get started by creating a new timesheet entry.

@endif
@if (session()->has('message'))
{{ session('message') }}
@endif