GL Transactions Report
Company Information
@if($company && $company->logo_path) Company Logo @endif
Name: {{ $company->name ?? 'Company Name' }}
Address: {{ $company->address ?? 'Company Address' }}
Phone: {{ $company->phone ?? 'Company Phone' }}
Email: {{ $company->email ?? 'Company Email' }}
@if($company && $company->vat_no)
VAT No: {{ $company->vat_no }}
@endif @if($company && $company->tin_no)
TIN No: {{ $company->tin_no }}
@endif
Currency: {{ $currency->code }}
Report Parameters
Account Range: {{ $fromAccount->account_code }} - {{ $toAccount->account_code }}
Account Names: {{ $fromAccount->account_name }} to {{ $toAccount->account_name }}
Period: {{ $dateFrom }} to {{ $dateTo }}
Report Date: {{ date('d M Y') }}
Currency: {{ $currency->code }}
Period: {{ $dateFrom }} to {{ $dateTo }}
Report Date: {{ date('d M Y') }}
@php $grandTotalOpening = 0; $grandTotalDr = 0; $grandTotalCr = 0; $grandTotalClosing = 0; @endphp @foreach($transactionData as $typeId => $typeData) @if(count($typeData['accounts']) > 0)
{{ $typeData['type']->type_code }} - {{ $typeData['type']->type_name }}
@foreach($typeData['accounts'] as $accountId => $accountData)
{{ $accountData['account']->account_code }} - {{ $accountData['account']->account_name }}
@foreach($accountData['transactions'] as $row) @endforeach
Date Description Reference DR CR Balance
Opening Balance: @if($accountData['opening_balance'] < 0) ({{ number_format(abs($accountData['opening_balance']), 2) }}) @else {{ number_format($accountData['opening_balance'], 2) }} @endif
{{ $row['date'] }} {{ $row['description'] }} {{ $row['reference'] }} {{ number_format($row['dr'], 2) }} {{ number_format($row['cr'], 2) }} @if($row['balance'] < 0) ({{ number_format(abs($row['balance']), 2) }}) @else {{ number_format($row['balance'], 2) }} @endif
@endforeach
Account Type Totals: {{ number_format($typeData['total_dr'], 2) }} {{ number_format($typeData['total_cr'], 2) }} @if($typeData['total_closing'] < 0) ({{ number_format(abs($typeData['total_closing']), 2) }}) @else {{ number_format($typeData['total_closing'], 2) }} @endif
@php $grandTotalOpening += $typeData['total_opening']; $grandTotalDr += $typeData['total_dr']; $grandTotalCr += $typeData['total_cr']; $grandTotalClosing += $typeData['total_closing']; @endphp @endif @endforeach
Grand Totals: {{ number_format($grandTotalDr, 2) }} {{ number_format($grandTotalCr, 2) }} @if($grandTotalClosing < 0) ({{ number_format(abs($grandTotalClosing), 2) }}) @else {{ number_format($grandTotalClosing, 2) }} @endif