@extends('layouts.core.frontend_no_subscription', [ 'menu' => 'subscription', ]) @section('title', trans('messages.subscription')) @section('head') @endsection @section('page_header')

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

@endsection @section('content') @include("account._menu", [ 'menu' => 'subscription', ])
@if ($subscription->getItsOnlyUnpaidRenewInvoice()) @if (!\Auth::user()->customer->preferredPaymentGatewayCanAutoCharge()) @include('elements._notification', [ 'level' => 'warning', 'message' => trans('messages.have_new_renew_invoice') ]) @else @include('elements._notification', [ 'level' => 'warning', 'message' => trans('messages.have_new_renew_invoice.auto', [ 'date' => Auth::user()->customer->formatDateTime($subscription->getAutoBillingDate(), 'datetime_full'), ]) ]) @if ($subscription->getItsOnlyUnpaidRenewInvoice()->lastTransactionIsFailed()) @include('elements._notification', [ 'level' => 'danger', 'message' => $subscription->getItsOnlyUnpaidRenewInvoice()->lastTransaction()->error ]) @endif @endif @endif @if ($subscription->getItsOnlyUnpaidChangePlanInvoice()) @include('elements._notification', [ 'level' => 'warning', 'message' => trans('messages.have_new_change_plan_invoice', [ 'link' => action('SubscriptionController@payment', [ 'invoice_uid' => $subscription->getItsOnlyUnpaidChangePlanInvoice()->uid, ]), ]) ]) @endif

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

@if ($subscription->isActive()) @if ($subscription->isRecurring())

{!! trans('messages.subscription.current_subscription.wording', [ 'plan' => $plan->name, 'money' => Acelle\Library\Tool::format_price($plan->price, $plan->currency->format), 'remain' => $subscription->current_period_ends_at->diffForHumans(), 'next_on' => Auth::user()->customer->formatDateTime($subscription->current_period_ends_at, 'datetime_full') ]) !!}

@else

{!! 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' => $subscription->current_period_ends_at->diffForHumans(), 'end_at' => Auth::user()->customer->formatDateTime($subscription->current_period_ends_at, 'datetime_full') ]) !!}

@endif @if (\Auth::user()->customer->can('disableRecurring', $subscription)) {{ trans('messages.subscription.disable_recurring') }} @endif @if (\Auth::user()->customer->can('enableRecurring', $subscription)) {{ trans('messages.subscription.enable_recurring') }} @endif @if (\Auth::user()->customer->can('changePlan', $subscription)) $subscription->uid]) }}" class="btn btn-default change_plan_button me-1" data-size="sm" > {{ trans('messages.subscription.change_plan') }} @endif @if (\Auth::user()->customer->can('cancelNow', $subscription)) {{ trans('messages.subscription.cancel_now') }} @endif @endif
@include('subscription._invoices')

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

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

@include('plans._details', ['plan' => $plan])
@if ($subscription->getItsOnlyUnpaidChangePlanInvoice())
@include('invoices.bill', [ 'bill' => $subscription->getItsOnlyUnpaidChangePlanInvoice()->getBillingInfo(), ])
@endif @if ($subscription->getItsOnlyUnpaidRenewInvoice())
@include('invoices.bill', [ 'bill' => $subscription->getItsOnlyUnpaidRenewInvoice()->getBillingInfo(), ]) @if (\Auth::user()->customer->preferredPaymentGatewayCanAutoCharge())

@else @if (!$subscription->getItsOnlyUnpaidRenewInvoice()->getPendingTransaction())
@else
@endif @endif
@endif
@include('account._payment_info', [ 'redirect' => action('SubscriptionController@index'), ])
@endsection