@php use App\Library\Tool; @endphp

{{ __('locale.labels.current_plan') }}

{!! __('locale.subscription.current_plan_information', ['plan_name' => $plan->name]) !!}
{{ $plan->description }}
{!! __('locale.subscription.active_until', ['date' => Tool::formatDateTime($subscription->current_period_ends_at)]) !!}
{{ __('locale.subscription.current_plan_notification') }}
{{ Tool::format_price($plan->price, $plan->currency->format) }} ({{ $plan->displayFrequencyTime(__('locale.labels.per')) }}) @if($plan->is_popular) {{ __('locale.labels.popular') }} @endif
@if($subscription->status == 'new')
@else @endif

{{ __('locale.labels.plan_details') }}

{{ __('locale.labels.plan_name') }} {{$plan->name}}
{{ __('locale.plans.price') }} {{ Tool::format_price($plan->price, $plan->currency->format) }}
{{ __('locale.labels.renew') }} {{ __('locale.labels.every') }} {{ $plan->displayFrequencyTime() }}
{{ __('locale.labels.sms_credit') }} {{ $plan->displayTotalQuota() }}
{{ __('locale.customer.sender_id_verification') }} @if($plan->getOption('sender_id_verification') == 'yes') {{__('locale.labels.yes')}} @else {{__('locale.labels.no')}} @endif
{{ __('locale.labels.api_access') }} @if($plan->getOption('api_access') == 'yes') {{__('locale.labels.yes')}} @else {{__('locale.labels.no')}} @endif
{{ __('locale.plans.max_contact_list') }} {{ $plan->displayMaxList() }}
{{ __('locale.plans.max_contact') }} {{ $plan->displayMaxContact() }}
{{ __('locale.plans.max_contact_per_list') }} {{ $plan->displayMaxContactPerList() }}

{{ __('locale.labels.transactions') }}

{!! __('locale.description.subscription_logs') !!}

@forelse ($subscription->getLogs() as $key => $log) @empty @endforelse
{{ __('locale.labels.created_at') }} {{ __('locale.labels.message') }}
{{ Tool::customerDateTime($log->created_at) }} {!! __('locale.subscription.log_' . $log->type, $log->getData()) !!}
{{ __('locale.datatables.no_results') }}
@forelse ($subscription->getTransactions() as $key => $invoice) @empty @endforelse
{{ __('locale.labels.created_at') }} {{ __('locale.labels.title') }} {{ __('locale.labels.amount') }} {{ __('locale.labels.status') }}
{{ Tool::customerDateTime($invoice->created_at) }} {!! $invoice->title !!} @if ($invoice->description)
{!! $invoice->description !!}
@endif
{{ $invoice->amount }} @if($invoice->status == 'failed') @elseif($invoice->status == 'pending' || $invoice->status == 'plan_change' || $invoice->status == 'renew' ) @elseif($invoice->status == 'auto_charge') @else @endif {{ str_replace('_', ' ', $invoice->status) }}
{{ __('locale.datatables.no_results') }}