ptuomola commented on a change in pull request #1587:
URL: https://github.com/apache/fineract/pull/1587#discussion_r563219324
##########
File path:
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationCommandFromApiJsonHelper.java
##########
@@ -485,7 +485,14 @@ public void validateForCreate(final String json, final
boolean isMeetingMandator
baseDataValidator.reset().parameter(LoanApiConstants.datatables).value(datatables).notNull().jsonArrayNotEmpty();
}
- validateLoanMultiDisbursementdate(element, baseDataValidator,
expectedDisbursementDate, principal);
+ if
(this.fromApiJsonHelper.parameterExists(LoanApiConstants.daysInYearTypeParameterName,
element)) {
+ final Integer daysInYearType =
this.fromApiJsonHelper.extractIntegerNamed(LoanApiConstants.daysInYearTypeParameterName,
element,
+ Locale.getDefault());
+
baseDataValidator.reset().parameter(LoanApiConstants.daysInYearTypeParameterName).value(daysInYearType).notNull()
+ .isOneOfTheseValues(1, 360, 364, 365);
Review comment:
Hi @vorburger - that's the joy of archaic day count conventions for
interest rate calculations :-). There are hundreds of conventions but 365 and
360 are the most common. See https://www.investopedia.com/terms/d/daycount.asp
(or
http://strata.opengamma.io/apidocs/com/opengamma/strata/basics/date/DayCounts.html
for some more exotic ones :-)).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]