@extends('layouts.portal') @section('title', __('billing.title') . ' — ' . config('app.name')) @section('page_title', __('billing.title')) @section('page_subtitle', $subscription?->plan?->name ? __('billing.current_plan') . ': ' . $subscription->plan->name : __('billing.choose_plan')) @section('content') @if ($subscription)

{{ __('billing.current_plan') }}

{{ $subscription->plan?->name }}

@if ($subscription->onTrial()) {{ __('billing.trial_ends', ['days' => $subscription->daysRemaining()]) }} @elseif ($subscription->daysRemaining() !== null) {{ __('billing.renews', ['days' => $subscription->daysRemaining()]) }} @endif

@foreach ([ ['patients', $usage['patients'], $subscription->plan?->max_patients], ['menus', $usage['menus'], $subscription->plan?->max_menus_per_month], ['consultants', $usage['consultants'], $subscription->plan?->max_consultants], ] as [$key, $used, $limit])

{{ number_format($used) }} / {{ $limit ? number_format($limit) : __('common.unlimited') }}

{{ __('billing.quota_' . $key . '_label') }}

@endforeach
@endif
{{ __('billing.monthly') }}
{{ __('billing.yearly') }}
@foreach ($plans as $plan) @php $isCurrent = $subscription?->plan_id === $plan->id; @endphp @endforeach
@endsection