{{-- ========= INCOME ========= --}} @foreach($income['heads'] as $head) @foreach($head['ledgers'] as $ledger) @endforeach @endforeach
Income / Revenue
Account Amount Sub-Total
{{ $head['head_name'] }}
{{ $ledger->ledger_name }} {{ number_format($ledger->amount, 2) }}
{{ $head['head_name'] }} Total {{ number_format($head['subtotal'], 2) }}
Total Income {{ number_format($income['total'], 2) }}
{{-- ========= EXPENSES ========= --}} @foreach($expense['heads'] as $head) @foreach($head['ledgers'] as $ledger) @endforeach @endforeach
Expenses
Account Amount Sub-Total
{{ $head['head_name'] }}
{{ $ledger->ledger_name }} {{ number_format($ledger->amount, 2) }}
{{ $head['head_name'] }} Total {{ number_format($head['subtotal'], 2) }}
Total Expenses {{ number_format($expense['total'], 2) }}
{{-- ========= NET PROFIT / LOSS ========= --}}
{{ $netProfit >= 0 ? 'Net Profit' : 'Net Loss' }} (Income {{ $netProfit >= 0 ? '−' : '+' }} Expenses) {{ number_format(abs($netProfit), 2) }}