Inventory Management

Manage pharmacy stock and inventory

@if (session()->has('message'))
{{ session('message') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif @if (session()->has('bulk_upload_errors'))

Upload Errors:

    @foreach(session('bulk_upload_errors') as $error)
  • {{ $error }}
  • @endforeach
@endif
@forelse($stocks as $stock) @empty @endforelse
Drug Quantity Reorder Level Unit Price Expiry Date Batch Number Status Actions
{{ $stock->drug->name }}
{{ $stock->drug->generic_name }}
{{ $stock->quantity }} {{ $stock->reorder_level }} @if($stock->unit_price) {{ config('app.currency_symbol', '$') }}{{ number_format($stock->unit_price, 2) }} @else - @endif {{ $stock->expiry_date ? $stock->expiry_date->format('M d, Y') : '-' }} {{ $stock->batch_number ?: '-' }} @if($stock->isExpired()) Expired @elseif($stock->isExpiringSoon()) Expiring Soon @elseif($stock->isLowStock()) Low Stock @else In Stock @endif
No stock entries found.
{{ $stocks->links() }}
@if($showModal)

{{ $editingStock ? 'Edit Stock Entry' : 'Create New Stock Entry' }}

@error('drug_id') {{ $message }} @enderror
@error('quantity') {{ $message }} @enderror
@error('reorder_level') {{ $message }} @enderror
{{ config('app.currency_symbol', '$') }}
@error('unit_price') {{ $message }} @enderror
@error('expiry_date') {{ $message }} @enderror
@error('batch_number') {{ $message }} @enderror
@error('supplier') {{ $message }} @enderror
@error('supply_date') {{ $message }} @enderror
@error('notes') {{ $message }} @enderror
@endif @if($showBulkUploadModal)

Bulk Upload Inventory

CSV Format Requirements:

Upload a CSV file with the following columns (header row optional):

  • drug_name - Drug name (required, must exist in drug catalog)
  • quantity - Quantity in stock (required)
  • reorder_level - Reorder level (optional, default: 10)
  • unit_price - Unit price (optional)
  • expiry_date - Expiry date YYYY-MM-DD (optional)
  • batch_number - Batch number (optional)
  • supplier - Supplier name (optional)
  • supply_date - Supply date YYYY-MM-DD (optional, default: today)
  • notes - Additional notes (optional)

Example: Panadol,100,10,50.00,2025-12-31,BATCH001,Supplier ABC,2024-01-15,Initial stock

⚠️ Note: Drugs must exist in the drug catalog before uploading inventory.

@error('bulk_upload_file') {{ $message }} @enderror @if($bulk_upload_file)

Selected: {{ $bulk_upload_file->getClientOriginalName() }}

@endif
@endif