@foreach ($children as $account)
@php $children_count = count($account->sub_accounts); @endphp
{{-- Operations --}}
@if ($level < 4 && $account->sterile == false)
{{-- Maximum Level (5) and is not sterile --}}
@can('accounting-accountsTree-add')
@endcan
@endif
@can('accounting-accountsTree-edit')
@endcan
@if ($account->removable)
@can('accounting-accountsTree-delete')
@endcan
@endif
@include('tenant.accounting.accounts.accounts-list', [
'children' => $account->sub_accounts,
'level' => $account->level,
])
@endforeach