@php
$total_balance_debit = 0;
$total_balance_credit = 0;
@endphp
@foreach ($accounts as $item)
{{$item->main_acc_name }}
@php
$total_debit = 0;
$total_credit = 0;
@endphp
@foreach ($item->sub_accounts as $item_acc)
|
{{ $item_acc->name }}
|
@php
$total_debit += $item_acc->entry_items->sum('debit_local');
@endphp
{{ $item_acc->entry_items->sum('debit_local') }}
|
@php
$total_credit += $item_acc->entry_items->sum('credit_local');
@endphp
{{ $item_acc->entry_items->sum('credit_local') }}
|
@endforeach
@endforeach