@extends('layouts.app') @section('title', 'Billing & Subscription') @section('content') {{-- ── Page Header ── --}}

Billing & Subscription

Manage your subscriptions, payments & invoices

{{-- ── Subscriptions ── --}} @if($subscriptions->isNotEmpty())
Your Subscriptions

Each service subscription is managed separately. You can cancel or update any subscription below.

@foreach($subscriptions as $i => $sub)
@if($sub->order?->service_address)

{{ $sub->order->service_address }}

@endif
@if(($sub->order?->service_type === 'nbn' && $sub->order?->product?->service_speed) || ($sub->order?->service_type === 'community_fibre' && $sub->order?->communityFibreProduct?->service_speed)) @endif @if($sub->order && $sub->order->router_status) @else @endif @if($paymentHistories->where('subscription_id', $sub->id)->where('type', 'subscription_initial')->first()) @endif @if($sub->cancel_at_period_end) @elseif(in_array($sub->status, ['active', 'trialing'])) @endif
Product / Service{{ $sub->order?->product_display_name ?? $sub->provider_product_id ?? '—' }}
Service speed{{ $sub->order->service_type === 'nbn' ? $sub->order->product?->service_speed : $sub->order->communityFibreProduct?->service_speed }}
Status {{ ucfirst(str_replace('_', ' ', $sub->status)) }}
Current Period @if($sub->current_period_start && $sub->current_period_end) {{ $sub->current_period_start->format('d/m/Y') }} – {{ $sub->current_period_end->format('d/m/Y') }} @else — @endif
Next Payment Date{{ $sub->current_period_end ? $sub->current_period_end->format('d/m/Y') : '—' }}
Monthly Amount {{ $sub->order ? '$' . number_format($sub->order->product_price ?? 0, 2) . ' / month' : '—' }}
Router Add-on Included
Router Add-on Not Included
Initial Payment {{ $paymentHistories->where('subscription_id', $sub->id)->where('type', 'subscription_initial')->first()->formatted_amount }} {{ strtoupper($paymentHistories->where('subscription_id', $sub->id)->where('type', 'subscription_initial')->first()->currency) }}
Cancellation This subscription will cancel at the end of the current period.
Actions
@endforeach @else

No Subscriptions Yet

You do not have any subscriptions yet. When you choose Monthly Auto Payment during qualification and complete payment, your plans will appear here. You can have multiple subscriptions, each managed separately.

@endif {{-- ── Payment History ── --}}

Payment History & Invoices

@if($paymentHistories->count())
@foreach($paymentHistories as $i => $ph) @endforeach
Date Type Amount Status Invoice
{{ $ph->created_at->format('d/m/Y H:i') }} {{ ucfirst(str_replace('_', ' ', $ph->type)) }} @if($ph->amount < 1000) {{-- If amount is less than 1000, it's likely stored in dollars, convert to cents --}} ${{ number_format($ph->amount, 2) }} {{ strtoupper($ph->currency) }} @else {{-- Normal cents to dollars conversion --}} {{ $ph->formatted_amount }} {{ strtoupper($ph->currency) }} @endif {{ ucfirst(str_replace('_', ' ', $ph->status)) }} @if($ph->invoice_hosted_url || $ph->invoice_pdf_url || $ph->stripe_invoice_id) @if($ph->invoice_hosted_url) View Invoice @endif @if($ph->invoice_pdf_url || $ph->stripe_invoice_id) Download PDF @endif @else @if($ph->type === 'router_charge' && $ph->order_id) View Invoice Download PDF @else @endif @endif
{{ $paymentHistories->links('pagination::bootstrap-4') }}
@else

No payment history yet. Subscription and one-time payments will appear here after you place an order.

@endif
{{-- ── Back Buttons ── --}}
Back to Dashboard My Services
{{-- ── Update Card Modal ── --}} {{-- Router Payment Modal --}} @endsection @push('styles') @endpush @push('scripts') @endpush @push('styles') @endpush @push('scripts') @endpush