From 1008a6dd1b11bf2b99cbd072811b7918ed9ace16 Mon Sep 17 00:00:00 2001 From: Peng DU Date: Wed, 21 Sep 2016 13:09:10 +0200 Subject: [PATCH] fix bug: cant show correct payment modal when pay by wallet and code promo --- app/assets/javascripts/controllers/plans.coffee.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/controllers/plans.coffee.erb b/app/assets/javascripts/controllers/plans.coffee.erb index 8fe90c35d..14c74443e 100644 --- a/app/assets/javascripts/controllers/plans.coffee.erb +++ b/app/assets/javascripts/controllers/plans.coffee.erb @@ -83,7 +83,7 @@ Application.Controllers.controller "PlansIndexController", ["$scope", "$rootScop ## $scope.openSubscribePlanModal = -> Wallet.getWalletByUser {user_id: $scope.ctrl.member.id}, (wallet) -> - amountToPay = helpers.getAmountToPay($scope.selectedPlan.amount, wallet.amount) + amountToPay = helpers.getAmountToPay($scope.cart.total, wallet.amount) if $scope.currentUser.role isnt 'admin' and amountToPay > 0 payByStripe() else