@extends('layouts.master') @section('title', 'إجراءات الاشتراك') @section('content')
إجراءات الاشتراك

إدارة جميع إجراءات الاشتراك رقم {{ $subscription->verification_code }}

رجوع
@if (session('success'))
{{ session('success') }}
@endif @if ($errors->any())
يوجد بعض الملاحظات:
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
توضيح عام للإجراءات
الإيقاف المؤقت

يتم تنفيذه مباشرة إذا كانت الخدمة تسمح به، مع مراعاة عدد المرات والمدة المسموحة.

الإيقاف النهائي

لا يتم التنفيذ إلا بعد إدخال السداد الكامل إذا وُجدت رسوم على الإجراء.

التنازل

يتم نقل الاشتراك إلى عضو آخر، ورسوم التنازل والضريبة تظهر تلقائيًا.

الترقية

يتم حساب فرق الترقية آليًا ثم يُشترط اكتمال السداد قبل التنفيذ.

رقم الاعتماد
{{ $subscription->verification_code }}
العضو الحالي
{{ $subscription->member->name ?? '---' }}
@if (!empty($subscription->member?->member_code))
{{ $subscription->member->member_code }}
@endif
الفرع
{{ $subscription->branch->name ?? '---' }}
الخدمة الحالية
{{ $subscription->item_name }}
تاريخ البداية
{{ optional($subscription->start_date)->format('Y-m-d') }}
تاريخ النهاية
{{ optional($subscription->end_date)->format('Y-m-d') }}
الحالة التشغيلية
@php $lifeLabel = match ($subscription->current_action_type) { 'pause' => 'موقوف مؤقتًا', 'transfer' => 'تم التنازل', 'upgrade' => 'تمت الترقية', 'stop_final' => 'موقوف نهائيًا', default => match ($subscription->lifecycle_status) { 'active' => 'نشط', 'paused' => 'موقوف', 'ended' => 'منتهي', default => 'غير معروف', }, }; @endphp {{ $lifeLabel }}
الإجراءات
{{ $canTakeAction ? 'متاحة' : 'غير متاحة' }}
@if ($pauseEnabled)
@if ($canTakeAction)
@csrf
@else
الإيقاف المؤقت غير متاح حاليًا لهذا الاشتراك.
@endif
@endif
@if ($canTakeAction)
@csrf
@include('admin.subscriptions.actions.partials.multi-payment', [ 'wrapperId' => 'stop-payments-wrapper', 'buttonClass' => 'stop-submit-btn btn-danger', 'buttonText' => 'تنفيذ الإيقاف النهائي', 'totalTextClass' => 'stop-total-text-js', 'paidTextClass' => 'stop-paid-text-js', 'diffTextClass' => 'stop-diff-text-js', 'methods' => $paymentMethods, ])
@else
الإيقاف النهائي غير متاح حاليًا لهذا الاشتراك.
@endif
@if ($transferEnabled)
@if ($canTakeAction)
@csrf
@if ($transferTotal > 0) @include('admin.subscriptions.actions.partials.multi-payment', [ 'wrapperId' => 'transfer-payments-wrapper', 'buttonClass' => 'transfer-submit-btn btn-info text-white', 'buttonText' => 'تنفيذ التنازل بعد السداد', 'totalTextClass' => 'transfer-total-text-js', 'paidTextClass' => 'transfer-paid-text-js', 'diffTextClass' => 'transfer-diff-text-js', 'methods' => $paymentMethods, 'defaultAmount' => number_format($transferTotal, 2, '.', ''), ]) @else
@endif
@else
التنازل غير متاح حاليًا لهذا الاشتراك.
@endif
@endif
@if ($canTakeAction)
@csrf
@include('admin.subscriptions.actions.partials.multi-payment', [ 'wrapperId' => 'upgrade-payments-wrapper', 'buttonClass' => 'upgrade-submit-btn btn-success', 'buttonText' => 'تنفيذ الترقية', 'totalTextClass' => 'upgrade-total-text-js', 'paidTextClass' => 'upgrade-paid-text-js', 'diffTextClass' => 'upgrade-diff-text-js', 'methods' => $paymentMethods, ])
@else
الترقية غير متاح حاليًا لهذا الاشتراك.
@endif

@forelse($actions as $action) @php $typeLabel = match ($action->action_type) { 'pause' => 'إيقاف مؤقت', 'stop_final' => 'إيقاف نهائي', 'transfer' => 'تنازل', 'upgrade' => 'ترقية', default => $action->action_type, }; $remaining = max( 0, (float) $action->total_amount - (float) $action->paid_amount, ); @endphp @empty @endforelse
# رقم الوثيقة النوع الحالة الإجمالي المدفوع المتبقي أنشئ بواسطة تاريخ الإنشاء
{{ $action->id }} {{ $action->action_no }} {{ $typeLabel }} تم التنفيذ {{ number_format($action->total_amount, 2) }} {{ number_format($action->paid_amount, 2) }} {{ number_format($remaining, 2) }} {{ $action->creator->name ?? '---' }} {{ optional($action->created_at)->format('Y-m-d H:i') }}
لا توجد إجراءات على هذا الاشتراك بعد.
@include('admin.subscriptions.actions.partials.history-table', [ 'title' => 'تاريخ الإيقاف المؤقت', 'collapseId' => 'history-pause', 'rows' => $pauseActions, 'type' => 'pause', ]) @include('admin.subscriptions.actions.partials.history-table', [ 'title' => 'تاريخ التنازل', 'collapseId' => 'history-transfer', 'rows' => $transferActions, 'type' => 'transfer', ]) @include('admin.subscriptions.actions.partials.history-table', [ 'title' => 'تاريخ الترقية', 'collapseId' => 'history-upgrade', 'rows' => $upgradeActions, 'type' => 'upgrade', ]) @include('admin.subscriptions.actions.partials.history-table', [ 'title' => 'تاريخ الإيقاف النهائي', 'collapseId' => 'history-stop-final', 'rows' => $stopFinalActions, 'type' => 'stop_final', ])
@endsection @section('js') @endsection