@section('site_title', formatTitle([__('Edit'), __('Subscription'), config('settings.title')])) @if(isset($admin)) @include('shared.breadcrumbs', ['breadcrumbs' => [ ['url' => route('admin.dashboard'), 'title' => __('Admin')], ['url' => route('admin.subscriptions'), 'title' => __('Subscriptions')], ['title' => __('Edit')], ]]) @else @include('shared.breadcrumbs', ['breadcrumbs' => [ ['url' => route('dashboard'), 'title' => __('Home')], ['url' => route('settings'), 'title' => __('Settings')], ['url' => route('settings.payments.subscriptions'), 'title' => __('Subscriptions')], ['title' => __('Edit')] ]]) @endif

{{ __('Edit') }}

{{ __('Subscription') }}
@include('shared.message') @if($subscription->stripe_status == 'active') @if($user->subscription($subscription->name)->cancelled() && !$user->subscription($subscription->name)->onGracePeriod()) @endif @endif
{{ __('Plan') }}
{{ $subscription->name }} {{ $plan->plan_month == $subscription->stripe_plan ? __('Monthly') : __('Yearly') }}
{{ __('Status') }}
{{ formatStripeStatus()[$subscription->stripe_status]['title'] }}
@if(isset($admin))
{{ __('Plan ID') }}
{{ $subscription->stripe_plan }}
{{ __('Subscription ID') }}
{{ $subscription->stripe_id }}
@endif
{{ __('Created at') }}
{{ $subscription->created_at->format(__('Y-m-d')) }}
@if($subscription->updated_at)
{{ __('Updated at') }}
{{ $subscription->updated_at->format(__('Y-m-d')) }}
@endif @if($subscription->trial_ends_at)
{{ __('Trial ends at') }}
{{ $subscription->trial_ends_at->format(__('Y-m-d')) }}
@endif @if($subscription->ends_at)
{{ __('Ends at') }}
{{ $subscription->ends_at->format(__('Y-m-d')) }}
@else
{{ __('Renews on') }}
@if($subscription->updated_at) @if($plan->plan_month == $subscription->stripe_plan) {{ $subscription->updated_at->addMonth(1)->format(__('Y-m-d')) }} @else {{ $subscription->updated_at->addYears(1)->format(__('Y-m-d')) }} @endif @else @if($plan->plan_month == $subscription->stripe_plan) {{ $subscription->created_at->addMonth(1)->format(__('Y-m-d')) }} @else {{ $subscription->created_at->addYears(1)->format(__('Y-m-d')) }} @endif @endif
@endif
@if(isset($admin) == false)
@if($subscription->onGracePeriod() && $subscription->stripe_id) @endif @if($subscription->hasIncompletePayment()) {{ __('Confirm payment') }} @endif
@if($subscription->recurring() || ($subscription->onTrial() && !$subscription->onGracePeriod())) @endif
@else @if(!$subscription->stripe_id)
@endif @endif
@if(isset($admin))
{{ __('User') }}
{{ __('Name') }}
{{ $subscription->user->name }}
{{ __('Email') }}
{{ $subscription->user->email }}
@if(!$subscription->stripe_id) @endif @else @endif