@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 }}

{{ $statusLabel }} : {{ $ar->utf8Glyphs(__('status')) }}

% {{ $vatRate }} :{{ $ar->utf8Glyphs(__('vat_rate')) }}

{{ $ar->utf8Glyphs(__('active')) }} {{ $ar->utf8Glyphs(__('scheduled')) }} {{ $ar->utf8Glyphs(__('ended')) }} {{ $ar->utf8Glyphs(__('cancelled')) }} : {{ $ar->utf8Glyphs(__('status_key')) }}
@foreach ($records as $r) @php $participants = $r->users_count ?? $r->users()->count(); $interests = $r->favourites_count ?? $r->favourites()->count(); $joinPoints = ($r->required_points ?? 0) * $participants; $winner = $r->highestBidder(); $winnerPoints = $winner ? $winner->pivot->points_used ?? 0 : 0; $pointsConsumed = $joinPoints + $winnerPoints; $isPaid = $r->payment_status === \App\Enums\PaymentStatusEnum::PAID && $r->status === \App\Enums\AuctionStatusEnum::ENDED; $basePrice = $isPaid ? $r->final_price ?? 0 : 0; if ($isPaid) { $deliveryFee = $r->shipping ?? 0; $vatAmount = $r->tax ?? 0; $totalCollected = $r->total_price ?? $basePrice + $deliveryFee + $vatAmount; } else { $deliveryFee = 0; $vatAmount = 0; $totalCollected = 0; } @endphp @endforeach
{{ $ar->utf8Glyphs(__('total_collected')) }} {{ $ar->utf8Glyphs(__('vat')) }} {{ $ar->utf8Glyphs(__('delivery_fees')) }} {{ $ar->utf8Glyphs(__('base_price')) }} {{ $ar->utf8Glyphs(__('points_consumed')) }} {{ $ar->utf8Glyphs(__('interest_count')) }} {{ $ar->utf8Glyphs(__('participants_count')) }} {{ $ar->utf8Glyphs(__('name')) }} {{ $ar->utf8Glyphs(__('ID')) }}
{{ number_format($totalCollected, 2) }} {{ number_format($vatAmount, 2) }} {{ number_format($deliveryFee, 2) }} {{ number_format($basePrice, 2) }} {{ number_format($pointsConsumed) }} {{ $interests }} {{ $participants }} {{ $ar->utf8Glyphs($r->name) }} {{ $r->id }}


{{ $ar->utf8Glyphs(__('summary')) }}

{{ $ar->utf8Glyphs(__('grand_total')) }} {{ $ar->utf8Glyphs(__('total_vat')) }} {{ $ar->utf8Glyphs(__('total_delivery_fees')) }} {{ $ar->utf8Glyphs(__('total_base_prices')) }} {{ $ar->utf8Glyphs(__('total_points_consumed')) }} {{ $ar->utf8Glyphs(__('total_interested')) }} {{ $ar->utf8Glyphs(__('total_participants')) }}
{{ number_format($summary['total'], 2) }} {{ number_format($summary['vat'], 2) }} {{ number_format($summary['delivery'], 2) }} {{ number_format($summary['base_price'], 2) }} {{ number_format($summary['points']) }} {{ $summary['interests'] }} {{ $summary['participants'] }}