@using PowderCoating.Core.Entities @using PowderCoating.Core.Enums @model Company @{ ViewData["Title"] = $"Manage – {Model.CompanyName}"; var planConfigs = (dynamic)ViewBag.PlanConfigs; string PlanName(int plan) { foreach (var p in planConfigs) if (p.Plan == plan) return p.DisplayName; return plan.ToString(); } PowderCoating.Core.Entities.SubscriptionPlanConfig? currentPlanConfig = null; foreach (var p in planConfigs) { if (p.Plan == Model.SubscriptionPlan) { currentPlanConfig = p; break; } } string PlanLimit(int value) => value == -1 ? "Unlimited" : value == 0 ? "None" : value.ToString(); }
Back Edit Company

@Model.CompanyName

@if (Model.IsComped) { Comped } @if (!Model.IsActive) { Inactive }
@if (TempData["Success"] != null) { }
@* Usage stats *@
Usage
Jobs
@ViewBag.JobCount
Customers
@ViewBag.CustomerCount
Users
@ViewBag.UserCount
Stripe Customer
@Html.Raw(Model.StripeCustomerId ?? "—")
Stripe Sub
@Html.Raw(Model.StripeSubscriptionId ?? "—")
@* Quick extend buttons *@
Quick Extend
@foreach (var days in new[] { 7, 14, 30, 90 }) {
@Html.AntiForgeryToken()
}
@* Edit form *@
@Html.AntiForgeryToken() @* Comped / Internal card — prominent *@
Comped / Internal Access

When enabled: all plan limits become unlimited, expiry banners and lockouts are suppressed, and the subscription end date is ignored. Use for internal/demo tenants.

@* Subscription settings *@
Subscription Settings
Leave blank for no expiry.
@* Per-company limit overrides *@
Plan Limit Overrides

Leave blank to use the plan default. Enter -1 for unlimited. @if (currentPlanConfig != null) { Current plan: @currentPlanConfig.DisplayName }

@if (currentPlanConfig != null) {
Plan default: @PlanLimit(currentPlanConfig.MaxUsers)
}
@if (currentPlanConfig != null) {
Plan default: @PlanLimit(currentPlanConfig.MaxActiveJobs)
}
@if (currentPlanConfig != null) {
Plan default: @PlanLimit(currentPlanConfig.MaxCustomers)
}
@if (currentPlanConfig != null) {
Plan default: @PlanLimit(currentPlanConfig.MaxQuotes)
}
@if (currentPlanConfig != null) {
Plan default: @PlanLimit(currentPlanConfig.MaxCatalogItems)
}
@if (currentPlanConfig != null) {
Plan default: @PlanLimit(currentPlanConfig.MaxJobPhotos)
}
@if (currentPlanConfig != null) {
Plan default: @PlanLimit(currentPlanConfig.MaxQuotePhotos)
}
Cancel
@* Feature Flags *@
Feature Flags
@Html.AntiForgeryToken()
Allow this company to use AI photo quoting.
Allow AI-powered inventory lookups.
Override: grants access regardless of plan tier.
0 = disabled, -1 = unlimited, blank = plan default.
@* Stripe Payment History + Refunds *@ @if (!string.IsNullOrEmpty(Model.StripeCustomerId)) {
Stripe Payment History

Click Load to fetch payment history from Stripe.

} @* Recent audit entries for this company *@
Recent Audit Activity
View All
@section Scripts { }