@extends('admin.layouts.app')
@section('title','Inventory Control')
@section('content')
<div class="page-shell"><div class="page-head"><div><h1 class="page-title">Inventory Control</h1><div class="page-subtitle">Stock overview, recent movement and locations</div></div><div class="form-actions"><a class="btn" href="{{ route('admin.inventory.adjustments') }}">Stock Adjustment</a><a class="btn" href="{{ route('admin.inventory.transfers') }}">Stock Transfer</a></div></div>
<div class="grid-3">@foreach($locations as $loc)<div class="stat"><div class="k">Location</div><div class="v" style="font-size:18px">{{ $loc->name }}</div></div>@endforeach</div>
<div class="grid-2"><div class="card panel-tight table-wrap"><h3>Current Stock</h3><table class="table"><thead><tr><th>Code</th><th>Product</th><th>Stock</th></tr></thead><tbody>@foreach($products as $item)<tr><td>{{ $item->product_code }}</td><td>{{ $item->product_name }}</td><td>{{ $item->stock_quantity }}</td></tr>@endforeach</tbody></table>{{ $products->links() }}</div><div class="card panel-tight table-wrap"><h3>Recent Movements</h3><table class="table"><thead><tr><th>Date</th><th>Type</th><th>Product</th><th>Qty</th><th>Ref</th></tr></thead><tbody>@foreach($movements as $item)<tr><td>{{ $item->created_at }}</td><td>{{ $item->movement_type }}</td><td>{{ $item->product_name }}</td><td>{{ $item->qty }}</td><td>{{ $item->reference_no }}</td></tr>@endforeach</tbody></table></div></div></div>
@endsection
