@extends('pdf.layouts.app') @section('title', 'Daily Journal Report') @section('styles') @endsection @section('content')
@php $transactions = $data['data'] ?? []; $summary = $data['summery'] ?? []; // default false if backend didn't pass it $ShowByDefault = $ShowByDefault ?? false; $isRtl = ($direction ?? 'rtl') === 'rtl'; @endphp {{-- Transactions Table --}} @if(count($transactions) > 0) @if(!$ShowByDefault) @endif @foreach($transactions as $index => $item) @if(!$ShowByDefault) @endif @endforeach
# {{ $isRtl ? 'رقم القيد' : 'Number' }} {{ $isRtl ? 'التاريخ' : 'Date' }} {{ $isRtl ? ' الحساب' : 'Account' }} {{ $isRtl ? 'الاسم' : 'Name' }} {{ $isRtl ? 'مدين' : 'Debit' }} {{ $isRtl ? 'دائن' : 'Credit' }}{{ $isRtl ? 'سعر تحويل العملة' : 'Currency Transfer Rate' }}
{{ $index + 1 }} {{ $item['constraint_number_doc'] ?? '-' }} {{ isset($item['date']) ? \Carbon\Carbon::parse($item['date'])->format('d/m/Y') : '-' }} {{ $item['tree_accounting_title'] ?? '-' }} {{ $item['constraint_name'] ?? '-' }} {{ number_format($item['debit'] ?? 0, 2) }} @if(isset($item['debit_other']) && $item['debit_other'] > 0 && $item['debit'] != $item['debit_other'])
({{ number_format($item['debit_other'], 2) }} {{ $item['currency_symbol'] ?? '' }})
{{ $isRtl ? 'سعر الصرف:' : 'Rate:' }} {{ $item['currency_transfer_rate'] ?? $item['rate'] ?? 1 }}
@endif
{{ number_format($item['creditor'] ?? 0, 2) }} @if(isset($item['creditor_other']) && $item['creditor_other'] > 0 && $item['creditor'] != $item['creditor_other'])
({{ number_format($item['creditor_other'], 2) }} {{ $item['currency_symbol'] ?? '' }})
{{ $isRtl ? 'سعر الصرف:' : 'Rate:' }} {{ $item['currency_transfer_rate'] ?? $item['rate'] ?? 1 }}
@endif
{{ $item['currency_transfer_rate'] ?? $item['rate'] ?? '-' }}
{{-- Summary Section --}}

{{ $isRtl ? 'الإجمالي' : 'Summary' }}

{{ $isRtl ? 'إجمالي المدين' : 'Total Debit' }} {{ $isRtl ? 'إجمالي الدائن' : 'Total Credit' }}
{{ number_format($summary['total_debit'] ?? 0, 2) }} {{ number_format($summary['total_creditor'] ?? 0, 2) }}
@else

No data available for this report.

@endif
@endsection