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:
parent
05b1c1cf9b
commit
0d4ac29bc7
@ -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));
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user