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.
Use StringEnumOptionData please
There was a problem hiding this comment.
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.
We dont need this. default value already set and interest_handling_type is not nullable.
There was a problem hiding this comment.
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.
Add "code" field which is String and has the value of "LoanReAgeInterestHandlingType.default", "LoanReAgeInterestHandlingType.waiveInterest", etc.
There was a problem hiding this comment.
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.
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.
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.
Done! XML file updated
ec74a60 to
0e2905f
Compare
0e2905f to
b00712e
Compare
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.