@php $lang = $filters['lang'] ?? 'en'; $accName = $account ? ( $lang==='ps' ? ($account['title_ps'] ?? $account['title_en']) : ($lang==='dr' ? ($account['title_dr'] ?? $account['title_en']) : ($account['title_en'] ?? $account['title_ps'])) ) : ''; @endphp

General Ledger

Account: {{ $account['key'] ?? '' }} — {{ $accName }} @if(!empty($filters['date_from'])) | From: {{ $filters['date_from'] }} @endif @if(!empty($filters['date_to'])) | To: {{ $filters['date_to'] }} @endif | Printed: {{ now()->format('Y-m-d H:i') }}
@php $running = (float)$opening; @endphp @foreach($entries as $e) @php $running = (float)$e->running; @endphp @endforeach
Date Ref Description Module Debit Credit Running
Opening Balance {{ number_format((float)$opening, 2) }}
{{ $e->date }} {{ $e->ref }} {{ $e->description }} {{ $e->module }} {{ number_format((float)$e->debit, 2) }} {{ number_format((float)$e->credit, 2) }} {{ number_format((float)$running, 2) }}
Totals {{ number_format((float)($totals['debit'] ?? 0), 2) }} {{ number_format((float)($totals['credit'] ?? 0), 2) }} {{ number_format((float)$running, 2) }}