@extends('layouts.app') @section('title', 'Trial Balance') @section('subtitle', 'Debit and credit balances as at a date') @section('content') Income statement Ledgers
Trial balance as at {{ $asOf->format('j F Y') }}
@forelse ($types as $type => $typeLabel) @php($rows = $grouped->get($type, collect())) @continue($rows->isEmpty()) @foreach ($rows as $row) @endforeach @empty @endforelse
Account Type Debit Credit
{{ $typeLabel }}
{{ $row['account']->code }} — {{ $row['account']->name }} {{ $row['account']->typeLabel() }} {{ $row['debit'] > 0 ? money($row['debit']) : '—' }} {{ $row['credit'] > 0 ? money($row['credit']) : '—' }}
Totals {{ money($debitTotal) }} {{ money($creditTotal) }}
@if ($balanced)
Debits equal credits — the ledger is in balance.
@else
Debits and credits differ by {{ money(abs($debitTotal - $creditTotal)) }}. Review recent journal entries.
@endif
@endsection