@extends('layouts.app')
@section('content')
| Date |
@foreach($deductionTypes as $type)
{{ strtoupper($type) }} |
@endforeach
@php
$columnTotals = array_fill_keys($deductionTypes, 0);
@endphp
@foreach($formattedData as $year => $months)
|
{{ $year }}
|
@foreach($months as $month => $deductions)
| {{ $month }} |
@foreach($deductionTypes as $type)
@php
$amount = $deductions[$type] ?? 0;
$columnTotals[$type] += $amount;
@endphp
{{ number_format($amount, 2) }} |
@endforeach
@endforeach
@endforeach
| TOTAL |
@foreach($deductionTypes as $type)
TZS {{ number_format($columnTotals[$type], 2) }} |
@endforeach
@push('styles')
@endpush
@endsection