{{ __('Finance Document Details') }}

← {{ __('Back to list') }}
{{-- Status Message --}} @if (session('status'))

{{ session('status') }}

@endif {{-- Document Details --}}

{{ __('Document Information') }}

{{ __('Title') }}
{{ $document->title }}
{{ __('Status') }}
@if ($document->isRejected()) {{ $document->status_label }} @elseif ($document->isFullyApproved()) {{ $document->status_label }} @else {{ $document->status_label }} @endif
{{ __('Member') }}
@if ($document->member) {{ $document->member->full_name }} @else {{ __('Not linked to a member') }} @endif
{{ __('Amount') }}
@if (!is_null($document->amount)) ${{ number_format($document->amount, 2) }} @else {{ __('N/A') }} @endif
{{ __('Submitted by') }}
{{ $document->submittedBy?->name ?? __('N/A') }}
{{ __('Submitted at') }}
{{ $document->submitted_at?->format('Y-m-d H:i:s') ?? __('N/A') }}
@if ($document->attachment_path)
{{ __('Attachment') }}
{{ __('Download Attachment') }}
@endif @if ($document->description)
{{ __('Description') }}
{{ $document->description }}
@endif
{{-- Approval Timeline --}}

{{ __('Approval Timeline') }}

    {{-- Cashier Approval --}}
  • @if ($document->cashier_approved_at) @else @endif

    {{ __('Cashier Approval') }} @if ($document->cashier_approved_at) {{ $document->approvedByCashier?->name }} @endif

    @if ($document->cashier_approved_at) {{ $document->cashier_approved_at->format('Y-m-d H:i') }} @else {{ __('Pending') }} @endif
  • {{-- Accountant Approval --}}
  • @if ($document->accountant_approved_at) @else @endif

    {{ __('Accountant Approval') }} @if ($document->accountant_approved_at) {{ $document->approvedByAccountant?->name }} @endif

    @if ($document->accountant_approved_at) {{ $document->accountant_approved_at->format('Y-m-d H:i') }} @else {{ __('Pending') }} @endif
  • {{-- Chair Approval --}}
  • @if ($document->chair_approved_at) @else @endif

    {{ __('Chair Approval') }} @if ($document->chair_approved_at) {{ $document->approvedByChair?->name }} @endif

    @if ($document->chair_approved_at) {{ $document->chair_approved_at->format('Y-m-d H:i') }} @else {{ __('Pending') }} @endif
  • {{-- Rejection Info --}} @if ($document->isRejected())
  • {{ __('Rejected by') }} {{ $document->rejectedBy?->name }}

    @if ($document->rejection_reason)

    {{ __('Reason:') }} {{ $document->rejection_reason }}

    @endif
    {{ $document->rejected_at?->format('Y-m-d H:i') }}
  • @endif
{{-- Approval Actions --}} @if (!$document->isRejected() && !$document->isFullyApproved())

{{ __('Actions') }}

{{-- Approve Button --}} @php $canApprove = false; if (auth()->user()->hasRole('cashier') && $document->canBeApprovedByCashier()) { $canApprove = true; } elseif (auth()->user()->hasRole('accountant') && $document->canBeApprovedByAccountant()) { $canApprove = true; } elseif (auth()->user()->hasRole('chair') && $document->canBeApprovedByChair()) { $canApprove = true; } @endphp @if ($canApprove)
@csrf
@endif {{-- Reject Button (show for cashier, accountant, chair) --}} @if (auth()->user()->hasRole('cashier') || auth()->user()->hasRole('accountant') || auth()->user()->hasRole('chair')) @endif
@endif
{{-- Rejection Modal --}}