@foreach($nodes as $node)
@php
    $accountLabel = trim(($node->code ? $node->code . ' ' : '') . $node->name);
    $indent = $level * 16;
@endphp
<tr>
    <td style="padding-left: {{ 8 + $indent }}px;">{{ $accountLabel }}</td>
    @include('reports.profit-loss._pdf-period-amount-cells', [
        'amounts' => !empty($columnPeriods) ? ($node->report_period_amounts ?? []) : $node->report_amount,
        'total' => $node->report_amount,
    ])
</tr>
@if(!empty($node->children_tree))
    @include('reports.profit-loss._pdf-account-tree', ['nodes' => $node->children_tree, 'level' => $level + 1])
@endif
@endforeach
