@extends('master.app') @section('title', 'Chart of Accounts') @section('body')
Chart of Accounts (Auto From Modules)
Group row click = child accounts show/hide. Type + Date filters supported.
{{-- Summary --}}
@foreach(['Asset','Liability','Equity','Income','Expense'] as $t)
{{ $t }}
{{ number_format((float)($totals[$t]['balance'] ?? 0), 2) }}
Dr {{ number_format((float)($totals[$t]['debit'] ?? 0), 0) }} • Cr {{ number_format((float)($totals[$t]['credit'] ?? 0), 0) }}
@endforeach
{{-- Filters --}}
{{-- Table --}}
@forelse($groups as $g) @php $h = $g->header; $key = $g->key; $open = $g->open ? '1' : '0'; $lang = $filters['lang'] ?? 'en'; $hname = $lang==='ps' ? ($h->title_ps ?: $h->title_en) : ($lang==='dr' ? ($h->title_dr ?: $h->title_en) : ($h->title_en ?: $h->title_ps)); @endphp @foreach($g->children as $a) @php $name = $lang==='ps' ? ($a->title_ps ?: $a->title_en) : ($lang==='dr' ? ($a->title_dr ?: $a->title_en) : ($a->title_en ?: $a->title_ps)); @endphp @endforeach @empty @endforelse
# Code Name Type Debit Credit Balance
+ {{ $hname }} {{ $h->type }} {{ number_format((float)$h->debit, 2) }} {{ number_format((float)$h->credit, 2) }} {{ number_format((float)$h->balance, 2) }}
No data found.
@endsection