deal with nan tax rate if user is not in taxable location for subscription dashboard/change plan

This commit is contained in:
Henry Oswald 2015-02-22 18:35:59 +00:00
parent d112ad22a8
commit f7f681d2a3

View file

@ -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 = ""