oleksii-novikov-onix commented on code in PR #4244:
URL: https://github.com/apache/fineract/pull/4244#discussion_r1918119427


##########
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:
   Could you please explain a bit why we need the LoanLifecycleStateMachine in 
our case?



-- 
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]

Reply via email to