@extends('layouts.main') @section('title', 'View Contribution') @section('breadcrumb') @endsection @section('content')
@csrf

Committee Contribution of {{ $contribution_year }}

@php $contributed_amount = []; @endphp @for($index=0; $index @php $total_amount = 0; @endphp @php $monthCount = 0; @endphp @foreach($months as $month) @php $total_amount += $month ; @endphp @php if(!isset($contributed_amount[$monthCount])) $contributed_amount[$monthCount] = 0; $contributed_amount[$monthCount] += $month; $monthCount++; @endphp @endforeach @endfor @foreach($contributed_amount as $collection) @endforeach
Name Jan, {{ $contribution_year }} Feb, {{ $contribution_year }} Mar, {{ $contribution_year }} Apr, {{ $contribution_year }} May, {{ $contribution_year }} Jun, {{ $contribution_year }} Jul, {{ $contribution_year }} Aug, {{ $contribution_year }} Sep, {{ $contribution_year }} Oct, {{ $contribution_year }} Nov, {{ $contribution_year }} Dec, {{ $contribution_year }} Total
{{ $contributionAmountPerMonth[$index]['name'] }} {{ $month }}
@if($attendanceMonths[$monthCount]>0) @else @endif
{{ $total_amount }}
Total{{ $collection }}{{ array_sum($contributed_amount) }}
@endsection