@php $locale = app()->getLocale(); $isRtl = $locale === 'ar'; $currency = \App\Models\Setting::currencyLabel($locale); $typeLabels = [ 'subscription' => $isRtl ? 'اشتراك' : 'Subscription', 'class' => $isRtl ? 'حصة' : 'Class', 'personal_training' => $isRtl ? 'تدريب شخصي' : 'Personal Training', 'product' => $isRtl ? 'منتج' : 'Product', 'other' => $isRtl ? 'أخرى' : 'Other', ]; $methodLabels = [ 'cash' => $isRtl ? 'نقداً' : 'Cash', 'card' => $isRtl ? 'بطاقة' : 'Card', 'bank_transfer' => $isRtl ? 'تحويل بنكي' : 'Bank Transfer', 'online' => $isRtl ? 'دفع إلكتروني' : 'Online', ]; $statusLabels = [ 'completed' => $isRtl ? 'مكتمل' : 'Completed', 'refunded' => $isRtl ? 'مسترد' : 'Refunded', 'pending' => $isRtl ? 'معلق' : 'Pending', ]; $statusColors = [ 'completed' => 'bg-emerald-100 text-emerald-700', 'refunded' => 'bg-rose-100 text-rose-700', 'pending' => 'bg-amber-100 text-amber-700', ]; @endphp @extends('layouts.app') @section('title', $isRtl ? 'تفاصيل الدفعة' : 'Payment Details') @section('content')
{{ $isRtl ? 'رقم الفاتورة:' : 'Invoice:' }} {{ $payment->invoice_number }}
{{ $isRtl ? 'الإجمالي' : 'Total' }}
{{ number_format((float)$payment->total, 2) }}
{{ $currency }}
{{ $isRtl ? 'الحالة' : 'Status' }}
@php $statusKey = $payment->status ?? 'completed'; @endphp {{ $statusLabels[$statusKey] ?? $statusKey }}{{ $isRtl ? 'التاريخ:' : 'Date:' }} {{ $payment->created_at->format('Y-m-d H:i') }}
{{ $isRtl ? 'النوع' : 'Type' }}
{{ $typeLabels[$payment->payment_type] ?? $payment->payment_type }}
{{ $isRtl ? 'الطريقة:' : 'Method:' }} {{ $methodLabels[$payment->payment_method] ?? $payment->payment_method }}
{{ $isRtl ? 'المستلم' : 'Received By' }}
{{ $payment->receivedBy->name ?? ($isRtl ? '—' : '—') }}
{{ $isRtl ? 'عضو:' : 'Member:' }} @if($payment->member) {{ $payment->member->full_name }} @else {{ $isRtl ? 'زائر' : 'Guest' }} @endif
{{ $isRtl ? 'المبلغ' : 'Amount' }}
{{ number_format((float)$payment->amount, 2) }} {{ $currency }}
{{ $isRtl ? 'الخصم' : 'Discount' }}
{{ number_format((float)$payment->discount, 2) }} {{ $currency }}
{{ $isRtl ? 'الضريبة' : 'Tax' }}
{{ number_format((float)$payment->tax, 2) }} {{ $currency }}
{{ $isRtl ? 'الوصف' : 'Description' }}
{{ $payment->description }}
{{ $isRtl ? 'اشتراك' : 'Subscription' }}
{{ $payment->subscription->membershipPlan->name ?? '' }}