@extends('layouts.pdf.base') @section('pdf-title', 'General Ledger') @section('pdf-subtitle') Period: {{ $from ?? 'Start' }} → {{ $to ?? 'End' }} @endsection @section('pdf-content') @foreach($accounts as $account)
{{ $account['account_code'] }} — {{ $account['account_name'] }}

Opening: {{ number_format($account['opening_balance'], 2) }} · Closing: {{ number_format($account['closing_balance'], 2) }}

@forelse($account['transactions'] as $txn) @empty @endforelse
Date Reference Description Debit Credit Balance
{{ $txn['date'] }} {{ $txn['journal_no'] }} {{ $txn['description'] }} {{ number_format($txn['debit'], 2) }} {{ number_format($txn['credit'], 2) }} {{ number_format($txn['balance'], 2) }}
No transactions in this period.
@endforeach @endsection