@extends('layouts.app') @section('title', 'SMS Packages') @section('page', 'billing') @php $statusVariant = fn ($s) => match ($s) { 'Active' => 'success', 'Pending' => 'warning', 'Rejected' => 'danger', default => 'secondary', }; @endphp @section('content') @if (session('success')) {{ session('success') }} @endif @if ($errors->any()) {{ $errors->first() }} @endif

SMS Packages

Top up SMS credits for campaigns and customer alerts.

@if ($packages->isEmpty())
No packages available yet.
@else
@foreach ($packages as $package)

{{ $package->name }}

{{ number_format((int) $package->sms_count) }} SMS

{{ currency_symbol() }} {{ number_format((float) $package->price, 0) }} /=
SMS Cost: {{ currency_code() }} {{ number_format((float) $package->sms_cost, 2) }}/-
@endforeach
@endif

Total active SMS

{{ number_format((int) ($totalActiveSms ?? 0)) }}

From activated packs

Pending

{{ $topups->where('status', 'Pending')->count() }}

Awaiting confirmation

Date Package Amount Status Total SMS Requested by Actions @forelse ($topups as $topup) {{ $topup->created_at?->format('Y-m-d H:i') ?? '—' }} {{ $topup->package_name }} {{ money($topup->price) }} {{ $topup->status }} @if ($topup->isActive()) {{ number_format((int) $topup->sms_count) }} @else — @endif {{ $topup->requester?->name ?? '—' }} @if (($canManage ?? false) && $topup->isPending())
@csrf
@else — @endif @empty No top-up requests yet. @endforelse
@endsection @push('styles') @endpush @push('scripts') @if (session('whatsapp_url')) @endif @endpush