@extends('layouts.account') @section('title', __('Billing')) @section('heading', __('Billing')) @section('subheading', __('Your plan, your payments and your invoices.')) @section('account') @if (session('error')) {{ session('error') }} @endif

{{ __('Your plan') }}

{{ $plan?->name ?? __('No plan') }}

{{ $plan?->formattedPrice() }} @if ($plan && ! $plan->isFree()) {{ $plan->periodLabel() }} @endif

@if ($subscription) {{ $subscription->status->label() }} @endif
@if ($plan?->features) @endif {{-- A cancellation notice has to say when the plan actually stops, not just that it was cancelled: the two are different dates. --}} @if ($subscription?->endsWithoutRenewal())

{{ __('This plan stays active until :date and will not renew.', [ 'date' => $subscription->ends_at?->format('j F Y'), ]) }}

@csrf
@elseif ($subscription?->ends_at)

{{ __('Renews on :date.', ['date' => $subscription->ends_at->format('j F Y')]) }}

@endif
{{ $subscription ? __('Change plan') : __('Choose a plan') }} @if ($subscription && ! $subscription->isCancelled())
@csrf
@endif

{{ __('Payments') }}

@if ($payments->isEmpty()) @else
@foreach ($payments as $payment) @endforeach
{{ __('Reference') }} {{ __('For') }} {{ __('Amount') }} {{ __('Status') }} {{ __('Actions') }}
{{ $payment->reference }} {{ $payment->created_at->format('j M Y') }} @if ($payment->payable instanceof \App\Models\Subscription) {{ $payment->payable->plan?->name }} @elseif ($payment->payable instanceof \App\Models\ListingPromotion) {{ $payment->payable->type->label() }} @else {{ __('Marketplace services') }} @endif {{ $payment->formattedAmount() }} {{ $payment->status->label() }} @if ($payment->status->isOpen()) {{ __('Finish paying') }} @elseif ($payment->invoice) {{ __('Invoice') }} @endif
@endif
@if ($invoices->isNotEmpty())

{{ __('Invoices') }}

@endif @endsection