@extends('components.app-layout') @section('title', 'Transaction Details') @section('subtitle', 'View transaction information') @section('content')

Transaction Details

{{ $transaction->reference_number }}

@if($transaction->status === 'pending')
@csrf
@csrf
@endif Back to Transactions

{{ $transaction->title }}

{{ ucfirst($transaction->type) }} Transaction

{{ $transaction->type === 'income' ? '+' : '-' }}₵{{ number_format($transaction->amount, 2) }}

{!! $transaction->status_badge !!}

Transaction Information

Category

{{ $transaction->category->name }}

Transaction Date

{{ $transaction->transaction_date->format('F j, Y') }}

Payment Method

{{ ucwords(str_replace('_', ' ', $transaction->payment_method)) }}

@if($transaction->receipt_number)

Receipt Number

{{ $transaction->receipt_number }}

@endif
@if($transaction->description)

Description

{{ $transaction->description }}

@endif

System Information

Recorded By

{{ $transaction->user->name }}

Created At

{{ $transaction->created_at->format('F j, Y g:i A') }}

@if($transaction->approved_by)

Approved By

{{ $transaction->approver->name }}

Approved At

{{ $transaction->approved_at->format('F j, Y g:i A') }}

@endif
@if($transaction->notes)

Notes

{{ $transaction->notes }}

@endif @if($transaction->metadata)

Additional Information

{{ json_encode($transaction->metadata, JSON_PRETTY_PRINT) }}
@endif
@if($transaction->status !== 'pending')

Transaction History

Transaction Created

{{ $transaction->created_at->format('F j, Y g:i A') }} by {{ $transaction->user->name }}

@if($transaction->approved_at)

Transaction {{ ucfirst($transaction->status) }}

{{ $transaction->approved_at->format('F j, Y g:i A') }} by {{ $transaction->approver->name }}

@endif
@endif
@endsection