Manufacturing Schedule (Factory Staff)

@if($from || $to)

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

@endif @foreach($byDate as $dateStr => $records)
Manufacturing Date   {{ \Carbon\Carbon::parse($dateStr)->format('d F Y') }}
@foreach($records as $cm) @endforeach
FileBrandCustomerSuburb MeasurerScheduled DateManufacture Date Delivery DateStatusValue
{{ $cm->job?->job_number ?? '' }} {{ $cm->job?->lead?->brand?->name ?? '' }} {{ $cm->job?->contact?->full_name ?? '' }} {{ $cm->job?->site_suburb ?? '' }} {{ $cm->measurer?->name ?? '' }} {{ $cm->scheduled_date?->format('d/m/Y') ?? '' }} {{ $cm->manufacture_date?->format('d/m/Y') ?? '' }} {{ $cm->delivery_date?->format('d/m/Y') ?? '' }} {{ ucfirst($cm->status) }} {{ number_format($cm->job?->job_value ?? 0) }}
Summary for Manufacturing Date = {{ \Carbon\Carbon::parse($dateStr)->format('d/m/Y') }} ({{ $records->count() }} detail record{{ $records->count() !== 1 ? 's' : '' }}) {{ number_format($records->sum(fn($r) => $r->job?->job_value ?? 0)) }}
@endforeach