{{-- View Toggle --}}
{{-- Batches View --}} @if ($viewMode === 'batches' && $batches)
@php $batchHeaders = [ 'batch_id' => 'Batch ID', 'created_at' => 'Date', ]; @endphp @foreach ($batchHeaders as $field => $label) @endforeach @forelse ($batches as $batch) {{-- Expanded Disbursements --}} @if ($expandedBatchId === $batch->id) @endif @empty @endforelse
{{ $label }} @if ($sortField === $field) @if ($sortDirection === 'asc') @else @endif @endif Clinicians Sessions Total Amount
{{ $batch->batch_id }} {{ $batch->created_at->format('m/d/Y H:i') }} {{ $batch->total_clinicians }} {{ $batch->total_sessions }} ${{ number_format($batch->total_amount, 2) }}
@foreach ($batch->disbursements as $disbursement) @endforeach
Disbursement ID Clinician DOS Range Sessions Gross Fee Net
{{ $disbursement->disbursement_id_display }} {{ $disbursement->clinician?->display_name ?? '—' }} ({{ $disbursement->clinician?->clinician_code ?? '—' }}) {{ $disbursement->oldest_dos?->format('m/d/Y') ?? '—' }} – {{ $disbursement->newest_dos?->format('m/d/Y') ?? '—' }} {{ $disbursement->session_count }} ${{ number_format($disbursement->gross_amount, 2) }} ${{ number_format($disbursement->stripe_fee, 2) }} ${{ number_format($disbursement->net_amount, 2) }}
No completed batches found.
@if ($batches->hasPages())

Showing {{ $batches->firstItem() }}–{{ $batches->lastItem() }} of {{ $batches->total() }}

{{ $batches->links() }}
@else

Showing {{ $batches->total() }} batch(es)

@endif
@endif {{-- Individual View --}} @if ($viewMode === 'individual' && $disbursements)
@php $individualHeaders = [ 'disbursement_id_display' => 'Disbursement ID', 'created_at' => 'Date', ]; @endphp @foreach ($individualHeaders as $field => $label) @endforeach @forelse ($disbursements as $disbursement) @empty @endforelse
{{ $label }} @if ($sortField === $field) @if ($sortDirection === 'asc') @else @endif @endif Batch ID Clinician DOS Range Sessions Gross Stripe Fee Net
{{ $disbursement->disbursement_id_display }} {{ $disbursement->created_at->format('m/d/Y H:i') }} {{ $disbursement->batch?->batch_id ?? '—' }}
{{ $disbursement->clinician?->display_name ?? '—' }}
{{ $disbursement->clinician?->clinician_code ?? '—' }}
{{ $disbursement->oldest_dos?->format('m/d/Y') ?? '—' }} – {{ $disbursement->newest_dos?->format('m/d/Y') ?? '—' }} {{ $disbursement->session_count }} ${{ number_format($disbursement->gross_amount, 2) }} ${{ number_format($disbursement->stripe_fee, 2) }} ${{ number_format($disbursement->net_amount, 2) }}
No disbursements found.
@if ($disbursements->hasPages())

Showing {{ $disbursements->firstItem() }}–{{ $disbursements->lastItem() }} of {{ $disbursements->total() }}

{{ $disbursements->links() }}
@else

Showing {{ $disbursements->total() }} disbursement(s)

@endif
@endif