@extends('layouts.app')
@section('title','Stock Transfers')
@section('content')<div class="page-head"><div><h1>Stock transfers</h1><p>Source → destination workflow with approve, transit, and receive states.</p></div><a class="btn btn-primary" href="{{ route('stock-transfers.create') }}">New transfer</a></div><div class="card-erp"><div class="table-responsive"><table class="table table-dense"><thead><tr><th>Transfer</th><th>Date</th><th>From</th><th>To</th><th class="text-end">Cost</th><th>Status</th><th>Prepared by</th><th></th></tr></thead><tbody>@forelse($transfers as $t)<tr><td class="fw-bold text-accent">{{ $t->transfer_no }}</td><td>{{ $t->transfer_date->format('d M Y') }}</td><td>{{ $t->fromWarehouse?->code }}</td><td>{{ $t->toWarehouse?->code }}</td><td class="text-end">{{ number_format((float)$t->total_cost,2) }}</td><td><span class="badge status-{{ $t->status }}">{{ strtoupper(str_replace('_',' ',$t->status)) }}</span></td><td>{{ $t->preparedBy?->name }}</td><td><a class="btn btn-light border btn-dense" href="{{ route('stock-transfers.show',$t) }}">Open</a></td></tr>@empty<tr><td colspan="8" class="text-center text-muted py-5">No stock transfers.</td></tr>@endforelse</tbody></table></div></div>@endsection
