mirror of
https://github.com/bitwarden/server
synced 2025-12-22 11:13:27 +00:00
[PM-28250] Fix seat add on defect (#6580)
* Handle seat add on * Remove old price instead
This commit is contained in:
@@ -220,7 +220,8 @@ public class UpcomingInvoiceHandler(
|
||||
[
|
||||
new SubscriptionItemOptions
|
||||
{
|
||||
Id = passwordManagerItem.Id, Price = families.PasswordManager.StripePlanId
|
||||
Id = passwordManagerItem.Id,
|
||||
Price = families.PasswordManager.StripePlanId
|
||||
}
|
||||
],
|
||||
Discounts =
|
||||
@@ -242,6 +243,17 @@ public class UpcomingInvoiceHandler(
|
||||
});
|
||||
}
|
||||
|
||||
var seatAddOnItem = subscription.Items.FirstOrDefault(item => item.Price.Id == "personal-org-seat-annually");
|
||||
|
||||
if (seatAddOnItem != null)
|
||||
{
|
||||
options.Items.Add(new SubscriptionItemOptions
|
||||
{
|
||||
Id = seatAddOnItem.Id,
|
||||
Deleted = true
|
||||
});
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
await organizationRepository.ReplaceAsync(organization);
|
||||
|
||||
Reference in New Issue
Block a user