From 9b6206d6957e26154e2e326574bdb75840a7ee75 Mon Sep 17 00:00:00 2001 From: Mwesigye John Bosco Date: Thu, 19 Dec 2024 16:15:58 +0300 Subject: [PATCH 1/2] CEV-174 Fix Interest Posting and Re-Investment --- .../apache/fineract/portfolio/savings/domain/SavingsHelper.java | 1 + 1 file changed, 1 insertion(+) diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsHelper.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsHelper.java index ad5bbfa82b..0a13f85d52 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsHelper.java @@ -84,6 +84,7 @@ public List determineInterestPostingPeriods(final LocalDate s log.info( " --startInterestCalculationLocalDate-- {} -- Period Date is Huge here --interestPostingUpToDate-> {} ---interestPostingLocalDate->{}", startInterestCalculationLocalDate, interestPostingUpToDate, interestPostingLocalDate); + break; } } else { periodEndDate = interestPostingLocalDate.minusDays(1); From 527f360b0ef7de152a3e41b67bebf233b9efae4d Mon Sep 17 00:00:00 2001 From: Mwesigye John Bosco Date: Thu, 19 Dec 2024 17:52:29 +0300 Subject: [PATCH 2/2] CEV-174 Fix Interest Posting and Re-Investment --- .../savings/domain/DepositAccountTermAndPreClosure.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountTermAndPreClosure.java b/fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountTermAndPreClosure.java index 31240765df..064dc36e8e 100644 --- a/fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountTermAndPreClosure.java +++ b/fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountTermAndPreClosure.java @@ -298,10 +298,10 @@ public DepositAccountTermAndPreClosure copy(BigDecimal depositAmount) { final DepositPreClosureDetail preClosureDetail = this.preClosureDetail.copy(); final DepositTermDetail depositTermDetail = this.depositTermDetail.copy(); final LocalDate expectedFirstDepositOnDate = null; - final Boolean transferInterestToLinkedAccount = false; + final Boolean transferInterestToLinkedAccount = this.transferInterestToLinkedAccount; - final DepositAccountOnClosureType accountOnClosureType = null; - final Long transferToSavingsId = null; + final DepositAccountOnClosureType accountOnClosureType = DepositAccountOnClosureType.fromInt(this.onAccountClosureType); + final Long transferToSavingsId = this.transferToSavingsAccountId; return DepositAccountTermAndPreClosure.createNew(preClosureDetail, depositTermDetail, account, actualDepositAmount, maturityAmount, maturityDate, depositPeriod, depositPeriodFrequency, expectedFirstDepositOnDate, accountOnClosureType, transferInterestToLinkedAccount, transferToSavingsId); @@ -326,4 +326,5 @@ public Integer getOnAccountClosureType() { public Long getTransferToSavingsAccountId() { return transferToSavingsAccountId; } + }