From e916cec6b514fdd62eae123c70ae629ca6f5b776 Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Fri, 18 Aug 2023 08:47:36 +1000 Subject: [PATCH] [AC-1599] Fix Secrets Manager cost subtotal when creating an organization (#6044) * Fix service account cost not included in SM subtotal * Simplify logic --- .../settings/organization-plans.component.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/apps/web/src/app/billing/settings/organization-plans.component.ts b/apps/web/src/app/billing/settings/organization-plans.component.ts index 7d9f76708e..5c6359af95 100644 --- a/apps/web/src/app/billing/settings/organization-plans.component.ts +++ b/apps/web/src/app/billing/settings/organization-plans.component.ts @@ -314,16 +314,11 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy { return 0; } - let subTotal = plan.basePrice; - if (plan.hasAdditionalSeatsOption && formValues.userSeats) { - subTotal += this.seatTotal(plan, formValues.userSeats); - } - - if (plan.hasAdditionalStorageOption && formValues.additionalServiceAccounts) { - subTotal += this.additionalServiceAccountTotal(this.selectedPlan); - } - - return subTotal; + return ( + plan.basePrice + + this.seatTotal(plan, formValues.userSeats) + + this.additionalServiceAccountTotal(plan) + ); } get freeTrial() {