-
Notifications
You must be signed in to change notification settings - Fork 2.2k
FINERACT-2326: fix delinquency date calculation after pause #5100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FINERACT-2326: fix delinquency date calculation after pause #5100
Conversation
637ac4d to
f0c390e
Compare
| final long delinquentDays = overdueDays - graceDays; | ||
| if (delinquentDays > 0) { | ||
| calculateDelinquentDays(effectiveDelinquencyList, businessDate, collectionData, delinquentDays); | ||
| Long calculatedDelinquentDays = delinquentDays - pausedDays; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to extract this logic into a method that can be reused, otherwise I fear this duplicated (triplicated) logic would be changed in the future only in 1 place, not at the rest of them.
The pausedDays retrieval can also be included here instead and in the extracted method.
If that's done, I think we're good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I tried to keep the changes minimal, but a refactor like this certainly makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
f0c390e to
fcbe686
Compare
311237b to
c77fe2c
Compare
adamsaghy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
7d584e3 to
0245ba2
Compare
a2979b5 to
a8ea2bf
Compare
9d961a7 to
26795d8
Compare
adamsaghy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Describe the changes made and why they were made.
Ignore if these details are present on the associated Apache Fineract JIRA ticket.
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.