Trial Balance

Account Totals Verification

@php $totalDebit = 0; $totalCredit = 0; @endphp @foreach($balances as $balance) @php $totalDebit += $balance->total_debit; $totalCredit += $balance->total_credit; @endphp @endforeach
Account Code Account Name Debit Balance Credit Balance
{{ $balance->code }} {{ $balance->name }} ${{ number_format($balance->total_debit, 2) }} ${{ number_format($balance->total_credit, 2) }}
Total Balance ${{ number_format($totalDebit, 2) }} ${{ number_format($totalCredit, 2) }}
@if(abs($totalDebit - $totalCredit) < 0.01)
The ledger is in balance.
@else
Warning: The ledger is out of balance by ${{ number_format(abs($totalDebit - $totalCredit), 2) }}.
@endif