@php $grandTotal = 0; @endphp @foreach($sections as $section) @php $grandTotal += $section['total']; @endphp
@foreach($section['heads'] as $head) @foreach($head['ledgers'] as $ledger) @endforeach @endforeach
{{ $section['main_name'] }}
Account Balance Sub-Total
{{ $head['head_name'] }}
{{ $ledger->ledger_name }} {{ number_format($ledger->balance, 2) }}
{{ $head['head_name'] }} Total {{ number_format($head['subtotal'], 2) }}
Total {{ $section['main_name'] }} {{ number_format($section['total'], 2) }}
@endforeach
GRAND TOTAL {{ number_format($grandTotal, 2) }}