Foo Developer created FINERACT-2744:
---------------------------------------

             Summary: Tax (VAT) on savings account charges is not calculated or 
posted to the correct GL account
                 Key: FINERACT-2744
                 URL: https://issues.apache.org/jira/browse/FINERACT-2744
             Project: Apache Fineract
          Issue Type: Bug
          Components: Accounting, Savings
            Reporter: Foo Developer
            Assignee: Foo Developer


When a **Charge** associated with a **Tax Group** is applied to a **Savings 
Account**, the tax component is not processed correctly. The charge is posted 
using only its base amount, with no tax calculation, tax breakdown, or separate 
journal entry for the tax liability.

After enabling tax calculation, the calculated tax amount is incorrectly posted 
to the charge's **income GL account** instead of the **Tax/VAT Payable GL 
account** configured on the Tax Component. As a result:

* The income GL is overstated because it includes the tax amount.
* The tax liability is never recorded in its designated GL account, preventing 
proper tracking and tax reporting.

This issue affects both **cash-based** and **accrual-based** accounting for 
**Savings Account** charges, including both **fees** and **penalties**.

**Steps to Reproduce**

1. Create a Tax Component (e.g. VAT 5%) and a Tax Group containing it.
2. Create a Charge, assign the Tax Group to it, and associate the Charge with a 
Savings Product.
3. Open a Savings Account using that product and apply the charge (e.g. base 
amount = 100).
4. Pay the charge / process the transaction.
5. Review the Savings Account transaction and the generated Journal Entries 
(Accounting → Journal Entries).

**Actual Result**

* The charge is posted using only the base amount (100), with no tax 
calculation or tax breakdown.
* When tax calculation is available, the entire charge amount (base + tax) is 
credited to the charge's income GL account, and no entry is posted to the 
configured Tax Payable GL account.

**Expected Result**

* The charge amount should include all Tax Group components (e.g. base 100 + 
VAT 5 = total 105), with the transaction displaying a per-component tax 
breakdown.
* Journal entries should be split correctly:

  * The base charge amount (100) should be credited to the charge's income GL 
account.
  * The tax amount (5) should be credited to the Tax Component's configured 
Tax/VAT Payable GL account.
* The same accounting behavior should apply to both cash-based and 
accrual-based accounting, including transaction reversals.

**Additional Notes**
The implementation also addresses several related Tax Group/Component issues:

* Fixed the **TaxComponent ↔ TaxComponentHistory** mapping by replacing the 
incorrect unidirectional relationship 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, user-friendly error message when a 
Tax Group is submitted with an empty **tax-components** array.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to