@php $notes_strlen = 0; $convo_strlen = 0; $total_strlen = 0; @endphp @if(count($client->notes) > 0) @foreach ($client->notes as $k => $note) @php $notes_strlen = $notes_strlen + strlen($note->remarks) @endphp @endforeach @endif @if(count($client->convos) > 0) @foreach ($client->convos as $k => $convo) @php $convo_strlen = $convo_strlen + strlen($convo->remarks) @endphp @endforeach @endif @php $total_strlen = $notes_strlen + $convo_strlen; @endphp
Client ID: {{ $client->client_detail->customer_id }} Deal Type: {{ $client->deal_type->type }}
Deal Source: @if(isset($client->deal_source->source_name)) {{ $client->deal_source->source_name }} @endif
Client Details
Full Name: {{ $client->party->name }} Date of Birth: @if(isset($client->party->person->date_of_birth)) {{ \Carbon\Carbon::createFromFormat('Y-m-d', $client->party->person->date_of_birth)->format('d/m/Y') }} @endif
Email Address: {{ $client->party->person->contact_detail->email }} Alternative Email: @if(isset($client->party->person->contact_detail->email_alt)) {{ $client->party->person->contact_detail->email_alt }} @endif
Nationality: @if(isset($client->client_detail->nationality->nationality)) {{ $client->client_detail->nationality->nationality }} @endif Phone #1: @if(isset($client->party->person->contact_detail->phones[0])) {{ $client->party->person->contact_detail->phones[0] }} @endif
Phone #2: @if(isset($client->party->person->contact_detail->phones[1])) {{ $client->party->person->contact_detail->phones[1] }} @endif Phone #3: @if(isset($client->party->person->contact_detail->phones[2])) {{ $client->party->person->contact_detail->phones[2] }} @endif
5th Call: {{ $client->client_detail->fifth_call == 1 ? 'Yes' : 'No' }}
Client Address
Address: {{ $client->party->person->contact_detail->address_1 }} State: {{ $client->party->person->contact_detail->state }}
Postcode: {{ $client->party->person->contact_detail->postcode }} Country: @if(isset($client->party->person->contact_detail->country->full_name)) {{ $client->party->person->contact_detail->country->full_name }} @endif
Client Visa and Passport
Passport: @if(isset($client->client_detail->passport)) {{ $client->client_detail->passport }} @endif Visa Status: @if(isset($client->client_detail->visa_status->visa)) {{ $client->client_detail->visa_status->visa }} @endif
Expiration Date: @if(isset($client->client_detail->expiration_date)) {{ \Carbon\Carbon::createFromFormat('Y-m-d', $client->client_detail->expiration_date)->format('d/m/Y') }} @endif
Client Other Details
College Currently Enrolled: @if(isset($client->client_detail->college_currently_enroled)) {{ $client->client_detail->college_currently_enroled }} @endif Client Member Card No.: @if(isset($client->client_detail->client_member_card_no)) {{ $client->client_detail->client_member_card_no }} @endif
Referrer: @if(isset($client->client_detail->referrer->deal->party->name)) {{ $client->client_detail->referrer->deal->party->name }} @endif Assigned To: @if(isset($client->client_detail->assigned->party->name)) {{ $client->client_detail->assigned->party->name }} @endif
Date Created: @if(isset($client->created_at)) {{ \Carbon\Carbon::parse($client->created_at)->format('d/m/Y') }} @endif
Notes
@if(count($client->notes) > 0) @foreach ($client->notes as $k => $note) @endforeach @else

No Notes

@endif @if($total_strlen < 3000)
Conversation
@if(count($client->convos) > 0) @foreach ($client->convos as $k => $convo) @endforeach @else

No Conversation

@endif @endif
@if($total_strlen > 3000)
Conversation
@if(count($client->convos) > 0) @foreach ($client->convos as $k => $convo) @endforeach @else

No Conversation

@endif
@endif