Skip to content

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
apache:developfrom
foodeveloper:port/CBS-260-savings-charge-vat-gl-posting
Open

FINERACT-2744: Tax (VAT) on savings account charges is not calculated or posted to the correct GL account#6237
rymghosn wants to merge 1 commit into
apache:developfrom
foodeveloper:port/CBS-260-savings-charge-vat-gl-posting

Conversation

@rymghosn

@rymghosn rymghosn commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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:

  • The income GL was overstated by the tax amount.
  • The tax liability was never recorded in its designated GL account.

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 the SavingsAccountTransaction.

  • Updated the cash-based and accrual-based accounting processors to split journal entries correctly by posting:

    • the net charge amount to the charge income GL account, and
    • each tax component to its configured Tax/VAT Payable GL account, including reversal entries.
  • 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:

  • Fixed the TaxComponentTaxComponentHistory JPA relationship by replacing the incorrect unidirectional mapping with a proper bidirectional mapping.
  • Added the missing id and endDate fields to the TaxGroupComponent request DTO to support updating existing tax group mappings.
  • Improved validation by returning a clear error message when creating a Tax Group with an empty tax-components array.

PR:(https://issues.apache.org/jira/browse/FINERACT-2744)

@rymghosn
rymghosn force-pushed the port/CBS-260-savings-charge-vat-gl-posting branch from 6a71452 to b9bd7ae Compare August 6, 2026 13:29
@IOhacker

IOhacker commented Aug 6, 2026

Copy link
Copy Markdown
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"

@rymghosn
rymghosn force-pushed the port/CBS-260-savings-charge-vat-gl-posting branch from b9bd7ae to 6896bc2 Compare August 7, 2026 06:45
@rymghosn

rymghosn commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@IOhacker Done. I have squashed the commits, signed the commit and PR, and updated the commit title to follow the required convention

@adamsaghy adamsaghy changed the title FINERACT-2744- Tax (VAT) on savings account charges is not calculated or posted to the correct GL account FINERACT-2744: Tax (VAT) on savings account charges is not calculated or posted to the correct GL account Aug 7, 2026
@rymghosn

rymghosn commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@adamsaghy Could you please review the code? If everything looks good, kindly approve and merge it. Thanks!

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.

2 participants