@php use App\Models\TreasuryOutboundObligation; use App\Support\Treasury\Outbound\TreasuryOutboundPayoutStatusService; $payoutStatus = app(TreasuryOutboundPayoutStatusService::class); $activeView = $view ?? 'queue'; $canBatchRelease = auth()->user()?->hasLoanPermission('disbursements.batch_release'); $dispatchableOnPage = collect($rows->items())->filter( fn ($row) => $row instanceof TreasuryOutboundObligation && $payoutStatus->isDispatchable($row) )->count(); $phoneColspan = ($canPhoneVerify ?? false) ? 2 : 0; @endphp @if ($activeView === 'phone_verification') @include('loan.treasury.outbound.partials.phone_verification_workspace') @else
Accounting already verified these payments. Select rows to Batch release (OTP + Secret PIN gate, same as Finance Release), or Reverse / Reject individually.
@if ($dispatchBlocked ?? false)
{{ $dispatchReadiness['message'] ?? 'Dispatch blocked until Secret PIN / custodian is configured.' }}
@elseif (($dispatchPinRequired ?? false) && ($pinHolderName ?? null) && ! ($viewerIsPinHolder ?? false))
Batch release Secret PIN must be entered by custodian PIN actor: {{ $pinHolderName }}.
@endif @if ($canBatchRelease) @endif
@if ($canPhoneVerify ?? false) @endif @forelse ($rows as $row) @php $open = $payoutStatus->isDispatchable($row); $isMpesa = $row->isMpesaPayout(); $rowStatus = $payoutStatus->forObligation($row); $approvalAt = $row->approved_at ?? $row->created_at; @endphp @if ($canPhoneVerify ?? false) @include('loan.treasury.outbound.partials.phone_verification_queue_cells', [ 'obligation' => $row, 'open' => $open, 'canPhoneVerify' => $canPhoneVerify, ]) @else @endif @empty @endforelse
# Payout status Client Mobile
Amount @if ($canBatchRelease) @endif
Source Approval date Method ApprovalsSafaricom name Verification
{{ ($rows->firstItem() ?? 1) + $loop->index }} @include('loan.treasury.outbound.partials.payout_status_badge', ['status' => $rowStatus]) {{ $row->beneficiary_name ?? '—' }} @if ($open && $canBatchRelease)
@csrf
@else {{ $row->beneficiary_phone ?: '—' }} @endif
{{ $row->currency }} {{ number_format((float) $row->amount, 2) }} @if ($open && $canBatchRelease) @endif
@php $sourceLabel = $sourceLabels[$row->source_type] ?? $row->source_type; $sourceFilterHref = \App\Support\Navigation\WorkspaceEmbed::routeUrl('loan.treasury.outbound.index', [ 'view' => 'queue', 'source' => $row->source_type, ]) ?? route('loan.treasury.outbound.index', ['view' => 'queue', 'source' => $row->source_type]); @endphp {{ $sourceLabel }} {{ $approvalAt ? $approvalAt->format('Y-m-d H:i') : '—' }} {{ str_replace('_', ' ', (string) ($row->payment_method ?? '—')) }}
    @if ($row->approvedByUser)
  • Accounting: {{ $row->approvedByUser->name }}
  • @elseif ($row->createdByUser)
  • Sent: {{ $row->createdByUser->name }}
  • @else
  • —
  • @endif
{{ $row->obligation_reference }}
No outbound payment obligations.
@if ($canBatchRelease)

0 selected · KES 0.00

@endif @if ($rows->hasPages())
@endif
@endif