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

Chart of Accounts

New Account
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
Clear
@foreach($types as $key => $type) @php $typeAccounts = $groupedAccounts->get($key, collect([])); $totalBalance = $typeAccounts->sum('current_balance'); @endphp
{{ $type['label'] }}
{{ $typeAccounts->count() }}
Rs. {{ number_format($totalBalance, 2) }}
@endforeach
@forelse($accounts as $account) @empty @endforelse
Code Account Name Type Sub Type Parent Account Opening Balance Status Actions
{{ $account->code }} {{ $account->name }} @php $badgeColors = [ 'asset' => '#28a745', 'liability' => '#dc3545', 'equity' => '#6f42c1', 'income' => '#17a2b8', 'expense' => '#fd7e14' ]; @endphp {{ $types[$account->type]['label'] ?? ucfirst($account->type) }} {{ $account->sub_type ? ucwords(str_replace('_', ' ', $account->sub_type)) : '-' }} {{ $account->parent ? $account->parent->name : '-' }} Rs. {{ number_format($account->opening_balance, 2) }} @if($account->opening_balance > 0) ({{ ucfirst($account->opening_type) }}) @endif Rs. {{ number_format($account->current_balance, 2) }} @if($account->is_active) Active @else Inactive @endif @if(!$account->is_system)
@csrf @method('DELETE')
@endif

No accounts found. Create your first account

Total: {{ $accounts->count() }} accounts
@endsection