@extends('layouts.dashboard') @section('title', $customer->first_name.' '.$customer->last_name) @section('content') @php $__user = auth()->user(); @endphp

{{ $customer->first_name }} {{ $customer->last_name }}

@csrf @method('PUT')

Account & billing

Type: {{ $customer->type->value }}

Card on file: @if ($customer->pm_last_four) {{ $customer->pm_type }} ending {{ $customer->pm_last_four }} @else None @endif

@if ($customer->type->value === 'account')

Payment terms: {{ $customer->payment_terms_days ? $customer->payment_terms_days.' days' : 'Not set' }}

Credit limit: {{ $customer->credit_limit !== null ? '$'.number_format($customer->credit_limit, 2) : 'Not set' }}

Terms accepted: {{ $customer->account_terms_accepted_at?->format('Y-m-d H:i') ?? 'Not recorded' }}

@else

No account terms — cash customer.

@endif @if ($__user?->isOwner() || $__user?->isSuperAdmin())
@csrf @method('PUT')
@endif

Bookings

@forelse ($bookings as $booking) @empty @endforelse
Reference Status Delivery Collection Total
{{ $booking->reference }} {{ str_replace('_', ' ', $booking->status->value) }} {{ $booking->delivery_date?->format('Y-m-d') }} {{ $booking->collection_date?->format('Y-m-d') }} {{ $booking->total_inc_gst !== null ? '$'.number_format($booking->total_inc_gst, 2) : '—' }} View
No bookings yet.
@endsection