@extends('layouts.pdf.base') @section('pdf-title', 'Balance Sheet') @section('pdf-subtitle') As at: {{ $asOf ?? $to ?? 'End' }} @endsection @section('pdf-content') @php $renderPdfRows = function (array $rows, string $section) { foreach ($rows as $row) { $indent = str_repeat('— ', (int) ($row['level'] ?? 0)); echo '
| Section | Account | Balance |
|---|---|---|
| Assets | {{ str_repeat('— ', (int) ($row['level'] ?? 0)) }}{{ $row['code'] }} — {{ $row['account'] }} | {{ number_format($row['balance'], 2) }} |
| Total Assets | {{ number_format($totalAssets, 2) }} | |
| Liabilities | {{ str_repeat('— ', (int) ($row['level'] ?? 0)) }}{{ $row['code'] }} — {{ $row['account'] }} | {{ number_format($row['balance'], 2) }} |
| Total Liabilities | {{ number_format($totalLiabilities, 2) }} | |
| Equity | {{ str_repeat('— ', (int) ($row['level'] ?? 0)) }}{{ $row['code'] }} — {{ $row['account'] }} | {{ number_format($row['balance'], 2) }} |
| Equity | {{ $equityPlRow['account'] }} | {{ number_format($equityPlRow['balance'], 2) }} |
| Total Equity | {{ number_format($totalEquity, 2) }} | |