@extends('layouts.master') @section('title', 'Vaccine Inventory') @section('content')
Stock Ledger + Stock Vaccine
{{-- STATISTICS --}}
{{ number_format($stats['vaccines']) }}
Vaccine Types Stocked
{{ number_format($stats['batches']) }}
Active Batches
{{ number_format($stats['available_doses']) }}
Available Doses
{{ number_format($stats['expiring_soon']) }}
Expiring Soon
{{-- INVENTORY TABLE --}}
Vaccine Inventory
@if($batches->count()) @foreach($batches as $batch) @php $status = 'Active'; $badgeClass = 'workflow-badge-green'; if ( $batch->quantity_available <= 0 ) { $status = 'Depleted'; $badgeClass = 'workflow-badge-red'; } if ( \Carbon\Carbon::parse( $batch->expiry_date )->isPast() ) { $status = 'Expired'; $badgeClass = 'workflow-badge-red'; } @endphp @endforeach
Vaccine Batch No Expiry Received Available Source Status Action
{{ $batch->vaccine_name }} {{ $batch->batch_no }} {{ \Carbon\Carbon::parse($batch->expiry_date)->format('m/Y') }} {{ number_format($batch->quantity_received) }} {{ number_format($batch->quantity_available) }} {{ $batch->source_name ?? 'N/A' }} {{ $status }} View
@else
No Vaccine Stock Found
Start by stocking your first vaccine batch.
@endif
@endsection