josehernandezfintecheandomx commented on code in PR #3663:
URL: https://github.com/apache/fineract/pull/3663#discussion_r1441018907


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java:
##########
@@ -1705,4 +1709,20 @@ private void officeSpecificLoanProductValidation(final 
Long productId, final Lon
         }
     }
 
+    private void validateTransactionProcessingStrategy(final LoanProduct 
loanProduct, final String loanRepaymentStrategy) {
+        if 
(loanProduct.getRepaymentStrategy().equals(LoanProductConstants.ADVANCED_PAYMENT_ALLOCATION_STRATEGY))
 {

Review Comment:
   Done, code updated as:
   
   ```
           // PROGRESSIVE: Repayment strategy MUST be only "advanced payment 
allocation"
           if 
(loanProduct.getLoanProductRelatedDetail().getLoanScheduleType().equals(LoanScheduleType.PROGRESSIVE))
 {
               if 
(!transactionProcessingStrategyCode.equals(LoanProductConstants.ADVANCED_PAYMENT_ALLOCATION_STRATEGY))
 {
                   throw new GeneralPlatformDomainRuleException(
                           
"error.msg.loan.repayment.strategy.can.not.be.different.than.advanced.payment.allocation",
                           "Loan repayment strategy can not be different than 
Advanced Payment Allocation");
               }
               // CUMULATIVE: Repayment strategy CANNOT be "advanced payment 
allocation"
           } else {
               if 
(transactionProcessingStrategyCode.equals(LoanProductConstants.ADVANCED_PAYMENT_ALLOCATION_STRATEGY))
 {
                   throw new GeneralPlatformDomainRuleException(
                           
"error.msg.loan.repayment.strategy.can.not.be.equal.to.advanced.payment.allocation",
                           "Loan repayment strategy can not be equal to 
Advanced Payment Allocation");
               }
           }
   
   ```



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