{{ __('Pharmacy') }}
{{ __('Record Dispense') }}
{{ $pharmacy->pharmacy_name ?? ('Pharmacy #' . $pharmacy->pharmacy_id) }}
{{ __('Close') }}
@if(session('success'))
{{ session('success') }} @if(session('receipt_log_id'))
@endif
@endif @if($errors->any())
{{ __('Please fix the errors below.') }}
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
1. {{ __('Find recipient') }} 2. {{ __('Select drug') }} 3. {{ __('Confirm dispense') }}
{{ __('Step 1: Load recipient & month') }}
@if($recipient)
@if(!($dispensingOpen ?? false))
{{ __('Dispensing is currently disabled. Please contact finance/admin to start dispensing for the current chronic fund cycle.') }}
@endif
{{ $recipient->first_name }} {{ $recipient->last_name }}
ID {{ $recipient->id }}
@if(!empty($recipientIdentity))
@if(!empty($recipientIdentity['national_id_masked']))
{{ __('National ID') }}: {{ $recipientIdentity['national_id_masked'] }}
@endif @if(!empty($recipientIdentity['birth_date']))
{{ __('Birth date') }}: {{ $recipientIdentity['birth_date'] }}
@endif @if(!empty($recipientIdentity['phone_number']))
{{ __('Phone') }}: {{ $recipientIdentity['phone_number'] }}
@endif @if(!empty($recipientIdentity['city']))
{{ __('City') }}: {{ $recipientIdentity['city'] }}
@endif
@endif
{{ __('Month') }}: {{ $month }}
@csrf @php($oldItems = old('items')) @php($items = (is_array($oldItems) && count($oldItems)) ? $oldItems : [['drug_id' => ($plans->first()?->drug_id ?? null), 'quantity' => 1]])
{{ __('Drugs to dispense') }}
@error('items')
{{ $message }}
@enderror
@foreach($items as $i => $item)
@error('items.' . $i . '.drug_id')
{{ $message }}
@enderror
@error('items.' . $i . '.quantity')
{{ $message }}
@enderror
@endforeach
{{ __('You can add multiple drugs; one receipt will be generated for the whole dispense.') }}
{{ __('ID photo / Scan') }}
@error('id_image')
{{ $message }}
@enderror
{{ __('Mobile: the camera will open. PC: scan using printer/scanner, then choose the file.') }}
@error('notes')
{{ $message }}
@enderror
{{ __('Cancel') }} @if(($dispensingOpen ?? false)) @else @endif
{{ __('Step 3: Remaining this month') }}
@foreach($plans as $plan) @php($r = $remaining[$plan->drug_id] ?? null)
{{ $plan->drug->name }}
{{ __('Allowed') }}: {{ $r['allowed'] ?? 0 }} · {{ __('Spent') }}: {{ $r['spent'] ?? 0 }} · {{ __('Remaining') }}: {{ $r['remaining'] ?? 0 }}
@endforeach
@endif
@if(session('preview_token') || session('receipt_log_id')) @endif