@using PowderCoating.Core.Enums @using PowderCoating.Web.Controllers @model RevenueDashboardViewModel @section Styles { } @{ ViewData["Title"] = "Revenue Dashboard"; }

Revenue Dashboard

Based on active paying companies & plan pricing
@* ── Top KPI cards ── *@
Monthly Recurring Revenue
@Model.Mrr.ToString("C0")
MRR
Annual Recurring Revenue
@Model.Arr.ToString("C0")
ARR (MRR × 12)
Avg Revenue / Company
@Model.AvgRevenuePerCompany.ToString("C0")
ARPC per month
Stripe-Managed
@Model.StripeManaged
companies on Stripe billing
@* ── Company Status Breakdown ── *@
Company Status
Active @Model.ActiveCount
Grace Period @Model.GracePeriodCount
Expired @Model.ExpiredCount
Canceled / Inactive @Model.CanceledCount
Comped @Model.CompedCount
Total @Model.TotalCompanies
@* ── Month-over-Month ── *@
Month-over-Month
+@Model.NewThisMonth
New this month
@Model.NewLastMonth
New last month
@Model.ChurnThisMonth
Churn this month

@(Model.NewThisMonth - Model.ChurnThisMonth >= 0 ? "+" : "")@(Model.NewThisMonth - Model.ChurnThisMonth) net
Net company growth this month
@* ── Plan Distribution ── *@
Revenue by Plan
@if (!Model.PlanDistribution.Any()) {
No paying companies on record.
} else { @foreach (var row in Model.PlanDistribution) { }
Plan Co. MRR
@row.PlanName @row.CompanyCount @row.Revenue.ToString("C0")
}
@* ── MRR Trend Chart ── *@
Estimated MRR Trend — Last 12 Months (approximation based on current plan prices × active companies)
@* ── Subscription Alerts ── *@ @if (Model.SubscriptionAlerts.Any()) {
Subscriptions Needing Attention
@foreach (var alert in Model.SubscriptionAlerts) { var statusClass = alert.Status switch { SubscriptionStatus.GracePeriod => "warning text-dark", SubscriptionStatus.Expired => "danger", _ => "info text-dark" }; var daysText = alert.DaysUntilExpiry < 0 ? $"{Math.Abs(alert.DaysUntilExpiry)}d overdue" : $"in {alert.DaysUntilExpiry}d"; }
Company Plan Status End Date Days
@alert.CompanyName @alert.PlanName @alert.Status @Html.Raw(alert.EndDate?.ToString("MM/dd/yyyy") ?? "—") @daysText Manage
@foreach (var alert in Model.SubscriptionAlerts) { var alertStatusClass = alert.Status switch { SubscriptionStatus.GracePeriod => "warning text-dark", SubscriptionStatus.Expired => "danger", _ => "info text-dark" }; var alertDaysText = alert.DaysUntilExpiry < 0 ? $"{Math.Abs(alert.DaysUntilExpiry)}d overdue" : $"in {alert.DaysUntilExpiry}d";
@alert.CompanyName
@alert.PlanName
@alert.Status
End Date @Html.Raw(alert.EndDate?.ToString("MM/dd/yyyy") ?? "—")
Days @alertDaysText
}
}
@section Scripts { }