@extends('layouts.app') @section('title', 'Chart of Accounts') @section('breadcrumb') @endsection @push('styles') @endpush @section('content') @if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
@foreach($errors->all() as $e)
{{ $e }}
@endforeach
@endif {{-- Filter Bar --}}
{{-- COA Table --}}
@php $typeColors = ['asset'=>'#2563EB','liability'=>'#DC2626','equity'=>'#16A34A','income'=>'#D97706','expense'=>'#7C3AED']; $sections = collect($sections ?? [])->map(function ($section) { $section['accs'] = collect($section['accs'] ?? []); return $section; }); @endphp @foreach($sections as $section) @php $accs=$section['accs']; @endphp @continue($accs->isEmpty()) @foreach($accs as $acc) @endforeach @endforeach
CODE NAME TYPE BALANCE ACTION
 {{ $section['label'] }}({{ $accs->count() }})
{{ $acc->code ?: '—' }}
@if(($acc->display_depth ?? $acc->depth) > 0)@endif
{{ $acc->name }} @if($acc->is_bank)Bank@endif @if($acc->is_cash)Cash@endif @if(!$acc->is_active)Inactive@endif
@if($acc->parent_id && $acc->parent)
Sub-account of {{ $acc->parent->name }}
@endif
{{ $acc->qb_account_type ?? $section['label'] }} @if($acc->show_current_balance ?? false) @php $balanceText = \App\Helpers\NumberHelper::formatAmount($acc->current_balance_value ?? 0, $companyId) . ($acc->current_balance_suffix ?? ''); @endphp {{ $balanceText }} @else — @endif
{{-- Import Modal --}} {{-- Overlay --}}
{{-- Create / Edit window --}}
New Account

Create a new account to track money in your business.

@csrf
@endsection @push('scripts') @endpush