@extends('layouts.frontend') @section('title', trans('messages.subscription')) @section('page_script') @endsection @section('page_header')

{{ Auth::user()->customer->displayName() }}

@endsection @section('content') @include("account._menu")
@if ($hasPendingPaymentForFuture) @include('account.subscription.future_pending._' . \Acelle\Model\Setting::get('system.payment_gateway')) @elseif ($goingToExpire && (\Acelle\Model\Setting::get('system.renew_free_plan') == 'yes' || (\Acelle\Model\Setting::get('system.renew_free_plan') == 'no' && !$subscription->plan->isFree())))

{!! trans('messages.subscription.renew.warning', [ 'remain' => $currentPeriodEnd->diffForHumans(), 'next_on' => \Acelle\Library\Tool::formatDate($currentPeriodEnd), ]) !!}

@endif

{{ trans('messages.subscription') }}

{{ trans('messages.current_plan') }}

@if ($subscription->active()) @if ($subscription->recurring())

{!! trans('messages.subscription.current_subscription.recurring.wording', [ 'plan' => $plan->name, 'money' => Acelle\Library\Tool::format_price($plan->price, $plan->currency->format), 'remain' => $currentPeriodEnd->diffForHumans(), 'next_on' => \Acelle\Library\Tool::formatDate($currentPeriodEnd) ]) !!}

@if (\Auth::user()->customer->can('cancel', $subscription)) {{ trans('messages.subscription.cancel') }} @endif @if (\Auth::user()->customer->can('cancelNow', $subscription)) {{ trans('messages.subscription.cancel_now') }} @endif @if (\Auth::user()->customer->can('changePlan', $subscription)) $subscription->uid]) }}" class="btn bg-grey-600 mr-10 modal_link" data-size="sm" > {{ trans('messages.subscription.change_plan') }} @endif @elseif ($gateway->isSupportRecurring())

{!! trans('messages.subscription.current_subscription.cancel_at_end_of_period.wording', [ 'plan' => $plan->name, 'money' => Acelle\Library\Tool::format_price($plan->price, $plan->currency->format), 'remain' => $currentPeriodEnd->diffForHumans(), 'end_at' => \Acelle\Library\Tool::formatDate($currentPeriodEnd) ]) !!}

@if (\Auth::user()->customer->can('resume', $subscription)) {{ trans('messages.subscription.resume') }} @endif @if (\Auth::user()->customer->can('cancelNow', $subscription)) {{ trans('messages.subscription.cancel_now') }} @endif @else

{!! trans('messages.subscription.current_subscription.cancel_at_end_of_period_no_recurring_supported.wording', [ 'plan' => $plan->name, 'money' => Acelle\Library\Tool::format_price($plan->price, $plan->currency->format), 'remain' => $currentPeriodEnd->diffForHumans(), 'end_at' => \Acelle\Library\Tool::formatDate($currentPeriodEnd) ]) !!}

@if (\Auth::user()->customer->can('renew', $subscription) && !$hasPendingPaymentForFuture) {{ trans('messages.subscription.renew') }} @endif @if (\Auth::user()->customer->can('cancelNow', $subscription)) {{ trans('messages.subscription.cancel_now') }} @endif @if (\Auth::user()->customer->can('changePlan', $subscription) && !$hasPendingPaymentForFuture) $subscription->uid]) }}" class="btn bg-grey-600 mr-10 modal_link" data-size="sm" > {{ trans('messages.subscription.change_plan') }} @endif @endif @endif

{{ trans('messages.plan_details') }}

@include('plans._details', ['plan' => $plan])
@include('account.subscription._invoices') @endsection