1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-28 09:24:24 +01:00

(bug) manager cannot pay a subscription(payment schedule) with a wallet

This commit is contained in:
Du Peng 2024-09-03 17:28:05 +02:00
parent 081c77bd45
commit 6a884d6f4f
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -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) ||