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

Petty Cash Management

Manage petty cash funds and transactions

@can('create-petty-cash-fund') Create New Fund @endcan @can('approve-transaction') Pending Approvals {{ \App\Models\PettyCashTransaction::pending()->count() }} @endcan Reports @can('reconcile-petty-cash')
@endcan
@if(session('success'))
{{ session('success') }}
@endif @if(session('adjusted_funds'))
Reconciliation Results
    @foreach(session('adjusted_funds') as $adjusted)
  • {{ $adjusted['name'] }}: UGX {{ number_format($adjusted['old_balance'], 2) }} → UGX {{ number_format($adjusted['new_balance'], 2) }} ({{ $adjusted['adjustment'] > 0 ? '+' : '' }}{{ number_format($adjusted['adjustment'], 2) }})
  • @endforeach
@endif @if(session('skipped_funds'))
Skipped Funds
    @foreach(session('skipped_funds') as $skipped)
  • {{ $skipped['name'] }}: {{ $skipped['reason'] }}
  • @endforeach
@endif
@forelse($funds as $fund) @php $stats = $fund->daily_stats; @endphp
{{-- Card Header --}}
{{ $fund->name }}
@if($fund->needsReconciliation()) @endif
{{ $fund->custodian->name }}
@if($fund->description)

{{ Str::limit($fund->description, 80) }}

@endif {{-- ── Daily Movement Summary ── --}}
Today's Summary — {{ now()->format('d M Y') }} @if($stats['today_count'] > 0) {{ $stats['today_count'] }} txn{{ $stats['today_count'] != 1 ? 's' : '' }} @endif
Prev. Closing Balance UGX {{ number_format($stats['prev_closing_balance'], 2) }}
Today's Replenishments @if($stats['today_replenishments'] > 0) + UGX {{ number_format($stats['today_replenishments'], 2) }} @else @endif
Today's Releases @if($stats['today_expenses'] > 0) − UGX {{ number_format($stats['today_expenses'], 2) }} @else @endif
Current Balance UGX {{ number_format($stats['current_balance'], 2) }}
{{-- Balance progress bar --}} @if($fund->initial_amount > 0) @php $pct = min(($stats['current_balance'] / $fund->initial_amount) * 100, 100); $barClass = $stats['current_balance'] < 1000 ? 'bg-danger' : ($pct < 30 ? 'bg-warning' : 'bg-success'); @endphp
{{ number_format($pct, 0) }}% of UGX {{ number_format($fund->initial_amount, 0) }} initial fund
@endif
{{-- Transaction status badges --}}
{{ $fund->pending_count }} pending {{ $fund->approved_count }} approved {{ number_format($fund->utilization_percentage, 0) }}% utilised
{{-- Action buttons --}}
Add View @can('reconcile-petty-cash') Reconcile @endcan
@if($fund->needsReconciliation())
@csrf
@endif
@empty

No Petty Cash Funds Found

Get started by creating your first petty cash fund to manage expenses.

@can('create-petty-cash-fund') Create Your First Fund @endcan
@endforelse
@endsection