@extends('layouts.admin') @section('title', 'Billing') @section('breadcrumb') Dashboard Billing @endsection @section('content')
{{-- Current Plan --}}
Current Plan
@if($subscription)
{{ $subscription->plan->display_name }}
{{ ucfirst($subscription->status) }} @if($subscription->isTrialing()) Trial ends {{ $subscription->trial_ends_at->format('d M Y') }} · {{ $subscription->daysUntilExpiry() }} days left @elseif($subscription->isActive()) Renews {{ $subscription->current_period_end?->format('d M Y') }} @elseif($subscription->isPastDue()) Payment overdue — grace period ends {{ $subscription->grace_period_ends_at?->format('d M Y') }} @endif
@else
No active subscription
Choose a plan below to get started
@endif
@if($subscription?->isActive() || $subscription?->isTrialing())
₹{{ number_format($subscription->billing_interval === 'yearly' ? $subscription->plan->price_yearly : $subscription->plan->price_monthly, 0) }}
per {{ $subscription->billing_interval === 'yearly' ? 'year' : 'month' }} + 18% GST
@endif
@if($subscription && !$subscription->isCancelled())
@csrf
@endif
{{-- Usage summary --}}
Usage This Month
@foreach($usageMeters as $meter)
{{ $meter['label'] }} @if($meter['is_unlimited']) Unlimited @else {{ number_format($meter['used']) }} / {{ $meter['label_limit'] }} @endif
@if(!$meter['is_unlimited'])
@if($meter['at_limit'])
Limit reached — upgrade to continue
@endif @endif
@endforeach
{{-- Plan Comparison --}}

Available Plans

Monthly Yearly (save ~20%)
@foreach($plans as $plan)
@if($subscription?->plan_id === $plan->id)
Current Plan
@endif
{{ $plan->display_name }}
{{ $plan->description }}
@php $f = $plan->features @endphp
{{ $f['max_pages'] == -1 ? 'Unlimited' : $f['max_pages'] }} pages
{{ $f['max_posts'] == -1 ? 'Unlimited' : $f['max_posts'] }} posts
{{ $f['max_users'] == -1 ? 'Unlimited' : $f['max_users'] }} team members
@if($f['crm_module'])
CRM module
@endif @if($f['pdf_reports'])
PDF reports
@endif @if($f['custom_domain'])
Custom domain
@endif @if($f['white_label'])
White-label
@endif
@if($plan->price_monthly > 0) @if($subscription?->plan_id === $plan->id) @else @endif @else Contact Us @endif
@endforeach
{{-- Invoices --}}

Invoice History

@forelse($invoices as $invoice) @empty @endforelse
Invoice Period Amount Status Date Download
{{ $invoice->invoice_number }} {{ $invoice->period_start?->format('M Y') ?? '—' }} ₹{{ number_format($invoice->amount / 100, 2) }} {{ ucfirst($invoice->status) }} {{ $invoice->created_at->format('d M Y') }} @if($invoice->pdf_path) PDF @else Pending @endif
No invoices yet.
{{ $invoices->links() }}
@endsection