@foreach($account_types as $account_type => $account_type_detail )
{{$account_type_detail['label']}}
|
@php
$account_ids=[];
@endphp
@foreach($accounts->where('account_primary_type', $account_type)->sortBy('name')->all() as $account)
@php
$total = 0;
$account_ids[]=$account->id;
@endphp
{{$account->name}} |
@foreach($months as $k => $m)
@php
$account_budget = $budget->where('accounting_account_id', $account->id)->first();
$value = !is_null($account_budget) && !is_null($account_budget->$m)
? $account_budget->$m : null;
@endphp
@if(!is_null($value))
{{@num_format($value)}}
@php
$total += $value;
@endphp
@endif
|
@endforeach
{{@num_format($total)}}
|
@endforeach
@lang('sale.total')
|
@foreach($months as $k => $m)
{{@num_format($budget->whereIn('accounting_account_id', $account_ids)->sum($m))}} |
@endforeach
|
@endforeach
@lang('lang_v1.grand_total')
|
@foreach($months as $k => $m)
{{@num_format($budget->sum($m))}} |
@endforeach
|