@extends('backEnd.layouts.master') @section('title', 'Fund Management') @section('content')

💰 Fund Management

View Edit/Delete Logs & Reports
{{-- Top summary cards --}}
{{-- Total Balance --}}
Available Balance

{{ number_format($balance, 2) }} ā§ŗ

In – Out āĻāϰ āĻĒāĻžāĻ°ā§āĻĨāĻ•ā§āϝ
{{-- This Year --}}
This Year ({{ $currentYear }})

{{ number_format($yearlyAdded, 2) }} ā§ŗ

āĻāχ āĻŦāĻ›āϰ⧇ āĻŽā§‹āϟ āĻĢāĻžāĻ¨ā§āĻĄ āϝ⧋āĻ— āĻšāϝāĻŧ⧇āϛ⧇
{{-- This Month --}}
This Month ({{ \Carbon\Carbon::create()->month($currentMonth)->format('F') }})

{{ number_format($monthlyAdded, 2) }} ā§ŗ

āĻāχ āĻŽāĻžāϏ⧇ āĻŽā§‹āϟ āĻĢāĻžāĻ¨ā§āĻĄ āϝ⧋āĻ— āĻšāϝāĻŧ⧇āϛ⧇
{{-- Add / Withdraw + Export --}}
{{-- Add Fund --}}
➕ Add Fund
@csrf
@error('amount') {{ $message }} @enderror
{{-- Withdraw --}}
➖ Withdraw
@csrf
{{-- Export Report --}}
📤 Export Report
{{-- Year field --}}
{{-- Month field --}}
{{-- Custom date range --}}
{{-- Fund History --}}
🧾 Fund History
View Logs / Reports āϏāĻ°ā§āĻŦāĻļ⧇āώ āĻŸā§āϰāĻžāĻ¨ā§āĻ¸ā§āϝāĻžāĻ•āĻļāύ āϞāĻŋāĻ¸ā§āϟ
@php // Check if current user is Admin (Super Admin or has Admin role) $isAdmin = false; $user = Auth::guard('admin')->user(); if ($user) { if ($user->id == 1) { $isAdmin = true; } else { $spatieRoles = $user->getRoleNames()->map(function($role) { return strtolower($role); })->toArray(); $isAdmin = in_array('admin', $spatieRoles); } } @endphp @if($isAdmin) @endif @forelse($transactions as $t) @if($isAdmin) @endif @empty @endforelse
# Type Source Amount Note Date & TimeActions
{{ $t->id }} @if($t->direction == 'in') IN (+) @else OUT (-) @endif {{ $t->source ?? '-' }} @if($t->hasBeenEdited()) Edited @endif {{ number_format($t->amount, 2) }} ā§ŗ {{ $t->note ?? '-' }} @if($t->updated_by)
Last updated: {{ $t->updated_at ? $t->updated_at->format('d M Y, h:i A') : 'N/A' }} @endif
{{ $t->created_at->format('d M Y, h:i A') }}
@csrf @method('DELETE')
No fund transactions found.
{{-- Pagination --}}
{{ $transactions->links('pagination::bootstrap-4') }}
@endsection @section('script') @endsection