{{ __('Client Details') }} - {{ $client->name }}
@if (session()->has('message'))
{{ session('message') }}
@endif
@if (session()->has('error'))
{{ session('error') }}
@endif
@php
$today = \Carbon\Carbon::today();
$endDate = $client->contract_end_date ? \Carbon\Carbon::parse($client->contract_end_date)->startOfDay() : null;
$contractEnded = $endDate && $endDate->lt($today);
$daysToEnd = $endDate ? $today->diffInDays($endDate, false) : null;
@endphp
@if($contractEnded)
{{ __('Contract Expired') }}
- {{ __('The contract expired on') }} {{ \Carbon\Carbon::parse($client->contract_end_date)->format('Y-m-d') }}
@elseif(!is_null($daysToEnd) && $daysToEnd <= 30)
{{ __('Contract Expiry Reminder') }}
- {{ __('Contract ends in :days days on :date', [
'days' => ceil($daysToEnd)+1,
'date' => \Carbon\Carbon::parse($client->contract_end_date)->format('Y-m-d')
]) }}
@endif
@can('clients edit')
@endcan
@can('tasks show')
@endcan
@can('documents show')
@endcan
@can('custodies show')
@endcan