@extends('layout')@section('c')

Balance sheet

As of

Assets

@foreach(($accounts['asset'] ?? []) as $a)@php $n=$bal[$a->id]['net'] ?? 0; @endphp @if($n!=0)@endif @endforeach
CodeAccountBalance
{{ $a->code }}{{ $a->name }}{{ number_format($n,2) }}
Total assets{{ number_format($assets,2) }}

Liabilities & equity

@foreach(($accounts['liability'] ?? []) as $a)@php $n=-($bal[$a->id]['net'] ?? 0); @endphp @if($n!=0)@endif @endforeach @foreach(($accounts['equity'] ?? []) as $a)@php $n=-($bal[$a->id]['net'] ?? 0); @endphp @if($n!=0)@endif @endforeach
CodeAccountBalance
{{ $a->code }}{{ $a->name }}{{ number_format($n,2) }}
Total liabilities{{ number_format($liab,2) }}
{{ $a->code }}{{ $a->name }}{{ number_format($n,2) }}
Retained earnings (net income to date){{ number_format($incomeNet,2) }}
Total liabilities & equity{{ number_format($liab+$eq+$incomeNet,2) }}
@php $diff = round($assets - ($liab+$eq+$incomeNet), 2); @endphp @if($diff != 0)

Assets don't equal liabilities + equity by {{ number_format($diff,2) }}. This usually means some historical income/expenses were recorded before the ledger existed and haven't been brought in with an opening-balance journal entry yet — post one from Journal entries if needed.

@else

Balances ✔

@endif @endsection