FINERACT-2744: Tax (VAT) on savings account charges is not calculated or posted to the correct GL account - #6237
Open
rymghosn wants to merge 1 commit into
Conversation
rymghosn
force-pushed
the
port/CBS-260-savings-charge-vat-gl-posting
branch
from
August 6, 2026 13:29
6a71452 to
b9bd7ae
Compare
IOhacker
approved these changes
Aug 6, 2026
Contributor
|
@rymghosn please squash and commit make sure to sign your commit and the PR and commit title should match the expected convention "FINERACT-XYZ: title of Jira ticket" |
… or posted to the correct GL account
rymghosn
force-pushed
the
port/CBS-260-savings-charge-vat-gl-posting
branch
from
August 7, 2026 06:45
b9bd7ae to
6896bc2
Compare
Contributor
Author
|
@IOhacker Done. I have squashed the commits, signed the commit and PR, and updated the commit title to follow the required convention |
Contributor
Author
|
@adamsaghy Could you please review the code? If everything looks good, kindly approve and merge it. Thanks! |
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.
Problem
When a Charge linked to a Tax Group was applied to a Savings Account, tax was not calculated on the charge. The charge was applied using only its base amount, and no per-component tax breakdown was stored on the transaction.
Even after calculating the tax-inclusive amount, the accounting layer did not split the posting correctly. The full gross amount (charge + tax) was credited to the charge's income GL account instead of separating the tax into the configured Tax/VAT Payable GL account. As a result:
This issue affected both cash-based and accrual-based accounting for fees, penalties, and their reversals.
Fix
Added tax calculation during savings charge payment by introducing
TaxUtils.calculateChargeAmountWithTax(...), ensuring the tax-inclusive amount is calculated and the per-component tax breakdown is stored on theSavingsAccountTransaction.Updated the cash-based and accrual-based accounting processors to split journal entries correctly by posting:
Updated the savings accounting processors to pass the transaction tax breakdown through the fee and penalty posting flows.
Related Fixes
While implementing the above, several related issues in the Tax Group/Component domain were also resolved:
TaxComponent↔TaxComponentHistoryJPA relationship by replacing the incorrect unidirectional mapping with a proper bidirectional mapping.idandendDatefields to theTaxGroupComponentrequest DTO to support updating existing tax group mappings.tax-componentsarray.PR:(https://issues.apache.org/jira/browse/FINERACT-2744)