oleksii-novikov-onix commented on code in PR #4244:
URL: https://github.com/apache/fineract/pull/4244#discussion_r1918700136
##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseWritePlatformServiceImpl.java:
##########
@@ -71,8 +71,7 @@ public CommandProcessingResult createInterestPause(Long
loanId, String startDate
final LocalDate startDate = parseDate(startDateString, dateFormat,
locale);
final LocalDate endDate = parseDate(endDateString, dateFormat, locale);
- return processInterestPause(() ->
loanRepositoryWrapper.findOneWithNotFoundDetection(loanId), startDate, endDate,
dateFormat,
- locale);
+ return
processInterestPause(loanRepositoryWrapper.findOneWithNotFoundDetection(loanId),
startDate, endDate, dateFormat, locale);
Review Comment:
Done
##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseWritePlatformServiceImpl.java:
##########
@@ -113,15 +112,17 @@ public CommandProcessingResult updateInterestPause(Long
loanId, Long variationId
.with(Map.of("startDate", startDate.toString(), "endDate",
endDate.toString())).build();
}
- private CommandProcessingResult processInterestPause(Supplier<Loan>
loanSupplier, LocalDate startDate, LocalDate endDate,
+ private CommandProcessingResult processInterestPause(final Loan loan,
final LocalDate startDate, final LocalDate endDate,
String dateFormat, String locale) {
- final Loan loan = loanSupplier.get();
-
validateInterestPauseDates(loan, startDate, endDate, dateFormat,
locale);
- LoanTermVariations variation = new
LoanTermVariations(INTEREST_PAUSE.getValue(), startDate, null, endDate, false,
loan);
+ final LoanTermVariations variation = new
LoanTermVariations(INTEREST_PAUSE.getValue(), startDate, BigDecimal.ZERO,
endDate, false,
+ loan);
+
+ final LoanTermVariations savedVariation =
loanTermVariationsRepository.saveAndFlush(variation);
- LoanTermVariations savedVariation =
loanTermVariationsRepository.saveAndFlush(variation);
+ loan.setHelpers(null,
loanRepaymentScheduleTransactionProcessorFactory);
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]