@php use ArPHP\I18N\Arabic; $ar = new Arabic(); // Check Storage disk first (storage/app/public) $logo = null; foreach (['logo.png', 'Logo.svg', 'logo.svg'] as $candidate) { $storagePath = storage_path('app/public/' . $candidate); if (file_exists($storagePath)) { $logo = $storagePath; break; } } // Fallback to public path if (!$logo) { $preferred = ['images/logo.png', 'images/logo.jpg', 'logo.png', 'logo.jpg']; foreach ($preferred as $candidate) { if (file_exists(public_path($candidate))) { $logo = public_path($candidate); break; } } } @endphp
@if ($logo) @endif

{{ $title }}

{{ $dateRange }}

{{ $type }} : {{ $ar->utf8Glyphs(__('transactionable_type')) }}

@foreach ($records as $r) @endforeach
{{ $ar->utf8Glyphs(__('payment_date')) }} {{ $ar->utf8Glyphs(__('amount')) . ' (' . $ar->utf8Glyphs(__('sar')) . ')' }} {{ $ar->utf8Glyphs(__('user')) }} {{ $ar->utf8Glyphs(__('transactionable_id')) }} {{ $ar->utf8Glyphs(__('transactionable_type')) }} {{ $ar->utf8Glyphs(__('ID')) }}
{{ $r->created_at->format('Y-m-d H:i') }} {{ number_format($r->amount, 2) }} {{ $ar->utf8Glyphs($r->user?->name) }} {{ $r->transactionable_id }} {{ $ar->utf8Glyphs(__($r->transactionable_type)) }} {{ $r->id }}


{{ $records->count() }} : {{ $ar->utf8Glyphs(__('total_transactions')) }}
{{ number_format($records->sum('amount'), 2) }} : {{ ' (' . $ar->utf8Glyphs(__('sar')) . ')' . $ar->utf8Glyphs(__('total_amount')) }}