@extends('layouts.admin') @section('title', 'Petty Cash') @section('page-title', 'Petty Cash Management') @section('breadcrumbs') Petty Cash @endsection @section('content')
{{ session('success') }}
{{ session('error') }}
Total Petty Cash
{{ number_format($totalPettyCash ?? 0, 2) }}
Total Disbursed
{{ number_format($totalDisbursed ?? 0, 2) }}
Balance
{{ number_format($balance ?? 0, 2) }}
| # | Date | Transaction # | Description | Given To | Type | Amount | Status | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} | {{ $transaction->transaction_date->format('M d, Y') }} | {{ $transaction->transaction_number }} |
{{ $transaction->description }}
@if($transaction->notes)
{{ Str::limit($transaction->notes, 50) }}
@endif
@if($transaction->returnedFrom)
Return for: {{ $transaction->returnedFrom->transaction_number }}
@endif
|
{{ $transaction->given_to ?? '-' }} | @php $typeConfig = [ 'disbursement' => ['label' => 'Disbursement', 'class' => 'bg-red-50 text-red-700 border-red-100'], 'return' => ['label' => 'Return', 'class' => 'bg-green-50 text-green-700 border-green-100'], 'top_up' => ['label' => 'Top Up', 'class' => 'bg-blue-50 text-blue-700 border-blue-100'], ]; $config = $typeConfig[$transaction->type] ?? $typeConfig['disbursement']; @endphp {{ $config['label'] }} | {{ number_format($transaction->amount, 2) }} | @php $statusConfig = [ 'pending' => ['label' => 'Pending', 'class' => 'bg-yellow-50 text-yellow-700 border-yellow-100'], 'approved' => ['label' => 'Approved', 'class' => 'bg-green-50 text-green-700 border-green-100'], 'returned' => ['label' => 'Returned', 'class' => 'bg-blue-50 text-blue-700 border-blue-100'], 'cancelled' => ['label' => 'Cancelled', 'class' => 'bg-gray-50 text-gray-700 border-gray-100'], ]; $statusConf = $statusConfig[$transaction->status] ?? $statusConfig['pending']; @endphp {{ $statusConf['label'] }} |
|
|
payments
No petty cash transactions found |
||||||||