adamsaghy commented on code in PR #5960:
URL: https://github.com/apache/fineract/pull/5960#discussion_r3389819711
##########
fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/service/WorkingCapitalLoanBreachScheduleServiceImpl.java:
##########
@@ -196,21 +199,26 @@ private Optional<WorkingCapitalBreach>
getBreachConfig(final WorkingCapitalLoan
return Optional.ofNullable(details.getBreach());
}
- private int getGraceDays(final WorkingCapitalLoan loan) {
+ private int getDelinquencyGraceDays(final WorkingCapitalLoan loan) {
final WorkingCapitalLoanProductRelatedDetails details =
loan.getLoanProductRelatedDetails();
if (details == null || details.getDelinquencyGraceDays() == null) {
return 0;
}
return details.getDelinquencyGraceDays();
}
+ private Integer getBreachGraceDays(final WorkingCapitalLoan loan) {
+ final WorkingCapitalLoanProductRelatedDetails details =
loan.getLoanProductRelatedDetails();
+ return (details == null || details.getBreachGraceDays() == null) ? 0 :
details.getBreachGraceDays();
+ }
+
private LocalDate calculateToDate(final LocalDate fromDate, final Integer
frequency,
- final WorkingCapitalLoanPeriodFrequencyType frequencyType) {
+ final WorkingCapitalLoanPeriodFrequencyType frequencyType, final
Integer graceDays) {
Review Comment:
This looks incorrect. `calculateToDate` is used to calculate not just the
1st period, but grace days only affecting first from date, nothing further.
--
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]