@extends('admin.layouts.app')
@section('title','Stock Transfer')
@section('content')
<div class="page-shell"><div class="page-head"><div><h1 class="page-title">Stock Transfer</h1><div class="page-subtitle">Store to warehouse / warehouse to store notes</div></div></div>
<form method="POST" action="{{ route('admin.inventory.transfers.store') }}" class="card panel-tight grid-3">@csrf
<div><label>Date</label><input type="date" name="transfer_date" value="{{ now()->toDateString() }}"></div>
<div><label>Product</label><select name="product_id">@foreach($products as $product)<option value="{{ $product->id }}">{{ $product->product_name }} ({{ $product->product_code }})</option>@endforeach</select></div>
<div><label>Qty</label><input type="number" min="1" name="qty"></div>
<div><label>From</label><select name="from_location">@foreach($locations as $loc)<option>{{ $loc->name }}</option>@endforeach</select></div>
<div><label>To</label><select name="to_location">@foreach($locations as $loc)<option>{{ $loc->name }}</option>@endforeach</select></div>
<div style="grid-column:1/-1"><label>Notes</label><textarea name="notes" rows="3"></textarea></div>
<div class="form-actions" style="grid-column:1/-1"><button class="btn primary">Save Transfer</button></div>
</form>
<div class="card panel-tight table-wrap"><table class="table"><thead><tr><th>No</th><th>Date</th><th>Product</th><th>From</th><th>To</th><th>Qty</th></tr></thead><tbody>@foreach($transfers as $row)<tr><td>{{ $row->transfer_no }}</td><td>{{ $row->transfer_date }}</td><td>{{ $row->product_name }}</td><td>{{ $row->from_location }}</td><td>{{ $row->to_location }}</td><td>{{ $row->qty }}</td></tr>@endforeach</tbody></table>{{ $transfers->links() }}</div></div>
@endsection
