@if (session('success'))
{{ session('success') }}
@endif

{{ $customer->full_name }}

@if ($customer->company_name)

{{ $customer->company_name }}

@endif
Edit
@csrf @method('DELETE')

Contact Information

Phone
{{ $customer->phone ?: 'N/A' }}
Email
{{ $customer->email ?: 'N/A' }}
Username
{{ $customer->user->username }}

Service Location

@if ($customer->primaryLocation)
Address
{{ $customer->primaryLocation->service_address }}
City, State ZIP
{{ $customer->primaryLocation->service_city }}, {{ $customer->primaryLocation->service_state }} {{ $customer->primaryLocation->service_zip }}
@else

No service location on file.

@endif

Notes

{{ $customer->notes ?: 'No notes.' }}

Equipment ({{ $customer->equipment->count() }})

@if ($customer->equipment->isEmpty())

No equipment on file.

@else
@foreach ($customer->equipment->take(5) as $equip)

{{ $equip->type->type_name ?? 'Unknown' }}

{{ $equip->model ?: 'No model' }}

@if ($equip->next_service_due)

Due: {{ $equip->next_service_due->format('M d, Y') }}

@endif
@endforeach
@endif

Recent Appointments ({{ $customer->appointments->count() }})

@if ($customer->appointments->isEmpty())

No appointments on file.

@else
@foreach ($customer->appointments->take(5) as $appointment)

{{ $appointment->serviceType->name ?? 'Unknown' }}

{{ $appointment->requested_date->format('M d, Y') }}

{{ ucfirst($appointment->status) }}
@endforeach
@endif

Invoices ({{ $customer->invoices->count() }})

@if ($customer->invoices->isEmpty())

No invoices on file.

@else
@foreach ($customer->invoices->take(5) as $invoice)
{{ $invoice->invoice_number }}

{{ $invoice->issue_date->format('M d, Y') }}

${{ number_format($invoice->total, 2) }}

{{ ucfirst($invoice->status) }}
@endforeach
@endif

Contracts ({{ $customer->contracts->count() }})

@if ($customer->contracts->isEmpty())

No contracts on file.

@else
@foreach ($customer->contracts->take(5) as $contract)

{{ $contract->name }}

{{ $contract->contract_number }}

{{ ucfirst($contract->status) }}
@endforeach
@endif