1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-26 12:55:17 +01:00

fix cancelled typo in areas

This commit is contained in:
Kyle Spearrin 2018-07-20 17:00:05 -04:00
parent 05b1c1cf9b
commit 0d4ac29bc7
3 changed files with 5 additions and 5 deletions

View File

@ -99,7 +99,7 @@ namespace Bit.Core.Models.Business
PeriodEndDate = sub.CurrentPeriodEnd;
CancelledDate = sub.CanceledAt;
CancelAtEndDate = sub.CancelAtPeriodEnd;
Cancelled = sub.Status == "cancelled";
Cancelled = sub.Status == "canceled" || sub.Status == "unpaid";
if(sub.Items?.Data != null)
{
Items = sub.Items.Data.Select(i => new BillingSubscriptionItem(i));

View File

@ -164,8 +164,8 @@ namespace Bit.Core.Services
if(sub != null)
{
var cancelAtEndDate = !sub.NeverExpires.GetValueOrDefault();
var cancelled = sub.Status == SubscriptionStatus.CANCELED;
if(!cancelled && !cancelAtEndDate && sub.NextBillingDate.HasValue)
var canceled = sub.Status == SubscriptionStatus.CANCELED;
if(!canceled && !cancelAtEndDate && sub.NextBillingDate.HasValue)
{
return new BillingInfo.BillingInvoice(sub);
}

View File

@ -193,9 +193,9 @@ namespace Bit.Core.Services
throw new GatewayException("Subscription was not found.");
}
if(sub.CanceledAt.HasValue || sub.Status == "cancelled")
if(sub.CanceledAt.HasValue || sub.Status == "canceled" || sub.Status == "unpaid")
{
// Already cancelled
// Already canceled
return;
}