From f7f681d2a3a94e00ee6d8994ebf8ed1cb6da7adb Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Sun, 22 Feb 2015 18:35:59 +0000 Subject: [PATCH] deal with nan tax rate if user is not in taxable location for subscription dashboard/change plan --- .../web/public/coffee/main/subscription-dashboard.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/web/public/coffee/main/subscription-dashboard.coffee b/services/web/public/coffee/main/subscription-dashboard.coffee index 55834dd4fa..5cf436fa9d 100644 --- a/services/web/public/coffee/main/subscription-dashboard.coffee +++ b/services/web/public/coffee/main/subscription-dashboard.coffee @@ -45,7 +45,10 @@ define [ pricing.plan(planCode, { quantity: 1 }).currency(MultiCurrencyPricing.currencyCode).done (price)-> totalPriceExTax = parseFloat(price.next.total) $scope.$evalAsync () -> - $scope.prices[planCode] = $scope.currencySymbol + (totalPriceExTax + (totalPriceExTax * taxRate)) + taxAmmount = totalPriceExTax * taxRate + if isNaN(taxAmmount) + taxAmmount = 0 + $scope.prices[planCode] = $scope.currencySymbol + (totalPriceExTax + taxAmmount) price = ""