Skip to content

Conversation

@alberto-art3ch
Copy link
Contributor

Description

Support reversal of “Buy Down fees” transactions.

  • Not yet reversed “Buy Down fees” transaction is allowed to be reversed if
    Mirror JE entries will be based for reversal entry of that transaction
    There is no any not yet reversed “Buy Down fees Adjustment” that belongs to this transactions (transaction relationship)

  • When “Buy Down fees” transaction is reversed, all already amortized amounts should be corrected in a “Buy Down fees amortization adjustment“ transaction.
    Mirror JE entries of “Buy Down fees amortization“.
    COB will handle the adjustment transaction
    Delete related buy down fee balance

FINERACT-2311

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-2311/buy-down-fees-reversal-of-existing-transaction branch 4 times, most recently from 5ea9a1d to ae7cd79 Compare July 29, 2025 16:03
return LoanTransactionType.CAPITALIZED_INCOME.equals(getTypeOf()) && isNotReversed();
}

public boolean isDefferedIncome() {
Copy link
Contributor

Choose a reason for hiding this comment

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

typo in the method name

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! Typo fixed

Loan loan = buyDownFeeTransaction.getLoan();
BigDecimal totalAmortizationAmount = BigDecimal.ZERO;

final List<LoanTransactionRelation> loanTransactionRelations = loanTransactionRelationRepository
Copy link
Contributor

Choose a reason for hiding this comment

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

We dont need to fetch all the relations and go through on loan transactions (and effectively fetch them) to make this decision. Please write a simply query which returns the required information:

  • boolean
  • related transaction id

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! Method updated to return a boolean value

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.

Please take a look on my concerns!

@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2311/buy-down-fees-reversal-of-existing-transaction branch from 1b8f0be to aafd96a Compare July 30, 2025 13:42
@adamsaghy adamsaghy merged commit 59c98b7 into apache:develop Jul 30, 2025
45 of 46 checks passed
@adamsaghy adamsaghy deleted the FINERACT-2311/buy-down-fees-reversal-of-existing-transaction branch July 30, 2025 16:43
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