@extends('admin.admin_dashboard') @section('admin') <<<<<<< HEAD
@if (Auth::user()->can('hc_dash.view')) {{-- KPI Cards --}} {{-- Revenue --}}
{{-- UGX prefix instead of dollar icon --}}
Revenue (this month)

{{ number_format($revenue) }}

View Sales →
{{-- Expenses --}}
Expenses (this month)

{{ number_format($expenses) }}

View Expenses →
{{-- Net Profit --}}
Net Profit (this month)

{{ number_format($profit) }}

P&L Report →
{{-- Cash Balance --}}
Total Assets

{{ number_format($cash) }}

View Report →
Cash at Hand

{{ number_format($cashAtHand) }}

View Report →
Cash at Bank

{{ number_format($cashAtBank) }}

View Report →
@endif @if (Auth::user()->can('active_sponsorship.view'))

All Active Sponsorships

{{ $activeSponsorships }}

@endif @if (Auth::user()->can('active_sponsorship_usa.view'))

Active Sponsorships

{{ $usaSponsored }}

@endif @if (Auth::user()->can('active_sponsorship_ger.view'))

Active Sponsorships

{{ $germanSponsored }}

@endif @if (Auth::user()->can('active_sponsorship_ug.view'))

Active Sponsorships

{{ $ugandaSponsored }}

@endif @if (Auth::user()->can('awaiting_sponsorship.view'))

Awaiting Sponsorship

{{ $pendingSponsorships }}

@endif @if (Auth::user()->can('children_received_coffee.view'))

Received Coffee

{{ $coffeeYesCount }}

View List →
@endif @if (Auth::user()->can('children_not_received_coffee.view'))

Not Received Coffee

{{ $coffeeNoCount }}

View List →
@endif @if (Auth::user()->can('success_rate.view'))

Sponsorship Rate

34.6%

@endif @if (Auth::user()->can('graduated.view'))

Graduated

{{ $graduated }}

@endif @if (Auth::user()->can('active_farmers.view'))

Active Farmers

4,541
@endif @if (Auth::user()->can('groups_dash.view'))

Groups

61
@endif @if (Auth::user()->can('female_farmers_dash.view'))

Female Farmers

1,770
@endif @if (Auth::user()->can('male_farmers_dash.view'))

Male Farmers

2,771
@endif

@if (Auth::user()->can('farmers_age_gender.view'))
📊 Farmers by Age Group & Gender
@endif @if (Auth::user()->can('farmers_group.view'))
👥 Farmers by Group
@endif
@if (Auth::user()->can('hc_dash.view'))
Monthly Revenue vs. Expenses
Expense Breakdown by Category
Invoice Status Overview
Revenue & Quantity by Farmer
{{-- add Bootstrap padding utility “ps-4” for extra left space --}}
@endif @if (Auth::user()->can('hc_dash.view'))
{{-- Top 5 Overdue AR --}}
Top 5 Overdue AR
@forelse($topAr as $r) @empty @endforelse
Ref Customer Balance Due Date
{{ $r->ref }} {{ $r->party }} {{ number_format($r->balance,2) }} {{ $r->due }}
No overdue receivables.
{{-- Top 5 Overdue AP --}}
Top 5 Overdue AP
@forelse($topAp as $r) @empty @endforelse
Ref Vendor Balance Due Date
{{ $r->ref }} {{ $r->party }} {{ number_format($r->balance,2) }} {{ $r->due }}
No overdue payables.
@endif
@if (Auth::user()->can('sponsorship_per_cluster.view'))
Child and Family Sponsorship Per Cluster
@endif @if (Auth::user()->can('sponsorship_per_cluster_ger.view'))
Child and Family Sponsorship Per Cluster
@endif @if (Auth::user()->can('sponsorship_per_cluster_usa.view'))
Child and Family Sponsorship Per Cluster
@endif @if (Auth::user()->can('country_specifics.view'))
Country Specifics
    @foreach($countries as $index => $country) @if($country == 'Germany')
  • {{ $country }} {{ $childCounts[$index] }}
  • @else
  • {{ $country }} {{ $childCounts[$index] }}
  • @endif @endforeach
@endif @if (Auth::user()->can('children_sponsorship_trend.view'))
📊 Child and Family Sponsorship Trends
@endif @if (Auth::user()->can('children_graduation_trend.view'))
📊 Child and Family Graduation Trends
@endif
@if (Auth::user()->can('recent_sponsorships.view'))
Recent Sponsorships
@foreach ($sponsorship as $index => $item) @endforeach
S/N Photo Child Number Name Sponsor Start Date Graduation Date
{{ $index + 1 }} Child Photo {{ $item['child_number'] }} {{ $item['child_name'] }} {{ $item['sponsor_name'] }} {{ $item['start_date'] }} {{ $item['graduation_date'] }}
@endif
@if (Auth::user()->can('recent_sponsorshipsGer.view'))
Recent Sponsorships
@foreach ($sponsorshipGer as $index => $item) @endforeach
S/N Photo Child Number Name Sponsor Start Date Graduation Date
{{ $index + 1 }} Child Photo {{ $item['child_number'] }} {{ $item['child_name'] }} {{ $item['sponsor_name'] }} {{ $item['start_date'] }} {{ $item['graduation_date'] }}
@endif
@if (Auth::user()->can('recent_sponsorshipsUS.view'))
Recent Sponsorships
@foreach ($sponsorshipUS as $index => $item) @endforeach
S/N Photo Child Number Name Sponsor Start Date Graduation Date
{{ $index + 1 }} Child Photo {{ $item['child_number'] }} {{ $item['child_name'] }} {{ $item['sponsor_name'] }} {{ $item['start_date'] }} {{ $item['graduation_date'] }}
@endif
@if (Auth::user()->can('pending_payment_vouchers.view'))
Recent Payment Vouchers
@foreach($paymentVouchers as $index => $voucher) @endforeach
S/N Date Farmer Photo Voucher ID Farmer Name Amount Action
{{ $index + 1 }} {{ \Carbon\Carbon::parse($voucher->date_saved)->format('F j, Y') }} Farmer Photo {{ $voucher->id }} {{ $voucher->farmer_fname }} {{ $voucher->farmer_lname }} {{number_format($voucher->net_pay, 0) }} @if (Auth::user()->can('payment_voucher_pending_payment.view') && $voucher->voucher_status == 3) Make Payment @endif
@endif
@if (Auth::user()->can('farmers_registration_trend.view'))
📊 Farmers Registration Trends
@endif @if (Auth::user()->can('farmers_group.view'))
📊 Farmers Per Group
@endif
@if (Auth::user()->can('farmers_district.view'))
🗺️ Farmers Location
@endif
@push('scripts') @endpush @push('scripts') {{-- 1) include Chart.js if you haven’t already --}} @endpush @push('scripts') @endpush @push('scripts') @endpush
@endsection ======= @include('admin.dashboard.partials.styles')
@include('admin.dashboard.partials.header') @include('admin.dashboard.partials.quick-actions') @include('admin.dashboard.partials.kpis') @include('admin.dashboard.partials.recent-activity') @include('admin.dashboard.partials.charts')
@include('admin.dashboard.partials.scripts') @push('scripts') @endpush @endsection >>>>>>> origin/main