Skip to content

Conversation

@mariiaKraievska
Copy link
Contributor

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!

  • 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.

@mariiaKraievska mariiaKraievska force-pushed the FINERACT-2354/reaging-default-behaviour-interest-bearing-loan-partially-paid-last-installment-edge-case branch 2 times, most recently from bb14437 to 4d1ba4f Compare November 6, 2025 09:45
@mariiaKraievska mariiaKraievska force-pushed the FINERACT-2354/reaging-default-behaviour-interest-bearing-loan-partially-paid-last-installment-edge-case branch 2 times, most recently from 43cc49d to f1939f8 Compare November 17, 2025 11:29
&& DateUtils.isBefore(currentBusinessDate, expectedMaturityDate);
if (installment.isDownPayment()) {
isCurrentDateBeforeInstallmentAndLoanPeriod = DateUtils.isEqual(currentBusinessDate, installment.getDueDate())
if (!installment.isPaidMovedPaidDuringReAging()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

isPaidMovedPaidDuringReAging -> duplicate usage of the word of "paid"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed

&& DateUtils.isBefore(currentBusinessDate, expectedMaturityDate);
if (installment.isDownPayment()) {
isCurrentDateBeforeInstallmentAndLoanPeriod = DateUtils.isEqual(currentBusinessDate, installment.getDueDate())
if (!installment.isPaidMovedPaidDuringReAging()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to modify this logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted just to exclude reAgePaidInstallment here

private boolean isReAged;

@Column(name = "is_paid_moved_during_re_aging", nullable = false)
private boolean isPaidMovedPaidDuringReAging;
Copy link
Contributor

@adamsaghy adamsaghy Nov 17, 2025

Choose a reason for hiding this comment

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

Can it be something more generic, like "isReageSpecialInstallment" or "isReagePaidInstallment"? isPaidMovedPaidDuringReAging sounds weird to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


loanTransaction.updateComponentsAndTotal(totalOutstandingPrincipal, interestFromZeroedInstallments, Money.zero(currency),
Money.zero(currency));
reprocessInstallments(installments);
Copy link
Contributor

Choose a reason for hiding this comment

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

why to remove this?

Copy link
Contributor Author

@mariiaKraievska mariiaKraievska Nov 17, 2025

Choose a reason for hiding this comment

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

I returned it back, but modified the sorting


@Getter
@Setter
private boolean isPeriodWithMovedPaidAmountDuringReAging = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use something similar like in the repayment installment entity which describe the nature of the period instead of the action?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@mariiaKraievska mariiaKraievska force-pushed the FINERACT-2354/reaging-default-behaviour-interest-bearing-loan-partially-paid-last-installment-edge-case branch from f1939f8 to 4e7ac7d Compare November 17, 2025 14:56
@mariiaKraievska mariiaKraievska changed the title FINERACT-2354: Fifth step - Partially paid installment - adjust to last edge case of re-aging for Interest bearing loans - Default Behavior, interestRecalculation = true, without dueDate change FINERACT-2354: Re-age - Excess payment handling - Default Behavior, interestRecalculation = true, without dueDate change Nov 19, 2025
@mariiaKraievska mariiaKraievska force-pushed the FINERACT-2354/reaging-default-behaviour-interest-bearing-loan-partially-paid-last-installment-edge-case branch 4 times, most recently from 5d2fe4b to 8b6945c Compare November 26, 2025 15:22
@adamsaghy adamsaghy marked this pull request as ready for review November 27, 2025 14:03
@mariiaKraievska mariiaKraievska force-pushed the FINERACT-2354/reaging-default-behaviour-interest-bearing-loan-partially-paid-last-installment-edge-case branch 3 times, most recently from ec57729 to 88c44f4 Compare December 1, 2025 09:15
@mariiaKraievska mariiaKraievska changed the title FINERACT-2354: Re-age - Excess payment handling - Default Behavior, interestRecalculation = true, without dueDate change FINERACT-2354: Re-age - Excess payment handling - Default Behavior, interestRecalculation = true Dec 1, 2025
mariiaKraievska and others added 3 commits December 1, 2025 12:49
…nterestRecalculation = true, without dueDate change - missing testRailIds added
@mariiaKraievska mariiaKraievska force-pushed the FINERACT-2354/reaging-default-behaviour-interest-bearing-loan-partially-paid-last-installment-edge-case branch from 88c44f4 to 7c82a41 Compare December 1, 2025 10:49
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.

LGTM

@adamsaghy adamsaghy merged commit 25fd822 into apache:develop Dec 1, 2025
38 of 39 checks passed
@adamsaghy adamsaghy deleted the FINERACT-2354/reaging-default-behaviour-interest-bearing-loan-partially-paid-last-installment-edge-case branch December 1, 2025 12:15
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.

4 participants