@php
$totalLabarugi = [];
foreach($dateRanges as $dr){
if(count($totalLabarugi) == 0){
$totalLabarugi = [$dr["month_key"] => 0];
}else{
$totalLabarugi[$dr["month_key"]] = 0;
}
}
@endphp
@foreach($datas as $data)
@foreach($data as $key => $dat)
| {{ $key }} |
|
|
@foreach($dateRanges as $date)
|
@endforeach
@php
$totalIni = [];
foreach($dateRanges as $dr){
if(count($totalLabarugi) == 0){
$totalIni = [$dr["month_key"] => 0];
}else{
$totalIni[$dr["month_key"]] = 0;
}
}
@endphp
@foreach($dat as $da)
| {{ $da->account_number }} |
{{ $da->account_name }} |
@foreach($dateRanges as $date)
@php
$totalLabarugi[$date["month_key"]] += $da->balances->{$date["month_key"]};
$totalIni[$date["month_key"]] += $da->balances->{$date["month_key"]};
@endphp
{{ $da->balances->{$date["month_key"]} }} |
@endforeach
@endforeach
| Total {{ $key }} |
|
@foreach($dateRanges as $date)
{{ $totalIni[$date["month_key"]] }} |
@endforeach
@endforeach
@endforeach
| {{ "Total Laba Rugi" }} |
|
@foreach($dateRanges as $dr)
{{ $totalLabarugi[$dr["month_key"]] }} |
@endforeach