@extends('pdf.layouts.app') @section('title', 'Ledger Report') @section('styles') @endsection @section('content') @php $ShowByDefault = $ShowByDefault ?? false; @endphp
@if(isset($data) && count($data) > 0) @foreach($data as $account)
{{-- هيدر الحساب --}} {{-- معلومات الحساب الأساسية --}}
{{ __('Opening Balance') }} {{ __('Period Movements') }} {{ __('Final Balance') }}
{{ __('Debit') }} {{ __('Credit') }} {{ __('Balance') }} {{ __('Debit') }} {{ __('Credit') }} {{ __('Balance') }}
{{ number_format($account['initial_debit'] ?? 0, 2) }} {{ number_format($account['initial_credit'] ?? 0, 2) }} @php $initialBalance = $account['initial_balance'] ?? 0; @endphp {{ number_format($initialBalance, 2) }} {{ number_format($account['period_debit'] ?? 0, 2) }} {{ number_format($account['period_credit'] ?? 0, 2) }} @php $periodBalance = $account['period_balance'] ?? 0; @endphp {{ number_format($periodBalance, 2) }} @php $finalBalance = $account['final_balance'] ?? 0; @endphp {{ number_format($finalBalance, 2) }}
{{-- جدول المعاملات --}} @if(isset($account['transactions']) && count($account['transactions']) > 0) @if(!$ShowByDefault) @endif @foreach($account['transactions'] as $transaction) @if(!$ShowByDefault) @endif @endforeach
{{ __('Date') }} {{ __('Constraint') }} {{ __('Constraint Number') }} {{ __('Cost Center') }} {{ __('Debit') }} {{ __('Credit') }} {{ __('Balance') }} {{ __('Currency') }}{{ __('Transfer Rate') }}{{ __('Actions') }}
{{ $transaction['date'] ?? '-' }} {{ $transaction['constraint_name'] ?? '-' }} {{ $transaction['number_doc'] ?? '-' }} {{ $transaction['cost_center_name'] ?? '-' }} {{ number_format($transaction['debit'] ?? 0, 2) }} {{ number_format($transaction['credit'] ?? 0, 2) }} @php $runningBalance = $transaction['running_balance'] ?? 0; @endphp {{ number_format($runningBalance, 2) }} {{ $transaction['currency_name'] ?? '-' }}{{ number_format($transaction['transfer_rate'] ?? 0, 2) }}...
@else

{{ __('No transactions available for this account') }}

@endif
@endforeach @else

{{ __('No data available to display') }}

@endif
@endsection