From 5cffdff65a675fe2488dad52cc7b0d50600ac27c Mon Sep 17 00:00:00 2001 From: Nicolas Florentin Date: Mon, 2 May 2022 14:16:55 +0200 Subject: [PATCH] when generating an avoir, the option "by_wallet" is not present anymore if wallet module is off --- CHANGELOG.md | 2 ++ app/frontend/src/javascript/controllers/admin/invoices.js | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 211065f19..7f8533abc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## next deploy +- when generating an avoir, the option "by_wallet" is not present anymore if wallet module is off + ## v5.3.13 2022 May 02 - Fix a bug: With PayZen, when there was more than one transaction (for ex: 1 failed atempt + 1 successful atemp), the order was not considered PAID because only the first transaction was checked diff --git a/app/frontend/src/javascript/controllers/admin/invoices.js b/app/frontend/src/javascript/controllers/admin/invoices.js index 0638be15a..2debeafe4 100644 --- a/app/frontend/src/javascript/controllers/admin/invoices.js +++ b/app/frontend/src/javascript/controllers/admin/invoices.js @@ -1198,9 +1198,12 @@ Application.Controllers.controller('AvoirModalController', ['$scope', '$uibModal { name: _t('app.admin.invoices.by_cash'), value: 'cash' }, { name: _t('app.admin.invoices.by_cheque'), value: 'cheque' }, { name: _t('app.admin.invoices.by_transfer'), value: 'transfer' }, - { name: _t('app.admin.invoices.by_wallet'), value: 'wallet' } ]; + if (Fablab.walletModule) { + $scope.avoirModes.push({ name: _t('app.admin.invoices.by_wallet'), value: 'wallet' }); + } + // If a subscription was took with the current invoice, should it be canceled or not $scope.subscriptionExpireOptions = {}; $scope.subscriptionExpireOptions[_t('app.shared.buttons.yes')] = true;