kulminsky commented on code in PR #4266:
URL: https://github.com/apache/fineract/pull/4266#discussion_r1918521761


##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseWritePlatformServiceImpl.java:
##########
@@ -75,10 +75,37 @@ public CommandProcessingResult createInterestPause(Long 
loanId, String startDate
                 locale);
     }
 
+    @Override
+    public CommandProcessingResult deleteInterestPause(ExternalId 
loanExternalId, Long variationId) {
+        return processDeleteInterestPause(() -> 
loanRepositoryWrapper.findOneWithNotFoundDetection(loanExternalId), 
variationId);

Review Comment:
   Fixed.



##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseWritePlatformServiceImpl.java:
##########
@@ -178,9 +217,13 @@ private void validateVariations(Loan loan, 
LoanTermVariations variation) {
 
         List<LoanTermVariations> existingVariations = 
loan.getLoanTermVariations();
         for (LoanTermVariations existingVariation : existingVariations) {
-            if (!existingVariation.equals(variation) && 
variation.getTermApplicableFrom().isBefore(existingVariation.getDateValue())
-                    && 
variation.getDateValue().isAfter(existingVariation.getTermApplicableFrom())) {
-                throw new 
GeneralPlatformDomainRuleException("interest.pause.overlapping", "Overlapping 
interest pauses are not allowed.");
+            if (!existingVariation.equals(variation)
+                    && 
Objects.equals(existingVariation.getTermType().getValue(), 
INTEREST_PAUSE.getValue())) {
+                if 
(!variation.getTermApplicableFrom().isAfter(existingVariation.getDateValue())

Review Comment:
   Fixed.



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