@include('modules.reports.partials.pdf-company-details')

Trial Balance Report

Date: {{ date('F j, Y') }}

Currency: {{ $currnames }}

From: {{ $pfrom }} To: {{ $pto }}

@php $tbRows = $trial['rows'] ?? []; $totalDebit = $trial['totalDebit'] ?? 0; $totalCredit = $trial['totalCredit'] ?? 0; $variance = $trial['variance'] ?? ($totalDebit - $totalCredit); $balanced = $trial['isBalanced'] ?? (abs($variance) < 0.01); $source = $trial['source'] ?? null; @endphp
Balance Check Debit Credit
{{ $balanced ? 'Balanced' : 'Out of balance' }} {{ number_format($totalDebit, 2) }} {{ number_format($totalCredit, 2) }}
Variance (Dr - Cr) {{ number_format($variance, 2) }}
@forelse($tbRows as $account) @empty @endforelse
Account Code Account Name Debit Credit Balance
{{ $account['code'] }} {{ $account['name'] }} {{ number_format($account['debit'], 2) }} {{ number_format($account['credit'], 2) }} {{ number_format($account['balance'], 2) }}
No accounts found
Total {{ number_format($totalDebit, 2) }} {{ number_format($totalCredit, 2) }} {{ number_format($totalDebit - $totalCredit, 2) }}
@if($source)

Source: {{ $source === 'journal_lines' ? 'Journal Lines (double-entry)' : 'General Journals' }}

@endif