@extends('layouts.app') @section('title', 'Billing - ' . setting('system_name')) @section('content') @php $state = $tenant->billingState(); $days = $tenant->daysLeft(); $tone = match ($state) { 'expired', 'suspended', 'grace' => 'danger', 'due_soon' => 'warning', default => 'success' }; $current = $tenant->plan && isset($plans[$tenant->plan]) ? $tenant->plan : null; $price = $tenant->monthlyPrice(); $pending = $submissions->where('status', 'pending'); $brand = [ 'mpamba' => ['#16a34a', '#f0fdf4', 'bi-phone-fill'], 'airtel_money' => ['#dc2626', '#fef2f2', 'bi-phone'], 'national_bank' => ['#1d4ed8', '#eff6ff', 'bi-bank2'], 'standard_bank' => ['#0c4a6e', '#f0f9ff', 'bi-bank'], ]; $smsPct = $usage['sms_limit'] > 0 ? min(100, round($usage['sms_used'] / $usage['sms_limit'] * 100)) : 0; $bar = fn ($pct) => $pct >= 90 ? 'danger' : ($pct >= 70 ? 'warning' : 'primary'); $tabs = ['overview' => ['bi-speedometer2', 'Overview'], 'plans' => ['bi-layers', 'Plans'], 'pay' => ['bi-wallet2', 'Pay'], 'history' => ['bi-clock-history', 'History']]; @endphp
Your plan, what you are using, and paying for the system.
A change of plan starts when your payment for it is approved. Prices in Malawi Kwacha.
To any of these. Use your shop code {{ $tenant->slug }} as the reference if you can.
@foreach($accounts as $key => $account) @php [$color, $soft, $icon] = $brand[$key] ?? ['#475569', '#f8fafc', $account['icon'] ?? 'bi-cash']; if (!empty($account['color'])) { [$color, $soft, $icon] = [$account['color'], '#f8fafc', $account['icon'] ?? $icon]; } @endphpQuestions? @if($contact['phone']){{ $contact['phone'] }}@endif @if($contact['email']) · {{ $contact['email'] }}@endif
@endifA screenshot of the confirmation SMS, or a photo or PDF of the bank slip.
@if($pending->isNotEmpty())None sent yet.
@endforelse| Paid on | Period | Plan | Amount |
|---|---|---|---|
| {{ $payment->paid_on->format('d M Y') }} {{ $payment->method ?? '' }}{{ $payment->reference ? ' · ' . $payment->reference : '' }} |
{{ $payment->period_from->format('d M Y') }} – {{ $payment->period_to->format('d M Y') }} | {{ config("tenancy.plans.{$payment->plan}.name", ucfirst((string) $payment->plan) ?: '—') }} | {{ formatCurrency($payment->amount) }} |
| No payments recorded yet. | |||