@extends('client.layouts.app') @section('title', __('client.services.upgrade_downgrade_title')) @section('content') @if(!isset($upgrades) || $upgrades->isEmpty())

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

← {{ __('client.services.back_to_service') }}
@else
{{ __('client.services.currently_on') }}: {{ $service->product?->name ?? 'Service' }} — {{ display_money_fmt($service->amount) }}/{{ $service->billing_cycle }}
{{ __('client.services.select_new_plan') }}
@csrf @if($errors->any())
    @foreach($errors->all() as $e)
  • {{ $e }}
  • @endforeach
@endif
@foreach($upgrades as $product) @php // The price for the term this customer is on, worked out // where the customer is known rather than guessed at here. $price = $upgradePrices[$product->id] ?? null; $cycle = strtolower($upgradeCycle ?? ''); @endphp @endforeach
{{ __('common.actions.cancel') }}
@endif @if(($optionGroups ?? collect())->flatMap->options->filter(fn ($o) => $o->subs->isNotEmpty())->isNotEmpty()) {{-- Raise the options on this same package: more RAM, a bigger disk. Charged for the days left in the cycle. --}}
{{ __('client.services.options_title') }}

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

@csrf @foreach($optionGroups as $group) @foreach($group->options as $option) @continue($option->subs->isEmpty())
@if($option->isQuantity()) qty_maximum) max="{{ $option->qty_maximum }}" @endif> {{ display_money_fmt($option->subs->first()?->priceFor($upgradeCycle) ?? 0) }} {{ __('client.cart.per_unit') }} @elseif($option->isCheckbox()) @else @endif
@endforeach @endforeach
@endif @endsection