@extends('layouts.app') @section('title', 'Sales by Brand') @section('breadcrumb')Reports Sales by Brand@endsection @section('content')

Sales by Brand

Jobs with a sale date, grouped by brand — with subtotals and grand total

Export PDF
Reset
@forelse($byBrand as $brandName => $jobs)
{{ $brandName ?: 'Unassigned' }} ({{ $jobs->count() }} sale{{ $jobs->count() !== 1 ? 's' : '' }})
${{ number_format($jobs->sum('job_value')) }}
@foreach($jobs as $job) @endforeach
File # Sale Date Customer Suburb Consultant Designer Showroom Value
{{ $job->job_number }} {{ $job->sale_date?->format('d/m/Y') ?? '—' }} {{ $job->contact?->full_name ?? '—' }} {{ $job->site_suburb ?? $job->contact?->suburb ?? '—' }} {{ $job->consultant?->name ?? '—' }} {{ $job->designer?->name ?? '—' }} {{$job->contact?->leads->first()?->showroom?->name ?? '—' }} ${{ number_format($job->job_value ?? 0) }}
@empty
No sales found for the selected date range.
@endforelse @if($byBrand->isNotEmpty())
Grand Total — {{ $byBrand->flatten()->count() }} record{{ $byBrand->flatten()->count() !== 1 ? 's' : '' }} ${{ number_format($byBrand->flatten()->sum('job_value')) }}
@endif
@endsection