@extends('layouts.app') @section('customcss') @endsection @section('content')

Pending Approvals

Review and approve pending transactions

Back to Funds
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($pendingTransactions->count() > 0)
Pending Transactions {{ $pendingTransactions->count() }}
Showing {{ $pendingTransactions->count() }} transactions
@foreach($pendingTransactions as $transaction) @php $daysPending = (int) round($transaction->created_at->diffInDays(now())); @endphp @endforeach
Date Fund Type Description Amount Created By Days Pending Actions
{{ $transaction->transaction_date->format('M d, Y') }} @if($transaction->receipt_image) @endif {{ $transaction->fund->name }}
Balance: UGX {{ number_format($transaction->fund->current_balance, 2) }}
@if($transaction->type === 'expense') Expense @else Replenishment @endif {{ $transaction->description }} @if($transaction->expenseItem)
{{ $transaction->expenseItem->name }} @endif @if($transaction->supplier)
{{ $transaction->supplier->name }} @endif @if($transaction->notes)
{{ Str::limit($transaction->notes, 50) }} @endif
UGX {{ number_format($transaction->amount, 2) }} @if($transaction->type === 'expense' && $transaction->amount > $transaction->fund->current_balance)
Insufficient balance @endif
{{ $transaction->creator->name }} @if($daysPending > 7) {{ $daysPending }} days @elseif($daysPending > 3) {{ $daysPending }} days @else {{ $daysPending }} days @endif
@csrf @method('PATCH')
@else

No Pending Approvals

All transactions have been processed. Great job!

Back to Funds
@endif
@endsection @section('customjs') @endsection