{{-- Header --}}

Shipment Schedule

{{ $this->stats['total'] }} Total {{ $this->stats['unshipped'] }} Unshipped {{ $this->stats['shipped'] }} Shipped @if($this->stats['overdue'] > 0) {{ $this->stats['overdue'] }} Overdue @endif
@if($search) @endif
{{-- Modern Filter Bar --}}
{{-- Mobile Toggle --}} {{-- Filters --}}
{{-- View Selector (Chip Style) --}}
{{-- Date Range Dropdown --}}
@if($fromDate || $toDate) @endif
{{-- Customer Multi-Select Dropdown --}}
@if(count($customers) > 0) @endif @foreach($this->customerList as $c) @endforeach
{{-- Season Multi-Select Dropdown --}}
@if(count($seasons) > 0) @endif @foreach($this->seasonList as $s) @endforeach
{{-- Invoice Status Dropdown --}}
{{-- Active Filters Count & Clear --}} @if($this->activeFiltersCount > 0)
{{ $this->activeFiltersCount }} active
@endif
{{-- Main Content --}}
{{-- Loading Overlay --}}
@if($this->showGroupedView) {{-- GROUPED VIEW (Shipped) --}} @if($this->groupedDrops->isEmpty())

No shipped drops found

Shipped drops will appear here grouped by invoice

@else {{-- Expand/Collapse All --}}
{{ $this->groupedDrops->count() }} invoice groups
@foreach($this->groupedDrops as $groupIndex => $group) @php $isExpanded = in_array((string)$group['id'], $expandedGroups); $isUnassigned = $group['id'] === 'unassigned'; $groupNumber = $loop->iteration; @endphp
{{-- Group Header --}}
{{ $groupNumber }}
@if($isUnassigned) @else @endif {{ $group['reference'] }} {{ $group['customer'] }} @if(!$isUnassigned) ID: {{ $group['id'] }} @endif
{{ $group['drop_count'] }} drops {{ number_format($group['total_shipped']) }} units shipped
@if(!$isUnassigned && $group['invoice'])
@if($group['status'] === 'draft') Draft @elseif($group['status'] === 'ready') Ready @elseif($group['status'] === 'sent_to_zoho') Sent @elseif($group['status'] === 'complete') Complete @endif
@endif
{{-- Group Content (Drops Table) --}} @if($isExpanded)
@foreach($group['drops'] as $drop) @php $order = $drop->line?->order; $colourway = $drop->line?->colourway; $style = $colourway?->style_versions?->styles; $design = $style?->designs; $totalQty = $drop->sizes->sum('qty'); $totalShipped = $drop->sizes->sum('shipped_qty') ?: 0; @endphp @endforeach
Drop PO Style Colour Image Sizes Qty Shipped Ship Date Notes
#{{ $drop->id }} {{ $order?->customer_po ?? '—' }}
@if($design) RT{{ $design->id }} @endif @if($style?->customer_ref) {{ $style->customer_ref }} @endif
{{ $colourway?->name ?? '—' }} @if($colourway?->thumb_url) {{ $colourway->name }} @else
@endif
Size Quantities
Size Order Qty Shipped
Total
{{ number_format($totalQty) }} {{ number_format($totalShipped ?: $totalQty) }} @if($drop->shipped_date) {{ $drop->shipped_date->format('d M Y') }} @else @endif @if($drop->fn_notes) {{ Str::limit($drop->fn_notes, 25) }} @else @endif
Group Totals: {{ number_format($group['total_qty']) }} {{ number_format($group['total_shipped']) }}
@endif
@endforeach
@endif @elseif($this->drops->isEmpty()) {{-- Empty State --}}

No drops found

Try adjusting your search or filters

@if($this->activeFiltersCount > 0) @endif
@else {{-- Table --}}
{{-- Skeleton Loading Rows --}} @php $lastInvoiceId = 'INITIAL'; $seenInvoices = []; $items = $this->organizedDrops; @endphp @foreach($items as $index => $item) @php $drop = $item['drop']; $order = $drop->line?->order; $colourway = $drop->line?->colourway; $style = $colourway?->style_versions?->styles; $design = $style?->designs; $status = $this->getDropStatus($drop); $totalQty = $drop->sizes->sum('qty'); $totalShipped = $drop->sizes->sum('shipped_qty') ?: 0; $invoiceId = $drop->commission_invoice_groups_id; $isFirstInGroup = $invoiceId && !in_array($invoiceId, $seenInvoices); // Check if next item is different group $nextItem = $items[$index + 1] ?? null; $nextInvoiceId = $nextItem ? $nextItem['drop']->commission_invoice_groups_id : null; $isLastInGroup = $invoiceId && ($nextInvoiceId !== $invoiceId); if ($isFirstInGroup) { $seenInvoices[] = $invoiceId; } $lastInvoiceId = $invoiceId; $groupClass = $invoiceId ? 'grouped' : 'no-invoice'; @endphp {{-- Checkbox --}} {{-- Drop ID --}} {{-- Season --}} {{-- Customer --}} {{-- PO --}} {{-- Style --}} {{-- Description --}} {{-- Colour --}} {{-- Image --}} {{-- Sizes Editor --}} {{-- Total Qty --}} {{-- Shipped Qty --}} {{-- Ex-Fty Date --}} {{-- Shipped Toggle --}} {{-- Invoice Group --}} {{-- Finance Notes --}} @endforeach
Drop @if($sortBy === 'id') @endif Season Customer PO Style Description Colour Image Sizes Qty Shipped Ex-Fty @if($sortBy === 'exfty') @endif Shipped Invoice Notes
id] ?? false)> #{{ $drop->id }} {{ $order?->season?->description ?? '—' }} {{ $order?->customer?->name ?? '—' }} {{ $order?->customer_po ?? '—' }}
@if($design) RT{{ $design->id }} @endif @if($style?->customer_ref) {{ $style->customer_ref }} @endif
{{ Str::limit($design?->description, 30) ?? '—' }} {{ $colourway?->name ?? '—' }} @if($colourway?->thumb_url) {{ $colourway->name }} @else
@endif
@foreach($drop->sizes->sortBy('size.order')->unique('sizes_id') as $dropSize) @if($dropSize->size) {{ $dropSize->size->name }} {{ (int)$dropSize->qty }} @endif @endforeach
{{-- Dropdown editor --}}
Size Quantities
Size Order Qty Shipped
Total
{{ number_format($totalQty) }} {{ number_format($totalShipped) }}
@if($drop->exfty) {{ $drop->exfty->format('d M Y') }} @else Set date @endif
id }}.window="checked = false" @shipped-set-{{ $drop->id }}.window="checked = true" wire:key="shipped-toggle-{{ $drop->id }}"> @if($drop->invoiceGroup) {{ $drop->invoiceGroup->reference }} @else @endif
@if($drop->fn_notes) {{ Str::limit($drop->fn_notes, 20) }} @else Add note @endif
{{-- Pagination --}} @if($this->drops->hasPages())
{{ $this->drops->links() }}
@endif @endif
{{-- Image Modal --}}
{{-- Invoice Group Modal --}} @if($showInvoiceModal)

Assign to Invoice Group

Assigning {{ $this->selectedCount }} drop(s) to an invoice group

or
@endif {{-- Toast Notifications --}}
{{-- Selection Floating Toast --}} @if($this->selectedCount > 0)
{{ $this->selectedCount }}
{{ $this->selectedCount }} {{ Str::plural('drop', $this->selectedCount) }} selected Ready for bulk actions
@endif