Skip to content

Conversation

@sidshas03
Copy link
Contributor

For FINERACT-1659, item (1) (savings interest posted to the wrong GL accounts) is already addressed under FINERACT-2212 and was merged in GitHub PR #4455. ([GitHub]1) Item (3) (Post Interest for Savings job updating existing transactions and causing wrong balances) was handled separately under FINERACT-2258 and fixed via GitHub PR #4556. issues.apache.org This PR focuses only on item (2) and prevents duplicate interest posting within the same posting period.

- Add check to skip accounts where interest already posted for current period
- Change transaction isolation to SERIALIZABLE to prevent concurrent duplicate postings
- Only add accounts with new interest transactions to batch update
- Remove unused variable to fix linter warning

This fixes issue apache#2 from FINERACT-1659 where interest was being posted
multiple times within the same posting period, causing incorrect calculations
and duplicate entries.
- Change check to compare against currentDate instead of yesterday
- Only skip accounts where interestPostedTillDate >= currentDate
- This prevents same-day duplicates while allowing legitimate posting
- Accounts with interestPostedTillDate <= yesterday will be processed correctly
@fintecheando
Copy link

@sidshas03 could you please add testing and do an squash and commit

@sidshas03
Copy link
Contributor Author

@fintecheando yes sir, working on that!

Copy link
Contributor

@galovics galovics left a comment

Choose a reason for hiding this comment

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

I don't see any test-case verifying the non-duplicated behavior.

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