This is an automated email from the ASF dual-hosted git repository.
adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new 8d25b0c76 FINERACT-1981: Reverse Interest Refund transaction not
allowed directly with 403 error
8d25b0c76 is described below
commit 8d25b0c765f31a141d1172c7a1b30a57a7bca319
Author: Jose Alberto Hernandez <[email protected]>
AuthorDate: Thu Nov 28 14:13:28 2024 -0500
FINERACT-1981: Reverse Interest Refund transaction not allowed directly
with 403 error
---
.../loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java | 2 +-
.../org/apache/fineract/integrationtests/LoanInterestRefundTest.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
index a0b17cfe8..b8ed5b39c 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
@@ -1426,7 +1426,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl
implements LoanWritePlatf
}
if (transactionToAdjust.isInterestRefund()) {
- throw new
PlatformServiceUnavailableException("error.msg.loan.transaction.update.not.allowed",
+ throw new
GeneralPlatformDomainRuleException("error.msg.loan.transaction.update.not.allowed",
"Interest refund transaction: " + transactionId + " cannot
be reversed or adjusted directly", transactionId);
}
diff --git
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRefundTest.java
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRefundTest.java
index 91578eb62..b9ece7fb9 100644
---
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRefundTest.java
+++
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRefundTest.java
@@ -1240,7 +1240,7 @@ public class LoanInterestRefundTest extends
BaseLoanIntegrationTest {
() -> loanTransactionHelper.reverseLoanTransaction(loanId,
interestRefundTransactionId,
new
PostLoansLoanIdTransactionsTransactionIdRequest().dateFormat(DATETIME_PATTERN)
.transactionDate("22 January
2021").transactionAmount(0.0).locale("en")));
- assertEquals(503, exception.getResponse().code());
+ assertEquals(403, exception.getResponse().code());
assertTrue(exception.getMessage().contains("error.msg.loan.transaction.update.not.allowed"));
Optional<GetLoansLoanIdTransactions> optMerchantIssuedTransaction
= loanDetails.getTransactions().stream()