alberto-art3ch commented on code in PR #6546:
URL: https://github.com/apache/fineract/pull/6546#discussion_r4388909338


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java:
##########
@@ -690,6 +719,16 @@ private void 
validateRepaymentsStartDateWithMeetingDates(final LocalDate repayme
         }
     }
 
+    private void validateRepaymentsStartDateIsSemiMonthlyDueDate(final 
LocalDate repaymentsStartingFromDate,
+            final SemiMonthlyDueDays semiMonthlyDueDays) {
+        if (!SemiMonthlyScheduleDates.isDueDate(repaymentsStartingFromDate, 
semiMonthlyDueDays)) {
+            final String errorMessage = "First repayment date '" + 
repaymentsStartingFromDate
+                    + "' does not fall on a due day of the semi-monthly 
schedule";
+            throw new 
LoanApplicationDateException("first.repayment.date.not.a.semi.monthly.due.day", 
errorMessage,

Review Comment:
   Right, it's a domain rule, so 403. PR description updated: data validation 
errors return 400 with specific codes; a first repayment date that is not one 
of the due days (on create and now on modify) returns 403 with 
`first.repayment.date.not.a.semi.monthly.due.day`.



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