@extends('layouts.app') @section('title', 'Chart of accounts') @section('content')

Chart of accounts

{{ $accounts->count() }} account(s). System accounts are referenced by code from the automatic postings.

Trial balance Ledger

Add an account

@csrf
@error('code'){{ $message }}@enderror
@error('name'){{ $message }}@enderror

Conventions

Assets & expenses
Debit-normal — a debit increases them.
Liabilities, equity & income
Credit-normal — a credit increases them.
Balances
Maintained automatically by JournalEntry::post(); never edit them directly.
System accounts
Name and subtype only. Their code and type are fixed because automatic postings look them up by code.
@forelse ($grouped as $type => $group)

{{ title_case_words($type) }} accounts

{{ $group->count() }}
@foreach ($group as $account) @endforeach
CodeNameSubtype BalanceState
{{ $account->code }}
@csrf @method('PUT') @if ($account->is_system) @else @endif
{{ $account->subtype ?: '—' }} {{ money($account->balance) }} {{ $account->is_active ? 'Active' : 'Inactive' }} @if ($account->is_system)system@endif
@csrf @method('PUT') @if ($account->subtype)@endif
@empty @include('components.empty-state', [ 'icon' => '📒', 'title' => 'No accounts yet', 'message' => 'Run the chart of accounts seeder, or add accounts manually above.', ]) @endforelse @endsection