@extends('portal.ninja2020.layout.app')
@section('meta_title', ctrans('texts.subscription'))
@section('body')
{{ $subscription->name }}
-
{{ ctrans('texts.start_date') }}
-
{{ $invoice->translateDate($invoice->start_date, $invoice->client->date_format(), $invoice->client->locale()) }}
-
{{ ctrans('texts.next_send_date') }}
-
{{ $invoice->translateDate(\Carbon\Carbon::parse($invoice->next_send_date)->subSeconds($invoice->client->timezone_offset()), $invoice->client->date_format(), $invoice->client->locale()) }}
-
{{ ctrans('texts.frequency') }}
-
{{ \App\Models\RecurringInvoice::frequencyForKey($invoice->frequency_id) }}
-
{{ ctrans('texts.cycles_remaining') }}
-
{{ $invoice->remaining_cycles == '-1' ? ctrans('texts.endless') : $invoice->remaining_cycles }}
@if($invoice->remaining_cycles == '-1') ∞ @endif
-
{{ ctrans('texts.amount') }}
{{ \App\Utils\Number::formatMoney($invoice->amount, $invoice->client) }}
@include('portal.ninja2020.components.entity-documents', ['entity' => $invoice])
@if($invoice->auto_bill === 'optin' || $invoice->auto_bill === 'optout')
{{ ctrans('texts.auto_bill') }}
{{ ctrans('texts.auto_bill_option')}}
@livewire('recurring-invoices.update-auto-billing', ['invoice' => $invoice])
@endif
@if($invoice->subscription && $invoice->subscription?->allow_cancellation && $invoice->status_id == 2)
{{ ctrans('texts.cancellation') }}
@include('portal.ninja2020.recurring_invoices.includes.modals.cancellation')
@endif
@if($invoice->subscription && $invoice->subscription->allow_plan_changes && count($invoice->subscription->service()->getPlans()) > 0)
{{ ctrans('texts.change_plan') }}
{{ ctrans('texts.change_plan_description') }}
@endif
@endsection