@extends('layouts.master') @section('title', 'General Ledger') @section('styles') @endsection @section('content') @php $totalDebit = collect($glAccounts ?? [])->sum('debit'); $totalCredit = collect($glAccounts ?? [])->sum('credit'); $netBalance = collect($glAccounts ?? [])->sum('balance'); $countAccounts = count($glAccounts ?? []); $query = request()->query(); @endphp
Account activity • Double-entry totals
| GL Code | GL Name | Account Type | Debit | Credit | Balance | Currency | Last Txn | Action |
|---|---|---|---|---|---|---|---|---|
| {{ $row['glcode'] ?? '—' }} | {{ $row['name'] ?? '—' }} | {{ $row['accounttype'] ?? 'Unknown' }} | {{ number_format((float)($row['debit'] ?? 0), 2) }} | {{ number_format((float)($row['credit'] ?? 0), 2) }} | {{ number_format($bal, 2) }} | {{ $row['currency'] ?? '—' }} | {{ !empty($row['last_transaction_date']) ? \Carbon\Carbon::parse($row['last_transaction_date'])->format('Y-m-d') : '—' }} | Detail |
| No accounts found for the selected filters. | ||||||||