mariiaKraievska commented on code in PR #5969:
URL: https://github.com/apache/fineract/pull/5969#discussion_r3427070694
##########
fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/validator/WorkingCapitalLoanDelinquencyActionParseAndValidator.java:
##########
@@ -83,6 +101,37 @@ private void validatePause(final
WorkingCapitalLoanDelinquencyAction action, fin
validateNoOverlap(action, existing);
}
+ private void validateResume(final WorkingCapitalLoanDelinquencyAction
action,
+ final List<WorkingCapitalLoanDelinquencyAction> existing) {
+ final LocalDate businessDate = DateUtils.getBusinessLocalDate();
+ validateResumeStartDate(action, businessDate);
+ final WorkingCapitalLoanDelinquencyAction activePause =
findActivePauseForResume(existing, businessDate);
+ validateResumeShortensActivePause(action, activePause);
+ }
+
+ private void validateResumeStartDate(final
WorkingCapitalLoanDelinquencyAction action, final LocalDate businessDate) {
+ if (action.getStartDate() == null) {
+
raiseValidationError("wc-loan-delinquency-action-resume-startDate-cannot-be-blank",
"The parameter `startDate` is mandatory",
Review Comment:
Thank you @oleksii-novikov-onix, I reworked all
WorkingCapitalLoanDelinquencyActionParseAndValidator to use
DataValidatorBuilder. But we also have such error format like
"loan-delinquency-action-..." in DelinquencyActionParseAndValidator for basic
loans, @adamsaghy maybe we should rework this also in some separate PR? What do
you think? This is the only place where, for some reason, this format was
chosen, everywhere else, it's separated by a "."
--
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]