@extends('layouts.master')
@section('title', 'Vaccine Inventory')
@section('content')
{{-- 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 --}}
@if($batches->count())
| Vaccine |
Batch No |
Expiry |
Received |
Available |
Source |
Status |
Action |
@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
|
{{ $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
|
@endforeach
@else
No Vaccine Stock Found
Start by stocking your first vaccine batch.
@endif
@endsection