Skip to content

Conversation

@alberto-art3ch
Copy link
Contributor

Description

Adjust interest with a Loan Reschedule using the Interest Rate on account with MIR / CBR results in improper allocations on account

FINERACT-2421

Checklist

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

  • Write the commit message as per our guidelines
  • 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 our 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
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.

Your assigned reviewer(s) will follow our guidelines for code reviews.

@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2421/adjust-interest-on-account-with-mir-cbr-results-in-improper-allocations branch from a94a897 to a030150 Compare January 20, 2026 17:25
modifiedTransactions, unmodifiedTransactionIds);
final Money newAmount = interestBeforeRefund.minus(progCtx.getSumOfInterestRefundAmount()).minus(interestAfterRefund);
loanTransaction.updateAmount(newAmount.getAmount());
loanTransaction.updateAmount(newAmount.abs().getAmount());
Copy link
Contributor

Choose a reason for hiding this comment

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

I cant imagine how this could be true... The interest cannot be higher than it was before the refund...

Copy link
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

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

Kindly review my concern!

@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2421/adjust-interest-on-account-with-mir-cbr-results-in-improper-allocations branch from b49a834 to b75522d Compare January 22, 2026 23:26
@Override
@Transactional(readOnly = true, propagation = Propagation.REQUIRES_NEW)
public Money totalInterestByTransactions(LoanRepaymentScheduleTransactionProcessor processor, final Long loanId,
public Money totalInterestByTransactions(LoanRepaymentScheduleTransactionProcessor processor, final Loan loan,
Copy link
Contributor

Choose a reason for hiding this comment

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

We cannot do this. The changes on the loan entity might be saved outside of this transactions which is unwanted behaviour!

@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2421/adjust-interest-on-account-with-mir-cbr-results-in-improper-allocations branch from b75522d to 5d8d95f Compare January 24, 2026 23:21
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.

2 participants