{{ config('app.name') }}
Balance Sheet
As of {{ $asOfDate->format('F d, Y') }}
Current Assets
@php $totalCurrentAssets = 0; @endphp
@foreach($assets->where('subtype', 'current') as $account)
@php
$balance = $accountBalances[$account->id] ?? 0;
$totalCurrentAssets += $balance;
@endphp
| {{ $account->name }} |
{{ formatMoney($balance) }} |
@endforeach
| Total Current Assets |
{{ formatMoney($totalCurrentAssets) }} |
Non-Current Assets
@php $totalNonCurrentAssets = 0; @endphp
@foreach($assets->where('subtype', '!=', 'current') as $account)
@php
$balance = $accountBalances[$account->id] ?? 0;
$totalNonCurrentAssets += $balance;
@endphp
| {{ $account->name }} |
{{ formatMoney($balance) }} |
@endforeach
@foreach($assets->whereNull('subtype') as $account)
@php
$balance = $accountBalances[$account->id] ?? 0;
$totalNonCurrentAssets += $balance;
@endphp
| {{ $account->name }} |
{{ formatMoney($balance) }} |
@endforeach
| Total Non-Current Assets |
{{ formatMoney($totalNonCurrentAssets) }} |
TOTAL ASSETS
{{ formatMoney($totalCurrentAssets + $totalNonCurrentAssets) }}
Current Liabilities
@php $totalCurrentLiabilities = 0; @endphp
@foreach($liabilities->where('subtype', 'current') as $account)
@php
$balance = $accountBalances[$account->id] ?? 0;
$totalCurrentLiabilities += $balance;
@endphp
| {{ $account->name }} |
{{ formatMoney($balance) }} |
@endforeach
| Total Current Liabilities |
{{ formatMoney($totalCurrentLiabilities) }} |
Non-Current Liabilities
@php $totalNonCurrentLiabilities = 0; @endphp
@foreach($liabilities->filter(function($account) {
return $account->subtype != 'current' || $account->subtype === null;
}) as $account)
@php
$balance = $accountBalances[$account->id] ?? 0;
$totalNonCurrentLiabilities += $balance;
@endphp
| {{ $account->name }} |
{{ formatMoney($balance) }} |
@endforeach
| Total Non-Current Liabilities |
{{ formatMoney($totalNonCurrentLiabilities) }} |
Equity
@php $totalEquity = 0; @endphp
@foreach($equity as $account)
@php
$balance = $accountBalances[$account->id] ?? 0;
$totalEquity += $balance;
@endphp
| {{ $account->name }} |
{{ formatMoney($balance) }} |
@endforeach
| Net Income |
{{ formatMoney($netIncome) }} |
@php $totalEquity += $netIncome; @endphp
| Total Equity |
{{ formatMoney($totalEquity) }} |
TOTAL LIABILITIES AND EQUITY
{{ formatMoney($totalCurrentLiabilities + $totalNonCurrentLiabilities + $totalEquity) }}
@php
$totalAssets = $totalCurrentAssets + $totalNonCurrentAssets;
$totalLiabilitiesEquity = $totalCurrentLiabilities + $totalNonCurrentLiabilities + $totalEquity;
$difference = abs($totalAssets - $totalLiabilitiesEquity);
$balanced = $difference < 0.01;
@endphp
{{ $balanced ? 'Balance Sheet Balanced' : 'Balance Sheet Not Balanced' }}
@if(!$balanced)
Difference: {{ formatMoney($difference) }}
@endif