1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

initial commit (#3874)

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
This commit is contained in:
cyprain-okeke 2024-03-07 14:04:08 +01:00 committed by GitHub
parent 9d7e1ccc41
commit 02d2abd172
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -800,7 +800,8 @@ public class StripePaymentService : IPaymentService
SubscriptionBillingCycleAnchor = SubscriptionBillingCycleAnchor.Now SubscriptionBillingCycleAnchor = SubscriptionBillingCycleAnchor.Now
}); });
immediatelyInvoice = upcomingInvoiceWithChanges.AmountRemaining >= 50000; var isAnnualPlan = sub?.Items?.Data.FirstOrDefault()?.Plan?.Interval == "year";
immediatelyInvoice = isAnnualPlan && upcomingInvoiceWithChanges.AmountRemaining >= 50000;
subUpdateOptions.BillingCycleAnchor = immediatelyInvoice subUpdateOptions.BillingCycleAnchor = immediatelyInvoice
? SubscriptionBillingCycleAnchor.Now ? SubscriptionBillingCycleAnchor.Now