Repository navigation
Conversation
4 of 8 tasks
…do-waive when external events are disabled Assisted-By: claude-code-claude-sonnet-5-5 Assisted-By: claude-code-claude-opus-5-5
galovics
force-pushed
the
FINERACT-2910
branch
from
October 9, 2026 08:31
b872b49 to
cf51437
Compare
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
FINERACT-2910: with external events disabled, the stored interest/principal split of a progressive (advanced payment allocation) loan installment is stale after add-charge or undo-waive-charge, while it is correct with events enabled.
Root cause: when the loan event is serialized in
BusinessEventNotifierServiceImpl.beforeCommit,LoanBusinessEventSerializer->ProgressiveLoanSummaryDataProvider->InterestScheduleModelRepositoryWrapperImpl.getSavedModelrecalculates the interest schedule model and writes it onto the managed installments, which are flushed on commit. The add-charge path skips reprocessing when the charge is due after the last transaction, and undo-waive never reprocesses, so those two commands only got fresh installments as a side effect of event serialization.Fix: after the add-charge reprocess-skipped branch and after undo-waive, call the existing
ReprocessLoanTransactionsService.updateModel, guarded to progressive, interest-bearing loans with interest recalculation that are not matured (the same conditions under which serialization recalculates). Persisted state no longer depends on event posting.Not changed: making event serialization /
getSavedModelside-effect free (it also affects accruals, prepayment and the investor interest calculation, and would change persisted values for events-enabled deployments). That should be a separate change.Tests: new
LoanChargeInterestRecalculationTest, run with theLoanBalanceChangedBusinessEventtype enabled and disabled. Verified failing without the fix (0.39 instead of 0.42) and passing with it, withFINERACT_EXTERNAL_EVENTS_ENABLEDboth false and true. The e2e scenarios from the ticket (C4311, UC15) and the fullLoanReAmortization-Part1andLoanDelayedScheduleCaptures-Part1features pass with events off and on.Checklist