{{ $company->name }}
GENERAL LEDGER REPORT
{{ \Carbon\Carbon::parse($startDate)->format('F j, Y') }} to {{ \Carbon\Carbon::parse($endDate)->format('F j, Y') }}
@foreach($ledgerData as $accountCode => $entries)

{{ $accountCode }} - {{ $entries->first()->account_name }}

@php $accountDebit = 0; $accountCredit = 0; @endphp @foreach($entries as $entry) @php $accountDebit += $entry->debit; $accountCredit += $entry->credit; @endphp @endforeach
Date Reference Description Contact Debit Credit Balance
{{ \Carbon\Carbon::parse($entry->date)->format('m/d/Y') }} {{ $entry->reference }} {{ $entry->description }} {{ $entry->contact_name }} {{ number_format($entry->debit, 2) }} {{ number_format($entry->credit, 2) }} {{ number_format($entry->running_balance, 2) }}
Account Total {{ number_format($accountDebit, 2) }} {{ number_format($accountCredit, 2) }} {{ number_format($accountDebit - $accountCredit, 2) }}
@if(!$loop->last)
@endif @endforeach