-
Notifications
You must be signed in to change notification settings - Fork 2.1k
FINERACT-2354: Re-aging: Interest handling configuration #5046
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-2354: Re-aging: Interest handling configuration #5046
Conversation
fd295e8
to
2819d71
Compare
return Arrays.stream(values()).map(v -> new EnumOptionData((long) (v.ordinal() + 1), v.name(), v.getHumanReadableName())).toList(); | ||
} | ||
|
||
public EnumOptionData asEnumOptionData() { |
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.
Use StringEnumOptionData please
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.
Done! Type updated
<changeSet author="fineract" id="3"> | ||
<sql> | ||
UPDATE m_loan_reage_parameter SET interest_handling_type = 'DEFAULT' | ||
WHERE interest_handling_type IS NULL | ||
</sql> | ||
</changeSet> |
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.
We dont need this. default value already set and interest_handling_type is not nullable.
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.
Done! XML file updated
...src/main/resources/db/changelog/tenant/module/loan/parts/1033_add_reage_reasons_for_loan.xml
Show resolved
Hide resolved
2819d71
to
fb6aa16
Compare
@RequiredArgsConstructor | ||
public enum LoanReAgeInterestHandlingType { | ||
|
||
DEFAULT("Default"), // |
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.
Add "code" field which is String and has the value of "LoanReAgeInterestHandlingType.default", "LoanReAgeInterestHandlingType.waiveInterest", etc.
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.
Done! code attribute added
.../org/apache/fineract/portfolio/loanaccount/domain/reaging/LoanReAgeInterestHandlingType.java
Show resolved
Hide resolved
fb6aa16
to
47a6570
Compare
if (reAgeInterestHandling == null) { | ||
reAgeInterestHandling = LoanReAgeInterestHandlingType.DEFAULT.name(); | ||
} |
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.
Do we need this? if not reage interest handling was provided, still the request should be accepted and consider it as "DEFAULT" (as fallback value)
a34eac0
to
81758d5
Compare
81758d5
to
181fc02
Compare
</changeSet> | ||
<changeSet author="fineract" id="3"> | ||
<addColumn tableName="m_loan_reage_parameter"> | ||
<column defaultValueComputed="NULL" name="reage_reason_code_value_id" type="BIGINT"/> |
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 was wrong here: since the m_code_value
.id
is INT, we cannot use different data type in m_loan_reage_parameter
and having FK. Unfortunately it must be modified to be INT for now :/
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.
Done! XML file updated
ec74a60
to
0e2905f
Compare
0e2905f
to
b00712e
Compare
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
User should be able to configure Interest handling types while doing re-age on Interest bearing loans (both from UI and API)
Options should be
FINERACT-2364
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.