{{-- Filters --}} {{ $this->form }} {{-- Report Header --}} @php $data = $this->generalLedgerData; @endphp General Ledger - From {{ \Carbon\Carbon::parse($data['date_from'])->format('M d, Y') }} to {{ \Carbon\Carbon::parse($data['date_to'])->format('M d, Y') }}
Expand All / Collapse All
{{-- General Ledger Table --}}
@php $totalDebit = 0; $totalCredit = 0; @endphp @if($data['accounts']->isNotEmpty()) @foreach($data['accounts'] as $account) @php $totalDebit += $account->period_debit; $totalCredit += $account->period_credit; @endphp {{-- Account Header Row --}} {{-- Opening Balance Row --}} @if($account->opening_balance != 0 && $this->isAccountExpanded($account->id)) @endif @php $runningBalance = $account->opening_balance; @endphp @if($this->isAccountExpanded($account->id)) @foreach($this->getAccountMoves($account->id) as $move) @php $runningBalance += ($move['debit'] - $move['credit']); @endphp @endforeach @endif @endforeach {{-- Total Row --}} @else @endif
Account Date Communication Partner Debit Credit Balance
{{ $account->code }} {{ $account->name }} {{ number_format($account->period_debit, 2) }} {{ number_format($account->period_credit, 2) }} {{ number_format($account->ending_balance, 2) }}
Opening Balance {{ \Carbon\Carbon::parse($data['date_from'])->format('M d, Y') }} {{ $account->opening_balance > 0 ? number_format($account->opening_balance, 2) : '' }} {{ $account->opening_balance < 0 ? number_format(abs($account->opening_balance), 2) : '' }} {{ number_format($account->opening_balance, 2) }}
{{ $move['move_name'] }} @if($move['ref']) ({{ $move['ref'] }}) @endif {{ \Carbon\Carbon::parse($move['date'])->format('M d, Y') }} @if ($move['move_type'] == 'entry') {{ $move['name'] }} @endif {{ $move['partner_name'] }} {{ $move['debit'] > 0 ? number_format($move['debit'], 2) : '' }} {{ $move['credit'] > 0 ? number_format($move['credit'], 2) : '' }} {{ number_format($runningBalance, 2) }}
Total General Ledger {{ number_format($totalDebit, 2) }} {{ number_format($totalCredit, 2) }}
No accounts with transactions in this period