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

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

@endsection @section('content') @include("account._menu")
@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->getDueDate(), 'date_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->cancelled()) {{-- @if (\Auth::user()->customer->supportsAutoBilling())

{!! trans('messages.subscription.current_subscription.recurring.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, 'date_full') ]) !!}

@else --}}

{!! 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, 'date_full') ]) !!}

{{-- @endif --}} @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, 'date_full') ]) !!}

@endif @if (\Auth::user()->customer->can('cancel', $subscription)) {{ trans('messages.subscription.cancel') }} @endif @if (\Auth::user()->customer->can('resume', $subscription)) {{ trans('messages.subscription.resume') }} @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])
@include('invoices.bill', [ 'bill' => $subscription->getUpcomingBillingInfo(), 'payButton' => true, ])
@include('account._payment_info', [ 'redirect' => action('SubscriptionController@index'), ])
@endsection