@use('App\Services\Date') @if(request()->all())

@lang('reports::reports.General Ledger')

{{ $data['companyName'] }}

@lang('from') {{$data['from']}} @lang('to') {{$data['to']}}

@foreach ($data['accounts'] as $account) @if($account && count($account['transactions'])) @foreach($account['transactions'] as $transaction) @endforeach @endif @endforeach
@lang('reports::reports.account') @lang('reports::reports.general_ledger.transactions_type') @lang('reports::reports.journal_number') @lang('reports::reports.reference_name') @lang('reports::reports.description') @lang('reports::reports.general_ledger.amount') @lang('reports::reports.general_ledger.balance')
{{ $account['code'] }} - {{ $account['name'] }}
@lang('reports::reports.opening_balance') @if($account['openingBalance']<0) ({{ number_format(abs($account['openingBalance']),2) }}) @else {{ number_format($account['openingBalance'],2) }} @endif
{{ Date::format($transaction['date'], 'date') }} {{ $transaction['transaction_type'] }} @if(isset($transaction['journal_id'])) {{ $transaction['journal_number'] }} @endif {{ $transaction['reference_person'] }} {{ $transaction['journal_description'] }} @if($transaction['value']<0) ({{ number_format(abs($transaction['value']),2) }}) @else {{ number_format($transaction['value'],2) }} @endif @if($transaction['balance_after_transaction']<0) ({{ number_format(abs($transaction['balance_after_transaction']),2) }}) @else {{ number_format($transaction['balance_after_transaction'],2) }} @endif
@lang('reports::reports.total') {{ $account['name'] }} @if($account['total']<0) ({{ number_format(abs($account['total']),2) }}) @else {{ number_format($account['total'],2) }} @endif
@endif