Period: {{ $from ? \Carbon\Carbon::parse($from)->format('d M Y') : 'All' }}
{{ ($from && $to) ? ' — ' : '' }}
{{ $to ? \Carbon\Carbon::parse($to)->format('d M Y') : '' }}
· Total: {{ $worksOrders->count() }} works order{{ $worksOrders->count() !== 1 ? 's' : '' }}
@endif
@forelse($worksOrders as $wo)
Issued Date
{{ $wo->issued_date?->format('d M Y') ?? '—' }}
Manufacture Date
{{ $wo->manufacture_date?->format('d M Y') ?? '—' }}
Delivery Date
{{ $wo->delivery_date?->format('d M Y') ?? '—' }}
Target Completion
{{ $wo->target_completion?->format('d M Y') ?? '—' }}
@if($wo->scope_of_works)
Scope: {{ $wo->scope_of_works }}
@endif
@if($wo->special_instructions)
Special Instructions: {{ $wo->special_instructions }}
@endif
@if($wo->items->isNotEmpty())
| # |
Description |
Trade |
Assignee |
Est. Hrs |
Status |
@foreach($wo->items as $item)
| {{ $loop->iteration }} |
{{ $item->description }} |
{{ \App\Models\WorksOrderItem::tradeLabel($item->trade) }} |
{{ $item->assignee?->name ?? '—' }} |
{{ $item->estimated_hours ?? '—' }} |
{{ ucfirst(str_replace('_',' ',$item->status)) }} |
@endforeach
@else
No line items recorded.
@endif
@if($wo->faults->isNotEmpty())
FAULT ITEMS ({{ $wo->faults->count() }}) — Total cost: ${{ number_format($wo->totalFaultCost()) }}
@foreach($wo->faults as $fault)
{{ $fault->fault_number }} · {{ $fault->fault_type ?? 'Fault' }}
${{ number_format($fault->cost ?? 0) }}
@endforeach
@endif
@if($wo->notes)
Notes: {{ $wo->notes }}
@endif
@empty
No works orders found for the selected criteria.
@endforelse