diff --git a/CHANGELOG.md b/CHANGELOG.md index 0337dafb2..01574ac19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next release +- Fix a bug: manager cannot pay a subscription(payment schedule) with a wallet + ## v6.3.31 2024 July 22 - updates translations diff --git a/app/frontend/src/javascript/directives/cart.js b/app/frontend/src/javascript/directives/cart.js index 5e89d5bc5..b301d4ffe 100644 --- a/app/frontend/src/javascript/directives/cart.js +++ b/app/frontend/src/javascript/directives/cart.js @@ -840,7 +840,7 @@ Application.Directives.directive('cart', ['$rootScope', '$uibModal', 'dialogs', return Wallet.getWalletByUser({ user_id: $scope.user.id }, function (wallet) { const amountToPay = helpers.getAmountToPay($scope.amountTotal, wallet.amount); if ((AuthService.isAuthorized(['member']) && (amountToPay > 0 || (amountToPay === 0 && hasOtherDeadlines()))) || - ($scope.user.id === $rootScope.currentUser.id && amountToPay > 0)) { + (AuthService.isAuthorized(['admin', 'manager']) && $scope.user.id === $rootScope.currentUser.id && (amountToPay > 0 || (amountToPay === 0 && hasOtherDeadlines())))) { return payOnline(items); } else { if ((AuthService.isAuthorized(['admin', 'manager']) && $scope.user.id !== $rootScope.currentUser.id) ||