{{ __('Subscription Renewals Report') }}

{{ __('Export CSV') }}

{{ __('Filter by Date Range') }}

{{ __('Total Renewals') }}

{{ $totalRenewals }}

{{ __('Total Revenue') }}

${{ number_format($totalRevenue, 2) }}

{{ __('Failed Renewals') }}

{{ $totalFailures }}

{{ __('Failure Rate') }}

{{ $failureRate }}%

{{ __('Renewals by Day') }}

{{ __('Revenue by Day') }}

{{ __('Upcoming Renewals (Next 30 Days)') }}

@if($upcomingRenewals->count() > 0)
@foreach($upcomingRenewals as $subscription) @endforeach
{{ __('ID') }} {{ __('User') }} {{ __('Plan') }} {{ __('Expires') }} {{ __('Amount') }} {{ __('Actions') }}
{{ $subscription->id }} @if($subscription->user) {{ $subscription->user->name }} @else {{ __('N/A') }} @endif {{ $subscription->plan ? $subscription->plan->name : __('N/A') }} {{ $subscription->ends_at->format('M d, Y') }} {{ $subscription->ends_at->diffForHumans() }} ${{ number_format($subscription->is_discounted && $subscription->discounted_price ? $subscription->discounted_price : ($subscription->plan ? $subscription->plan->price : 0), 2) }} {{ __('View') }}
@else

{{ __('No upcoming renewals in the next 30 days.') }}

@endif

{{ __('Recent Transactions') }}

@if($item->status === 'success') {{ __('Success') }} @elseif($item->status === 'failed') {{ __('Failed') }} @else {{ __('Pending') }} @endif ${{ number_format($item->amount, 2) }} {{ $item->created_at->format('M d, Y H:i') }}
// Pass chart data to the JavaScript file window.chartData = { dates: {!! $chartDates !!}, counts: {!! $chartCounts !!}, revenue: {!! $chartRevenue !!} };