@extends('layouts.admin.app', ['page' => $menuAdmin['subscriptions']['active'] ?? '', 'sub_page' => $menuAdmin['subscriptions']['route']['subscribers']['sub_active'] ?? null]) @section('title', __('labels.subscription_details')) @section('header_data') @php $page_title = __('labels.subscription_details'); $page_pretitle = __('labels.view'); @endphp @endsection @php $breadcrumbs = [ ['title' => __('labels.home'), 'url' => route('admin.dashboard')], ['title' => __('labels.subscriptions'), 'url' => route('admin.subscription-plans.subscribers')], ['title' => __('labels.subscription_details'), 'url' => null], ]; $currency = $currencySymbol ?? '$'; @endphp @section('admin-content')

{{ __('labels.subscription_details') }}

{{ __('labels.seller') }}
{{ $subscription->seller?->user?->name }} ({{ $subscription->seller?->user?->email }})
{{ __('labels.plan') }}
{{ $subscription->plan?->name ?? $subscription->snapshot?->plan_name }}
{{ __('labels.price_paid') }}
{{ $currency }} {{ number_format((float)($subscription->price_paid ?? $subscription->snapshot?->price ?? 0), 2) }}
{{ __('labels.period') }}
{{ optional($subscription->start_date)->format('Y-m-d') ?? '-' }} / {{ optional($subscription->end_date)->format('Y-m-d') ?? __('labels.unlimited') }}
{{ __('labels.status') }}
{!! view('partials.status', ['status' => (string)$subscription->status])->render() !!}
{{ __('labels.created_at') }}
{{ optional($subscription->created_at)->format('Y-m-d H:i') }}

{{ __('labels.configuration_usage') }}

@foreach($usage as $key => $row) @endforeach
{{ __('labels.configuration') }} {{ __('labels.limit') }} {{ __('labels.used') }} {{ __('labels.remaining') }}
{{ str_replace('_', ' ', $key) }} {{ $row['limit'] === null ? __('labels.unlimited') : (int)$row['limit'] }} {{ (int)$row['used'] }} {{ $row['remaining'] === null ? __('labels.unlimited') : (int)$row['remaining'] }}

{{ __('labels.transaction_details') }}

@forelse($subscription->transactions as $txn) @empty @endforelse
{{ __('labels.id') }} {{ __('labels.payment_gateway') }} {{ __('labels.transaction_id') }} {{ __('labels.amount') }} {{ __('labels.status') }} {{ __('labels.created_at') }}
#{{ $txn->id }} {{ $txn->payment_gateway ?? '-' }} {{ $txn->transaction_id ?? '-' }} {{ $currency }} {{ number_format((float)($txn->amount ?? 0), 2) }} {!! view('partials.status', ['status' => (string)($txn->status ?? 'pending')])->render() !!} {{ optional($txn->created_at)->format('Y-m-d H:i') }}
{{ __('labels.no_transactions_found') }}
@endsection