@extends('layouts.app') @section('title', 'Financial Approvals') @section('content')

Financial Approvals @if($pendingCount > 0) {{ $pendingCount }} Pending @endif

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if(count($pending) === 0)
All Clear!

No pending financial entries require approval.

@else
@foreach($pending as $item) @endforeach
Type Reference Date Amount Narration Created By Submitted Actions
@php $typeColors = [ 'journal_entry' => 'primary', 'payment' => 'success', 'purchase_payment' => 'info', 'contractor_payment' => 'warning', ]; @endphp {{ $item['type_label'] }} {{ $item['reference'] ?? '#' . $item['id'] }} {{ $item['date'] ? \Carbon\Carbon::parse($item['date'])->format('d M Y') : '—' }} ৳{{ number_format($item['amount'], 2) }} {{ Str::limit($item['narration'], 40) }} {{ $item['created_by'] }} {{ $item['created_at'] ? \Carbon\Carbon::parse($item['created_at'])->diffForHumans() : '—' }}
@csrf
@endif @endsection @push('scripts') @endpush