adamsaghy commented on code in PR #5349:
URL: https://github.com/apache/fineract/pull/5349#discussion_r2904059390


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java:
##########
@@ -1026,6 +1026,7 @@ public CommandProcessingResult 
makeInterestPaymentWaiver(final JsonCommand comma
 
         final Long loanId = command.getLoanId();
         Loan loan = this.loanAssembler.assembleFrom(loanId);
+        
loanTransactionValidator.validateLoanNotClosedOrOverpaidForTransactions(loan, 
LoanTransactionType.INTEREST_PAYMENT_WAIVER);

Review Comment:
   We dont need to call multiple times the `loanTransactionValidator`. Lets do 
the necessary checks in 
`loanTransactionValidator.validateLoanTransactionInterestPaymentWaiver`



##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java:
##########
@@ -1107,6 +1108,7 @@ public CommandProcessingResult 
makeLoanRepaymentWithChargeRefundChargeType(final
             changes.put(LoanApiConstants.externalIdParameterName, 
txnExternalId);
         }
         Loan loan = this.loanAssembler.assembleFrom(loanId);
+        
loanTransactionValidator.validateLoanNotClosedOrOverpaidForTransactions(loan, 
repaymentTransactionType);

Review Comment:
   see above.



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