Balance Sheet Report

Date: {{ \Carbon\Carbon::now()->format('d-m-Y') }}

Period: {{ \Carbon\Carbon::parse($dateFrom)->format('d-m-Y') }} to {{ \Carbon\Carbon::parse($dateTo)->format('d-m-Y') }}

@if (empty($groupedData) || $groupedData->isEmpty())

No balance sheet data available for the selected period.

@else @php $grandTotal = 0; // Initialize grand total variable @endphp @foreach ($groupedData as $accountTypeName => $subTypes) @php $accountTypeTotal = 0; // Initialize account type total for each type @endphp @foreach ($subTypes as $subTypeName => $accounts) @foreach ($accounts as $account) @php $accountTypeTotal += $account->balance; // Add to account type total $grandTotal += $account->balance; // Add to grand total @endphp @endforeach @endforeach @endforeach
Account Account Code Balance
{{ number_format($account->balance, 2) }}
Total for {{ $accountTypeName }}: {{ number_format($accountTypeTotal, 2) }}
Grand Total: {{ number_format($grandTotal, 2) }}
@endif