@php($customer = $workOrder->customer)

Work Order {{ $workOrder->work_order_number }}

@if ($workOrder->external_order_number)

Vendor order #{{ $workOrder->external_order_number }}

@endif
Status: {{ $workOrder->status->label() }} {{ $workOrder->play_type->label() }} {{ $workOrder->deadlineState()->label() }}

Customer

{{ $customer?->displayName() }}

@if ($customer?->company_name && $customer->fullName() !== $customer->displayName())

Contact: {{ $customer->fullName() }}

@endif

{{ $customer?->customer_number }}

{{ format_phone($customer?->phone) }}

{{ $customer?->email }}

Service address

{{ $workOrder->serviceStreetLine() }}
{{ $workOrder->serviceCityLine() }}@if ($workOrder->service_county)
{{ $workOrder->service_county }} County @endif

Ordered package

{{ $workOrder->package_name_snapshot }} {{ $workOrder->package_code_snapshot }}

Vendor: {{ $workOrder->vendor_name_snapshot }}

@if ($workOrder->package_description_snapshot)

{{ $workOrder->package_description_snapshot }}

@endif
@foreach ($workOrder->services as $item) @endforeach
ServiceDetails
{{ $item->service_name }} @foreach (\App\Services\Packages\ServiceDetailSchema::describe($item->service_category, $item->details) as $label => $value) {{ $label }}: {{ $value }} @endforeach

Pricing (at time of order)

Package price ({{ $workOrder->price_frequency->label() }})
{{ format_money($workOrder->package_price) }}
Monthly price
{{ format_money($workOrder->monthly_price) }}
@if ($workOrder->promotional_price !== null)
Promotional price
{{ format_money($workOrder->promotional_price) }}
@endif
Installation
{{ format_money($workOrder->installation_charge) }}
Activation
{{ format_money($workOrder->activation_charge) }}

Dates & handling

Work order date
{{ format_date($workOrder->work_order_date) }}
Requested installation
{{ format_date($workOrder->requested_installation_date) ?: '—' }}
Scheduled installation
{{ $workOrder->scheduled_installation_date ? format_date($workOrder->scheduled_installation_date).($workOrder->scheduled_time_window ? ' ('.$workOrder->scheduled_time_window->label().')' : '') : '—' }}
Deadline
{{ format_date($workOrder->deadline_date) }}
@if ($workOrder->completion_date)
Completed
{{ format_date($workOrder->completion_date) }}
@endif
Seller
{{ $workOrder->seller?->fullName() }}
Assigned to
{{ $workOrder->assignedUser?->name ?? '—' }}
@if ($workOrder->customer_notes)

Customer notes

{{ $workOrder->customer_notes }}

@endif

Status history

@foreach ($workOrder->statusHistories as $history) @endforeach
{{ format_datetime($history->created_at) }} @if ($history->from_status){{ $history->from_status->label() }} → @endif{{ $history->to_status->label() }} {{ $history->changedBy?->name }}{{ $history->remarks ? ' — '.$history->remarks : '' }}

Technician / installer signature & date

Customer signature & date