@extends('layouts.app') @section('content')

Chart of Accounts

Manage your business ledgers and categories.

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
@forelse($groupedAccounts as $type => $accounts)
{{ strtoupper($type) }}S
{{ $accounts->count() }} Accounts
@foreach($accounts as $account) @if($account->children->count() > 0) @endif @endforeach
Account Name Code Status Balance
@foreach($account->children as $child) @endforeach
{{ $child->name }}
Sub-account
{{ $child->code }} @if($child->is_active) Active @endif ${{ number_format($child->balance, 2) }}
@empty
No accounts found. Start by adding a new account.
@endforelse
@endsection