This is an automated email from the ASF dual-hosted git repository.

arnold 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 db480f421 FINERACT-1841 Fix Duplicated journal entries when a 
chargeback happens
db480f421 is described below

commit db480f4213ddca6ad1058444d76c56e8961134b7
Author: Jose Alberto Hernandez <[email protected]>
AuthorDate: Mon Dec 26 19:51:20 2022 -0600

    FINERACT-1841 Fix Duplicated journal entries when a chargeback happens
---
 .../service/LoanWritePlatformServiceJpaRepositoryImpl.java          | 6 +++---
 1 file changed, 3 insertions(+), 3 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 264470d93..67cf466ca 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
@@ -1226,9 +1226,6 @@ public class LoanWritePlatformServiceJpaRepositoryImpl 
implements LoanWritePlatf
                     transactionId);
         }
 
-        final List<Long> existingTransactionIds = new ArrayList<>();
-        final List<Long> existingReversedTransactionIds = new ArrayList<>();
-
         checkClientOrGroupActive(loan);
 
         if (loanTransaction.isReversed()) {
@@ -1244,6 +1241,9 @@ public class LoanWritePlatformServiceJpaRepositoryImpl 
implements LoanWritePlatf
                     transactionId);
         }
 
+        final List<Long> existingTransactionIds = 
loan.findExistingTransactionIds();
+        final List<Long> existingReversedTransactionIds = 
loan.findExistingReversedTransactionIds();
+
         businessEventNotifierService.notifyPreBusinessEvent(new 
LoanChargebackTransactionBusinessEvent(loanTransaction));
 
         final LocalDate transactionDate = DateUtils.getBusinessLocalDate();

Reply via email to