FINERACT-2455: Working Capital transaction reprocessing#5962
Draft
budaidev wants to merge 1 commit into
Draft
Conversation
679b60d to
859ddad
Compare
859ddad to
67c970f
Compare
adamsaghy
reviewed
Jun 10, 2026
| } | ||
|
|
||
| @Override | ||
| public void reprocessTransactions(final WorkingCapitalLoan loan, final List<WorkingCapitalLoanTransaction> allTransactions) { |
Contributor
There was a problem hiding this comment.
I think we might want to consider a different approach:
- Quickly we can have a high number of transactions and we would like to avoid to recalculate / reprocess all transactions and the amortization schedule
- We should focus on the changes in the transaction allocations only
What if:
- Transaction was reversed:
- transaction reprocessing should only happen if
- reverted transaction was repaying any charge -> The next upcoming transaction(s) need to reprocessed till charge is repaid by them, the rest of the transactions does not matter.
- otherwise it does not matter -> No transaction reprocessing needed!
- transaction reprocessing should only happen if
- Backdated transaction:
- transaction reprocessing should only happen if
- backdated transaction needs to repay any charge -> The next upcoming transaction(s) might need to be reprocessed as they might not or with different amount to pay charges from now.
- otherwise it does not matter -> No transaction reprocessing needed!
- transaction reprocessing should only happen if
- If no charges were added on the loan, there is no reprocessing needed at all!
- If reprocessing was needed, we should have the "new" allocations of the involved transaction(s) and based on this amortization schedule / breach schedule / delinquency schedule balances might need to be updated. But only with the delta (difference). No need to recalculate everything, but only with impacted parts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!
Your assigned reviewer(s) will follow our guidelines for code reviews.