{{-- resources/views/exports/trial-balance-pdf.blade.php Rendered by ReportsController::exportTrialBalance(), which spreads getTrialBalanceData() into the view — so $data here is the inner array: trial_balance (nested groups), grand_totals, is_balanced, from_date, to_date, active_year. Groups nest through 'children' and carry 'ledgers'; the same recursive shape TrialBalanceExport walks for the spreadsheet version. --}}
| Code | Particulars | Opening Dr | Opening Cr | Closing Dr | Closing Cr |
|---|---|---|---|---|---|
| {{ $row['code'] }} | {{ $row['name'] }} | @foreach ($row['values'] as $value) {{-- Zero on a ledger line is noise; on a group subtotal it is information, so only ledger zeros are blanked. --}}@if ($row['type'] === 'ledger' && (float) $value == 0.0) @else {{ number_format((float) $value, 2) }} @endif | @endforeach|||
| No balances for this period. | |||||
| GRAND TOTAL | {{ number_format((float) ($data['grand_totals']['opening_debit'] ?? 0), 2) }} | {{ number_format((float) ($data['grand_totals']['opening_credit'] ?? 0), 2) }} | {{ number_format((float) ($data['grand_totals']['closing_debit'] ?? 0), 2) }} | {{ number_format((float) ($data['grand_totals']['closing_credit'] ?? 0), 2) }} | |
Status: {{ ! empty($data['is_balanced']) ? 'BALANCED' : 'NOT BALANCED' }}