@extends('garage.layouts.app') @section('title', 'Chart of Accounts') @push('styles') @include('shared.garage-summary-ui-styles') @endpush @section('content')

Chart of Accounts

Arrange ledgers into Customer, Vendor, and Others with proper account heads.

{{ (int)($stats['total'] ?? 0) }}
Total Ledgers
{{ (int)($stats['customer'] ?? 0) }}
Customers
{{ (int)($stats['vendor'] ?? 0) }}
Vendors
{{ (int)($stats['others'] ?? 0) }}
Others
@if(($search ?? '') || ($type ?? 'all') !== 'all') @endif
@forelse($ledgers as $l) @empty @endforelse
Ledger Bucket Account Head Opening Status Arrangement
{{ $l->name }}
{{ $l->code }}
@if($l->ledger_type === 'customer') Customer @elseif($l->ledger_type === 'vendor') Vendor @elseif($l->ledger_type === 'employee') Employee @else Other @endif @if($l->nature_name || $l->sub_nature_name)
{{ $l->nature_name ?: 'Unassigned' }} / {{ $l->sub_nature_name ?: 'Unassigned' }}
{{ $l->nature_code ?: '—' }} / {{ $l->sub_nature_code ?: '—' }}
@else Unassigned @endif
{{ number_format((float)($l->opening_balance ?? 0), 2) }}
{{ strtoupper((string)($l->opening_balance_type ?? '')) }}
@if($l->is_active) Active @else Inactive @endif
@csrf @method('PUT')
is_active ? 'checked' : '' }} title="Active">
No ledgers found for this filter.
@if($ledgers->hasPages())
{{ $ledgers->links() }}
@endif
@endsection