Leads to Sales By Designer

@if($from || $to)

Period: {{ $from ? \Carbon\Carbon::parse($from)->format('d M Y') : 'All' }} to {{ $to ? \Carbon\Carbon::parse($to)->format('d M Y') : 'All' }}

@endif @foreach($grouped as $designerName => $jobs)
Designer {{ $designerName ?: 'Unassigned' }}
@foreach($jobs as $job) @endforeach
IDBrandCustomerSuburb ShowroomConsultantLead DateSaleValue
{{ $job->job_number }} {{ $job->lead?->brand?->name ?? '' }} {{ $job->contact?->full_name ?? '' }} {{ $job->site_suburb ?? '' }} {{ $job->lead?->showroom?->name ?? '' }} {{ $job->consultant?->name ?? '' }} {{ $job->lead?->enquiry_date?->format('d/m/Y') ?? '' }} {{ $job->sale_date?->format('V/m/Y') ?? '' }} {{ number_format($job->job_value ?? 0) }}
Summary for "Designer" = {{ $designerName }} ({{ $jobs->count() }} detail record{{ $jobs->count() !== 1 ? 's' : '' }}) {{ number_format($jobs->sum('job_value')) }}
Sum {{ number_format($jobs->sum('job_value')) }}
@endforeach