Skip to content

FINERACT-2398: Re-amortization Interest Handling configuration - #5117

Merged
adamsaghy merged 1 commit into
apache:developfrom
openMF:FINERACT-2398/re-amortization-interest-handling-configuration
Oct 29, 2025
Merged

FINERACT-2398: Re-amortization Interest Handling configuration#5117
adamsaghy merged 1 commit into
apache:developfrom
openMF:FINERACT-2398/re-amortization-interest-handling-configuration

Conversation

@alberto-art3ch

Copy link
Copy Markdown
Contributor

Description

User should be able to do re-amortization on Interest bearing loan accounts as well (progressive strategy only)

User should be able to select the following Interest handling subtypes from the drop down during application of re-amortization to the loan account

  • Default Behavior
  • Waive Interest
  • Equal Overdue Interest Split

FINERACT-2398

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per https://github.com/apache/fineract/#pull-requests
  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
  • Create/update unit or integration tests for verifying the changes made.
  • Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
  • Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)

FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.

@alberto-art3ch
alberto-art3ch force-pushed the FINERACT-2398/re-amortization-interest-handling-configuration branch from f40850c to b05ea7d Compare October 22, 2025 02:33

@budaidev budaidev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the naming and reaging references before submit

* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.portfolio.loanaccount.domain.reaging;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for LoanReAmortizationInterestHandlingType to be in the reaging package instead of the reamortization package?

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;

public interface LoanReAgingParameterRepository extends JpaRepository<LoanReAmortizationParameter, Long> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing only LoanReAmortizationParameter related operation in the LoanReAgingParameterRepository seems confusing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! I've updated the java package

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename from LoanReAgingParameterRepository to LoanReAmortizationParameterRepository


CodeValue reasonCodeValue = null;
if (command.parameterExists(LoanReAgingApiConstants.reasonCodeValueIdParamName)) {
reasonCodeValue = codeValueRepository.findByCodeNameAndId(LoanApiConstants.REAGE_REASONS,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be wrong, but isn't it LoanApiConstants.REAMORTIZATION_REASONS?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Code updated

}

CodeValue reasonCodeValue = null;
if (command.parameterExists(LoanReAgingApiConstants.reasonCodeValueIdParamName)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it LoanReAmortizationApiConstants instead of LoanReAgingApiConstants?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Code updated


private LoanReAmortizationValidator underTest = new LoanReAmortizationValidator();
@InjectMocks
private LoanReAmortizationValidator underTest;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You changed here to InjectMocks instead of the creation, how we handle the CodeValueRepository which is injected inside the LoanReAmortizationValidator? Do we validate if it is correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@budaidev I am not changing the Test by Itself, I mean currently there is not a validation to include the CodeValueRepository, I don't know If I need to include this

@alberto-art3ch
alberto-art3ch force-pushed the FINERACT-2398/re-amortization-interest-handling-configuration branch from b05ea7d to 34fff4b Compare October 22, 2025 13:28

@adamsaghy adamsaghy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please kindly see my review!

@alberto-art3ch
alberto-art3ch force-pushed the FINERACT-2398/re-amortization-interest-handling-configuration branch 2 times, most recently from 453c507 to 2a5c1fd Compare October 27, 2025 13:53
@alberto-art3ch
alberto-art3ch force-pushed the FINERACT-2398/re-amortization-interest-handling-configuration branch from 2a5c1fd to 74c04db Compare October 27, 2025 18:50

@adamsaghy adamsaghy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adamsaghy
adamsaghy merged commit a849e9b into apache:develop Oct 29, 2025
33 checks passed
@adamsaghy
adamsaghy deleted the FINERACT-2398/re-amortization-interest-handling-configuration branch October 29, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants