Skip to content
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-2081: Fix Accrual activity - reverse and replayed couple of … #4334

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

alberto-art3ch
Copy link
Contributor

@alberto-art3ch alberto-art3ch commented Feb 14, 2025

…times after backdated repayment

Description

Accrual activity is reversed and replayed couple of times after backdated repayment.

FINERACT-2081

  • Loan Transaction Details
Screenshot 2025-02-18 at 10 19 47 p m
  • select over the m_loan_transaction table
Screenshot 2025-02-18 at 10 20 41 p m

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 2315-fix-accrual-activity-reverse-and-replayed-couple-of-times-after-backdated-repayment branch 3 times, most recently from 7502d1a to 9691e6a Compare February 16, 2025 19:37
@alberto-art3ch alberto-art3ch force-pushed the 2315-fix-accrual-activity-reverse-and-replayed-couple-of-times-after-backdated-repayment branch 4 times, most recently from 6804c67 to 2e08ee9 Compare February 20, 2025 12:55
Rustam Zeinalov and others added 7 commits February 20, 2025 12:14
…isbursementDate setting to be taking into account by periodic accrual job
…isbursementDate setting to be taking into account by periodic accrual job
…isbursementDate setting to be taking into account by periodic accrual job
…isbursementDate setting to be taking into account by periodic accrual job
@alberto-art3ch alberto-art3ch force-pushed the 2315-fix-accrual-activity-reverse-and-replayed-couple-of-times-after-backdated-repayment branch from 2e08ee9 to 58aac9c Compare February 21, 2025 06:02
@adamsaghy
Copy link
Contributor

@alberto-art3ch Kindly squash you commits!

loanTransaction.reverse();
} else {
loanTransaction.updateComponentsAndTotal(principalPortion, interestPortion, feeChargesPortion, penaltyChargesPortion);
if (currentInstallment.isObligationsMet()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make sure you are not change the transaction date in case the repayment date is later than the installment due date!

@@ -122,7 +122,11 @@ public void processAccrualActivityForLoanClosure(@NotNull Loan loan) {

if (installmentAccruals.isEmpty()) {
// No AAT for this installment; create one
makeAccrualActivityTransaction(loan, installment, installment.getDueDate());
LocalDate transactionDate = installment.getDueDate();
if (loan.isOverPaid() && installment.getDueDate().isAfter(loan.getOverpaidOnDate())) {
Copy link
Contributor

@adamsaghy adamsaghy Feb 24, 2025

Choose a reason for hiding this comment

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

Why only the overpayment situation? What about it was fully paid? Do we need this at all?

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 see my review!

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