@php $act_types = ['1' => 'Waiting', '2' => 'Call', '3' => 'Meeting', '4' => 'Site Visit', '5' => 'Review']; $lead = $data['lead_data']; $lead_acts = $data['lead_acts']; $comments = $data['comments']; $stages = $data['stages']; $sources = $data['sources']; $users = $data['users']; $assignments = $data['assignments']; $nice_answers = $data['nice_answers']; $bant_answers = $data['bant_answers']; @endphp

#{{ $lead->title }}

{{ $lead->first_name . ' ' . $lead->last_name }}

Phone: {{ $lead->phone }}

Address: {{ $lead->address }}

City: {{ $lead->city }}

Pincode: {{ $lead->pincode }}

Project: {{ $lead->project ? $lead->project->title : '' }}
Property: {{ $lead->property ? $lead->property->title : '' }}
Amount Stage Start Date Target End Date Lead Age Category Priority
INR {{ $lead->est_amount }} {{ @$stages[$lead->stage_id_fk] }} {{ date('d M, Y', strtotime($lead->created_at)) }} {{ date('d M, Y', strtotime($lead->created_at . ' + 45 days')) }} {{ round((time() - strtotime($lead->created_at)) / (60 * 60 * 24)) }} Days {{ $lead->category }} {{ $lead->priority }}
Description: {{ $lead->description }}
Remarks: {{ $lead->remarks }}

Planned Events

@if (count($lead_acts) > 0) @foreach ($lead_acts as $key => $act) @endforeach @else @endif
Sr Activity Description Date
{{ $key + 1 }} {{ @$act_types[$act->activity_type] }} @if ($act->activity_type == 1)

Next Date to Connect with: {{ $act->waiting_days }}

@elseif($act->activity_type == 2)

Call Time: {{ date('d M, Y H:i', strtotime($act->act_time)) }}

@elseif($act->activity_type == 3)

Meeting Time: {{ date('d M, Y H:i', strtotime($act->act_time)) }}

Meeting With: {{ $act->activity_user ? $act->activity_user->name : 'NA' }}

Meeting Location: {{ $act->location }}

Meeting Slot: {{ $act->act_slot }} @else @endif

{{ $act->description }} - By {{ $act->user->name }}

{{ date('d M, Y H:i', strtotime($act->created_at)) }}

No Planned Events Found!

Lead Comments

@if (count($lead_acts) > 0) @foreach ($comments as $key => $comment) @endforeach @else @endif
Sr Comment Stage Priority Date
{{ $key + 1 }}

{{ $comment->comment }} - By {{ $comment->user->name }}

{{ @$stages[$comment->new_stage] }}

{{ $comment->priority }}

{{ date('d M, Y H:i', strtotime($comment->created_at)) }}

No Comments Found!
@php $user_types = [1=>'NC', '2'=>'RM', 3=>'CRM', 4=>'Sales Director']; @endphp

Lead Assinment History

@foreach ($assignments as $key => $obj) @endforeach
Sr User Type User Remarks Date
{{ $key + 1 }} {{ @$user_types[$obj->user_type] }} @if (!is_null($obj->is_sarthi)) Sarthi @endif {{ @$users[$obj->user_id] }} {{ $obj->remarks }} {{ date('d M, Y H:i', strtotime($obj->created_at)) }}

NICE Form Details:

@foreach ($nice_answers as $key => $obj)

Question {{ $key + 1 }}: {{ @$obj->question->title }}

Answer: {{ $obj->answer }}

@endforeach

BANT Form Details:

@foreach ($bant_answers as $key => $obj)

Question {{ $key + 1 }}: {{ @$obj->question->title }}

Answer: {{ $obj->answer }}

@endforeach