@php $statusBadge = [ 'draft' => 'slate', 'dispatched' => 'sky', 'received' => 'emerald', 'cancelled' => 'rose', ]; $statusLabel = [ 'draft' => __('Draft'), 'dispatched' => __('Dispatched'), 'received' => __('Received'), 'cancelled' => __('Cancelled'), ]; $kpiIcon = [ 'indigo' => 'bg-indigo-50 text-indigo-600', 'amber' => 'bg-amber-50 text-amber-600', 'emerald' => 'bg-emerald-50 text-emerald-600', 'sky' => 'bg-sky-50 text-sky-600', ]; $avatarColors = [ 'bg-indigo-100 text-indigo-700', 'bg-emerald-100 text-emerald-700', 'bg-amber-100 text-amber-700', 'bg-sky-100 text-sky-700', 'bg-rose-100 text-rose-700', 'bg-violet-100 text-violet-700', ]; $initials = function (?string $name): string { $parts = collect(preg_split('/\s+/', trim((string) $name)))->filter(); return $parts->isEmpty() ? '—' : $parts->take(2)->map(fn ($w) => mb_strtoupper(mb_substr($w, 0, 1)))->implode(''); }; $avatarColor = fn (?string $name): string => $avatarColors[abs(crc32((string) $name)) % count($avatarColors)]; @endphp
{{ $kpi['label'] }}
{{ $kpi['value'] }}
{{ $kpi['sub'] }}
| {{ __('Delivery Note') }} | {{ __('Customer') }} | {{ __('Delivered') }} | {{ __('Status') }} | {{ __('Date') }} | {{ __('Actions') }} |
|---|---|---|---|---|---|
|
@if ($note->project_name)
{{ $note->project_name }} @endif |
{{ $initials($note->customer?->name) }}
{{ $note->customer?->name ?: '—' }} |
{{ rtrim(rtrim(number_format($note->total_delivered, 2), '0'), '.') }} @if ($outstanding > 0){{ __('Outstanding') }}: {{ rtrim(rtrim(number_format($outstanding, 2), '0'), '.') }} @endif |
|
{{ optional($note->delivery_date)->format('Y-m-d') ?: $note->created_at?->format('Y-m-d') }} | |
|
|
|||||
{{ $note->customer?->name ?: '—' }}
@if ($note->project_name){{ $note->project_name }}
@endif{{ __('Uploaded :when. Choose a file to replace it.', ['when' => $existingSignedAt]) }}
@else{{ __('Upload the returned, signed delivery note (PDF, JPG or PNG).') }}
@endif