@extends('layouts.app') @section('title', 'Chart of Accounts') @section('page-title', 'Chart of Accounts') @section('content')
{{-- Accounts list --}}
@foreach(['asset' => 'Assets', 'liability' => 'Liabilities', 'equity' => 'Equity', 'revenue' => 'Revenue', 'expense' => 'Expenses'] as $type => $label) @php $typeAccounts = $accounts->where('account_type', $type); @endphp @if($typeAccounts->count())

{{ $label }}

@foreach($typeAccounts as $account) @endforeach
Code Account Name Sub-Type Balance (₹) System
{{ $account->account_code }} {{ $account->account_name }} @foreach($account->children as $child)
↳ {{ $child->account_code }} {{ $child->account_name }}
@endforeach
{{ str_replace('_',' ', $account->account_sub_type ?? '') }} {{ number_format($account->current_balance, 2) }} @if($account->is_system) System @else @endif
@endif @endforeach
{{-- Add new account --}}

Add New Account

@csrf
@endsection