@foreach ($account->children as $subaccount)
@php
$children_count = $subaccount->children->count();
@endphp
@if (!$loop->last)
-
{{ $subaccount->name }}
{{ $children_count > 0 ? ' (' . $children_count . ')' : '' }}
/ {{ __(($subaccount->account_return ?? 'Undefined')) }}
@if ($children_count > 0)
@include('dashboard.accounting.tree.sub-accounts', ['account' => $subaccount])
@elseif($subaccount->type != 'final')
@endif
@else
-
{{ $subaccount->name }}
{{ $children_count > 0 ? ' (' . $children_count . ')' : '' }}
/ {{ __($subaccount->account_return) }}
@if ($children_count > 0)
@include('dashboard.accounting.tree.sub-accounts', ['account' => $subaccount])
@elseif($subaccount->type != 'final')
@endif
-
@endif
@endforeach