adamsaghy commented on code in PR #3611:
URL: https://github.com/apache/fineract/pull/3611#discussion_r1410411544
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/serialization/LoanProductDataValidator.java:
##########
@@ -1788,6 +1795,14 @@ public void validateForUpdate(final JsonCommand command,
final LoanProduct loanP
final String loanScheduleType =
this.fromApiJsonHelper.extractStringNamed(LoanProductConstants.LOAN_SCHEDULE_TYPE,
element);
baseDataValidator.reset().parameter(LoanProductConstants.LOAN_SCHEDULE_TYPE).value(loanScheduleType).ignoreIfNull()
.isOneOfEnumValues(LoanScheduleType.class);
+
+ if
(LoanScheduleType.PROGRESSIVE.equals(LoanScheduleType.valueOf(loanScheduleType))
+ &&
!AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY
+ .equals(transactionProcessingStrategyCode)) {
+
baseDataValidator.reset().parameter(LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE).failWithCode(
Review Comment:
Please throw unique error code
`supported.only.for.progressive.loan.schedule.handling` is already been used
elsewhere for other purposes!
--
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]