@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

General Ledger

Account activity • Double-entry totals

Ledger Report
Reset PDF Back
Total Debits
{{ number_format((float)$totalDebit, 2) }}
Total Credits
{{ number_format((float)$totalCredit, 2) }}
Net Balance
{{ number_format((float)$netBalance, 2) }}
Accounts
{{ number_format((int)$countAccounts) }}
GL Accounts Period: {{ $fromDate ?? now()->startOfMonth()->toDateString() }} to {{ $toDate ?? now()->toDateString() }}
@forelse(($glAccounts ?? []) as $row) @php $bal = (float)($row['balance'] ?? 0); @endphp @empty @endforelse
GL Code GL Name Account Type Debit Credit Balance Currency Last Txn Action
{{ $row['glcode'] ?? '—' }} {{ $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.
@endsection