Skip to content

Commit

Permalink
(bug) manager cannot pay a subscription(payment schedule) with a wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
gnepud committed Sep 3, 2024
1 parent 081c77b commit 6a884d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/javascript/directives/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down

0 comments on commit 6a884d6

Please sign in to comment.