From 8c32765f4c45dfa13903833c4508ab0397b0403f Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 4 Dec 2017 20:58:23 -0500 Subject: [PATCH] custom plans with expiration are not trials --- src/Core/Models/Business/OrganizationLicense.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Core/Models/Business/OrganizationLicense.cs b/src/Core/Models/Business/OrganizationLicense.cs index cc4ab89699..70bb627369 100644 --- a/src/Core/Models/Business/OrganizationLicense.cs +++ b/src/Core/Models/Business/OrganizationLicense.cs @@ -41,8 +41,16 @@ namespace Bit.Core.Models.Business if(billingInfo?.Subscription == null) { - Expires = Refresh = Issued.AddDays(7); - Trial = true; + if(org.PlanType == PlanType.Custom && org.ExpirationDate.HasValue) + { + Expires = Refresh = org.ExpirationDate.Value; + Trial = false; + } + else + { + Expires = Refresh = Issued.AddDays(7); + Trial = true; + } } else if(billingInfo.Subscription.TrialEndDate.HasValue && billingInfo.Subscription.TrialEndDate.Value > DateTime.UtcNow)