From 27e3f72e048c228b29b0770aed1fd6a2ab59e18d Mon Sep 17 00:00:00 2001 From: Jonas Hendrickx Date: Fri, 3 Jan 2025 10:46:35 +0100 Subject: [PATCH] Revert "[PM-16664] Fix annual pricing for billable providers (#12662)" (#12677) This reverts commit b0f597128720331d7d0e19dcf08256be539f4d09. --- .../provider-subscription.component.html | 13 ++++++------- .../provider-subscription.component.ts | 16 ---------------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html b/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html index d23216cf7c1..50db2cb6a36 100644 --- a/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html +++ b/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html @@ -38,14 +38,12 @@ }} - {{ - ((100 - subscription.discountPercentage) / 100) * getMonthlyCost(i) - | currency: "$" + {{ ((100 - subscription.discountPercentage) / 100) * i.cost | currency: "$" }} /{{ + "month" | i18n }} - / {{ "month" | i18n }}
- {{ getMonthlyCost(i) | currency: "$" }} / {{ "month" | i18n }} + {{ i.cost | currency: "$" }} /{{ "month" | i18n }}
@@ -54,8 +52,9 @@ - Total: - {{ getTotalMonthlyCost() | currency: "$" }} / {{ "month" | i18n }} + Total: {{ totalCost | currency: "$" }} /{{ + "month" | i18n + }} diff --git a/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts b/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts index 8d222ec42bd..a6b27b9f3dd 100644 --- a/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts +++ b/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts @@ -113,20 +113,4 @@ export class ProviderSubscriptionComponent implements OnInit, OnDestroy { } }); } - - protected getMonthlyCost(plan: ProviderPlanResponse): number { - return plan.cadence === "Monthly" ? plan.cost : plan.cost / 12; - } - - protected getDiscountedMonthlyCost(plan: ProviderPlanResponse): number { - return ((100 - this.subscription.discountPercentage) / 100) * this.getMonthlyCost(plan); - } - - protected getTotalMonthlyCost(): number { - let totalCost: number = 0; - for (const plan of this.subscription.plans) { - totalCost += this.getDiscountedMonthlyCost(plan); - } - return totalCost; - } }