1
0
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:
Alex Morask
2025-11-17 10:50:10 -06:00
committed by GitHub
parent 1274fe6562
commit c620ec2aca
2 changed files with 333 additions and 1 deletions

View File

@@ -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);