@extends('layouts.admin') @section('title','Transfer '.$transfer->number) @section('content') @php $label = fn (string $v) => ucwords(str_replace(['_', '-'], ' ', $v)); $statusTone = match ($transfer->status) { 'draft' => 'muted', 'in_transit' => 'info', 'partial' => 'warning', 'received' => 'success', 'canceled' => 'danger', default => 'muted', }; $requested = (int) $transfer->lines->sum('quantity'); $shipped = (int) $transfer->lines->sum('quantity_shipped'); $received = (int) $transfer->lines->sum('quantity_received'); $pct = $requested > 0 ? (int) round(($received / $requested) * 100) : 0; @endphp All transfers Inventory @if($transfer->isDraft())
@csrf
@endif
@if($errors->any())
{{ $errors->first() }}
@endif
Status {{ $label($transfer->status) }} {{ $transfer->createdBy?->name ?? 'System' }}
Requested {{ number_format($requested) }} {{ $transfer->lines->count() }} SKUs
Shipped {{ number_format($shipped) }} Left origin
Received {{ number_format($received) }} {{ $pct }}% complete
Lane {{ $transfer->fromLocation?->code }} → {{ $transfer->toLocation?->code }} {{ $transfer->created_at?->timezone(config('app.timezone'))->format('Y-m-d H:i') }}
@if($transfer->canShip())
@csrf

Ship

Deducts available at origin and posts incoming at destination. Partial quantities are allowed.

@foreach($transfer->lines as $line) @endforeach
SKU Need Left to ship This shipment
{{ $line->variant?->sku ?? '—' }}
{{ $line->variant?->product?->title }}
{{ $line->quantity }} {{ $line->remainingToShip() }} remainingToShip() < 1)>
@endif @if($transfer->canReceive())
@csrf

Receive

Converts destination incoming into on-hand / available. You can split receipts.

@foreach($transfer->lines as $line) @endforeach
SKU Shipped Outstanding This receipt
{{ $line->variant?->sku ?? '—' }} {{ $line->quantity_shipped }} {{ $line->remainingToReceive() }} remainingToReceive() < 1)>
@endif

Line board

@foreach($transfer->lines as $line) @endforeach
SKU / Product Qty Shipped Received
{{ $line->variant?->sku ?? '—' }}
{{ $line->variant?->product?->title }}
{{ $line->quantity }} {{ $line->quantity_shipped }} {{ $line->quantity_received }} @if($transfer->isDraft())
@csrf @method('DELETE')
@endif
@if($transfer->isDraft())
@csrf
@endif
@csrf

Notes

@if($transfer->status !== 'canceled') @endif

Shipment log

@forelse($transfer->shipments as $shipment)
{{ $label($shipment->status) }} {{ ($shipment->shipped_at ?? $shipment->received_at)?->diffForHumans() }}
@if($shipment->tracking_number)
Tracking: {{ $shipment->tracking_number }}
@endif
{{ collect($shipment->line_quantities ?? [])->sum() }} units
@empty

No shipments yet.

@endforelse
@endsection