@extends('layouts/client') @section('title', __('client.services.renewals.index')) @section('content') {{-- Banner --}}

{{ $service->name }}

{{ __('client.services.renewals.index') }}

{{-- Main content --}}
@include('shared/alerts') {{-- Renewals history --}}

{{ __('client.services.renewals.index') }}

{{ __('client.services.renewals.manage') }}

@if ($renewals->isEmpty()) @endif @foreach($renewals as $renewal) @if ($renewal->invoice == null) @continue @endif @endforeach
{{ __('client.services.renewals.period') }} {{ __('global.invoice') }} {{ __('store.price') }} {{ __('client.services.renewals.date') }}

{{ __('global.no_results') }}

#{{ $renewal->period }} {{ $renewal->invoice->identifier() }} {{ formatted_price($renewal->invoice->subtotal, $renewal->invoice->currency) }} {{ $renewal->start_date->format('d/m/y') }} – {{ $renewal->end_date ? $renewal->end_date->format('d/m/y') : 'Undefined' }} {{ __('global.view') }}
{{-- Subscription management --}} @if ($service->canSubscribe())

{{ __('client.services.subscription.index') }}

@if ($service->getSubscription()->isActive())

{{ __('client.services.subscription.enabled', ['date' => $service->getSubscription()->getNextPaymentDate()]) }}

@endif
@csrf @if ($customer->getPaymentMethodsArray()->isNotEmpty())
@include('admin/shared/select', ['name' => 'paymentmethod', 'options' => $customer->getPaymentMethodsArray(), 'label' => __('client.payment-methods.paymentmethod'), 'value' => $service->getSubscription()->paymentmethod_id])
@include('admin/shared/input', ['type' => 'number', 'name' => 'billing_day', 'label' => __('client.services.subscription.billing_day'), 'help' => __('client.services.subscription.billing_day_help'), 'attributes' => ['min' => 1, 'max' => 28], 'value' => $service->getSubscription()->billing_day ?? 5])
@if ($service->getSubscription()->isActive()) @endif
@else

{!! __('client.services.subscription.add_payments_method', ['url' => route('front.payment-methods.index')]) !!}

@endif
@endif {{-- Billing cycle --}} @if (collect($service->pricingAvailable())->count() > 1)

{{ __('client.services.managerenew') }}

@csrf
@foreach(collect($service->pricingAvailable()) as $pricing) @endforeach
@foreach ($gateways as $gateway) @endforeach
@else

{{ __('client.services.renewals.not_authorized_to_change_billing') }}

@endif
{{-- Sidebar --}}
{{ __('client.services.managebtn') }} @if ($service->canUpgrade()) {{ __('client.services.upgradeservice') }} @endif @if ($service->configoptions->isNotEmpty()) {{ __('client.services.manageoptions') }} @endif @if (auth('admin')->check()) {{ __('client.services.manageserviceonadmin') }} @endif {{-- Service info card --}}

{{ __('client.services.show') }}

{{ $service->name }}

@if ($service->server_id != null)

{{ __('global.server') }}

{{ $service->server->name }}

@endif @if ($service->expires_at != null)

{{ __('client.services.expire_date') }}

@endif

{{ __('store.price') }}

{{ formatted_price($service->getBillingPrice()->displayPrice(), $service->currency) }} /{{ $service->recurring()['unit'] }}

@endsection