1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-06 18:43:25 +00:00

Ac 3030 discount is not included in the pricing breakdown when annual plan (#11126)

* Resolve the discount issues

* Resolve the payment cvv alignment

* Resolve the wrong message for secrets manager

* Remove unused commented code

* resolve the display message bug on sm flow
This commit is contained in:
cyprain-okeke
2024-09-18 16:22:04 +01:00
committed by GitHub
parent f6e51ef024
commit 727fbb6731
4 changed files with 26 additions and 77 deletions

View File

@@ -509,10 +509,7 @@ export class ChangePlanDialogComponent implements OnInit, OnDestroy {
}
additionalStoragePriceMonthly(selectedPlan: PlanResponse) {
if (!selectedPlan.isAnnual) {
return selectedPlan.PasswordManager.additionalStoragePricePerGb;
}
return selectedPlan.PasswordManager.additionalStoragePricePerGb / 12;
return selectedPlan.PasswordManager.additionalStoragePricePerGb;
}
additionalServiceAccountTotal(plan: PlanResponse): number {
@@ -834,12 +831,7 @@ export class ChangePlanDialogComponent implements OnInit, OnDestroy {
}
calculateTotalAppliedDiscount(total: number) {
const discountPercent =
this.selectedInterval == PlanInterval.Annually
? this.discountPercentage + this.discountPercentageFromSub
: this.discountPercentageFromSub;
const discountedTotal = total / (1 - discountPercent / 100);
const discountedTotal = total * (this.discountPercentageFromSub / 100);
return discountedTotal;
}