Overview

Deal Title {{ ucfirst($deal->deal_title) }}
Expected Close {{ \Carbon\Carbon::create($deal->closing_date)->format('d M, Y') }}
Deal Time {{ (int) \Carbon\Carbon::parse($deal->created_at)->diffInDays(now()) }} days
Contact Name
@if($deal->lead->contact->profile_picture) @else {{ strtoupper(substr($deal->lead->contact->first_name, 0, 1)) }} @endif

{{ $deal->lead->contact->first_name }} {{ $deal->lead->contact->last_name }}

Contact Type {{ $deal->lead->contact->contact_type }}
Contact Email/Phone {{ $deal->lead->contact->email_address.'/'. $deal->lead->contact->phone_number }}

Deal Products

@if($deal->lead->leadProducts->count()) @foreach($deal->lead->leadProducts as $product) @endforeach
Product Quantity Unit Cost Total
{{ $product->product->name }} {{ $product->count }} {{$currency->symbol}} {{ number_format($product->product->price, 2) }} {{$currency->symbol}} {{ number_format($product->cost, 2) }}
Total Value: {{$currency->symbol}} {{ number_format($deal->lead->leadProducts->sum('cost'), 2) }}
@else

No products linked to this lead.

@endif

Deal Notes

@forelse($deal->lead->notes()->latest()->get() as $note)
{{ $note->user->name ?? 'System' }} {{ $note->created_at->diffForHumans() }}

{{ $note->message }}

@empty

No notes yet.

@endforelse