فهرست منبع

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

Henry Oswald 11 سال پیش
والد
کامیت
f7f681d2a3
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      services/web/public/coffee/main/subscription-dashboard.coffee

+ 4 - 1
services/web/public/coffee/main/subscription-dashboard.coffee

@@ -45,7 +45,10 @@ define [
 			pricing.plan(planCode, { quantity: 1 }).currency(MultiCurrencyPricing.currencyCode).done (price)->
 			pricing.plan(planCode, { quantity: 1 }).currency(MultiCurrencyPricing.currencyCode).done (price)->
 				totalPriceExTax = parseFloat(price.next.total)
 				totalPriceExTax = parseFloat(price.next.total)
 				$scope.$evalAsync () ->
 				$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 = ""
 			price = ""