@extends('layouts.app') @section('content')

contribution Details for Check Number: {{ $checkNumber }} [ {{ $firstName }} {{ $middleName }} {{ $lastName }} ]

@foreach($deductionTypes as $type) @endforeach @php $columnTotals = array_fill_keys($deductionTypes, 0); // Initialize totals array @endphp @foreach($formattedData as $year => $months) @foreach($months as $month => $deductions) @foreach($deductionTypes as $type) @php $amount = $deductions[$type] ?? 0; $columnTotals[$type] += $amount; @endphp @endforeach @endforeach @endforeach @foreach($deductionTypes as $type) @endforeach
DATE{{ $type }}
{{ $year }}
{{ $month }}{{ number_format($amount, 2) }}
Total{{ number_format($columnTotals[$type], 2) }}
@endsection