@extends('dashboard.layouts.app') @section('content') @if (session('success')) @endif @if (session('error')) @endif @if (isset($errors) && $errors->any()) @endif
@forelse ($accounts as $account) {{ $account->code }} @if ($account->parent) {{ $account->parent->code }} - {{ $account->parent->title }} @else Root @endif {{ $account->tree_level }} {{ $accountTypes[$account->account_type] ?? 'Not set' }} {{ $accountSubtypes[$account->account_subtype] ?? '-' }} @if ($account->account_nature === 'debit') Debit increases @elseif ($account->account_nature === 'credit') Credit increases @else Not set @endif {{ $account->is_nature_inherited ? 'Yes' : 'No' }} {{ $account->status }} {{ $account->children_count }}
@empty No accounts found. @endforelse
@if ($treeAccounts->isEmpty())

No accounts found.

@else @include('dashboard.chart_of_accounts.partials.tree_nodes', [ 'nodes' => $treeAccounts, 'accountTypes' => $accountTypes, 'accountSubtypes' => $accountSubtypes, 'accountNatures' => $accountNatures, ]) @endif
@foreach ($modalAccounts as $account) @endforeach @endsection