@php $customer = $this->selectedCustomer; $package = $this->selectedPackage; $promoActive = $package && $package->promotionAppliesOn($work_order_date ?: \App\Support\BusinessClock::todayString()); @endphp
@if ($workOrder)
@endif
{{-- 1. Customer --}} @if ($customer)

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

{{ format_phone($customer->phone) }}{{ $customer->email ? ' · '.$customer->email : '' }}

@if ($customer->serviceAddress)

{{ $customer->serviceAddress->streetLine() }}, {{ $customer->serviceAddress->cityLine() }}

@endif @if (auth()->user()->hasMultipleOrganizations())

Organization: {{ $customer->organization?->name }}

@endif
@unless ($workOrder) Change customer @endunless
@if ($workOrder)
@endif @else
@if ($canCreateCustomer) New customer @endif
@error('customer_ulid')@enderror @if (mb_strlen(trim($customerSearch)) >= 2)
    @forelse ($this->customerResults as $result)
  • @empty
  • No active customers match "{{ $customerSearch }}". @if ($canCreateCustomer)@endif
  • @endforelse
@else

Type at least 2 characters to search active customers.

@endif @endif
@if ($customer) {{-- 2. Seller & assignment --}}
@if ($lockedSeller)

{{ $lockedSeller->fullName() }}

@else @endif @if ($canAssign) @endif
{{-- 3. Vendor & package --}} @if ($packageLocked) The package cannot be changed once a work order is {{ strtolower($workOrder->status->label()) }}. The price snapshot below is preserved. @endif
@if ($vendor_ulid !== '' && $this->packageOptions->isEmpty())

This vendor has no packages available on the selected work order date.

@endif @if ($package)

{{ $package->name }} {{ $package->code }}

{{ $package->vendor?->name }}

    @foreach ($package->serviceItems as $item)
  • {{ $item->service->name }} {{ \App\Services\Packages\ServiceDetailSchema::summary($item->service->category, $item->details) ?: 'Included' }}
  • @endforeach
@if ($package->description)

{{ $package->description }}

@endif
@endif
{{-- 4. Dates --}}
{{-- 5. Notes --}}
@unless ($workOrder) @endunless
@endif @error('general'){{ $message }}@enderror
{{-- Summary --}}
{{-- Quick customer creation --}} @if ($canCreateCustomer)
@include('livewire.customers.partials.customer-fields', [ 'prefix' => 'customerForm', 'formData' => $customerForm, 'organizations' => $modalOrganizations, 'sellers' => $modalSellers, 'sellerLocked' => (bool) $lockedSeller, 'lockedSellerName' => $lockedSeller?->fullName(), ]) @error('customerForm.general'){{ $message }}@enderror
Cancel Create customer
@endif