@extends('layouts.app')
@section('title','Opening Stock')
@section('content')<div class="page-head"><div><h1>Opening stock</h1><p>Draft and approve initial inventory through the stock ledger.</p></div><a class="btn btn-primary" href="{{ route('opening-stock.bulk') }}">New opening stock</a></div><div class="card-erp"><div class="table-responsive"><table class="table table-dense"><thead><tr><th>Reference</th><th>Date</th><th>Warehouse</th><th>Financial year</th><th class="text-end">Total cost</th><th>Status</th><th>Created by</th><th></th></tr></thead><tbody>@forelse($openings as $o)<tr><td class="fw-bold text-accent">{{ $o->reference_no }}</td><td>{{ $o->opening_date->format('d M Y') }}</td><td>{{ $o->warehouse?->code }}</td><td>{{ $o->financialYear?->name }}</td><td class="text-end">{{ number_format((float)$o->total_cost,2) }}</td><td><span class="badge status-{{ $o->status }}">{{ strtoupper($o->status) }}</span></td><td>{{ $o->createdBy?->name }}</td><td><a class="btn btn-light border btn-dense" href="{{ route('opening-stock.show',$o) }}">Open</a></td></tr>@empty<tr><td colspan="8" class="text-center text-muted py-5">No opening stock documents.</td></tr>@endforelse</tbody></table></div></div>@endsection
