@can('erp.manage-expenses') New expense @endcan
Expenses listed
{{ number_format($expenses->total()) }}
Awaiting approval
{{ money($pending->amount) }}
{{ number_format($pending->count) }} {{ Str::plural('claim', $pending->count) }} in the queue
Paid this month
{{ money($paidThisMonth->amount) }}
{{ number_format($paidThisMonth->count) }} {{ Str::plural('payment', $paidThisMonth->count) }} settled
@if (request()->hasAny(['q', 'status', 'category'])) Clear @endif
@if ($expenses->isEmpty()) @else
@foreach ($expenses as $expense) @endforeach
Expense Category Department Date Total Status Actions
{{ $expense->expense_no }}
{{ $expense->description }} @if ($expense->payee) · {{ $expense->payee }} @endif
{{ $expense->category?->name ?? '—' }} {{ $expense->department?->name ?? 'Hospital-wide' }} {{ $expense->expense_date->format('d M Y') }} {{ money($expense->total_amount, false) }}
@can('erp.manage-expenses') @if (in_array($expense->status, ['draft', 'pending_approval', 'rejected'], true)) @endif @endcan @can('erp.approve-expenses') @if ($expense->status === 'pending_approval')
@csrf @method('PATCH')
@elseif ($expense->status === 'approved')
@csrf @method('PATCH')
@endif @endcan @can('erp.manage-expenses') @if (in_array($expense->status, ['draft', 'rejected'], true))
@csrf @method('DELETE')
@endif @endcan
@if ($expenses->hasPages())
{{ $expenses->links() }}
@endif @endif