Inconsistent Summary Tax Handling in Purchase Invoice (isSOTrx = N) – iDempiere 12,GST setup (India)

72 views
Skip to first unread message

Nisha John

unread,
Feb 11, 2026, 11:52:46 AMFeb 11
to iDempiere
Hello Team,
I would like to report a possible inconsistency in summary (parent-child) tax handling in iDempiere 12.
Parent tax: SGST+CGST 18% (Summary Level = Y)
Child taxes: SGST 9% and CGST 9% (linked to parent)
Sales Invoice (isSOTrx = Y):
Parent tax explodes correctly
Two child tax lines (9% + 9%) are created in C_InvoiceTax
Amounts are calculated correctly
Purchase Invoice (isSOTrx = N):
Child tax lines are created in C_InvoiceTax
However, the full 18% amount is applied to each child
Instead of splitting correctly into 9% + 9%
It appears related to the logic in MInvoiceTax.calculateTaxFromLines():
if (!documentLevel && amt.signum() != 0 && !isSOTrx) // manually entered
;
else if (documentLevel || baseAmt.signum() == 0)
amt = Env.ZERO;
else // calculate line tax
amt = tax.calculateTax(baseAmt, isTaxIncluded(), getPrecision());
//
taxAmt = taxAmt.add(amt);
Because of the !isSOTrx condition, recalculation is skipped for Purchase invoices when an amount is already present, leading to incorrect distribution of summary tax.
From a GST perspective, consistent splitting is expected.

Shiju TP

unread,
May 29, 2026, 4:07:26 PM (3 days ago) May 29
to iDempiere
In Purchase Transaction in order to match with Vendor Invoice, tax is not calculated by calling tax.calculateTax

In Indian context Tax is split between Federal/Union/Central government   and  State/Regional government

For example SGST/CGST-18% is a parent tax which is split between the 2 governments  as follows

SGST 9% is Paid To  by State/Regional Goverment
CGST 9% is Paid To  by Central/Federal/Union Goverment

This is applicable in both Purchase and Sales Transaction

But because of the below code

 if (!documentLevel && amt.signum() != 0 && !isSOTrx) // manually entered

the splitting of Tax into 2 Child Tax is blocked in Purchase Transaction which is a bug  or oversight

How To:

1) Create a Parent Tax 
    
   SGST+CGST-18%  Rate is 18% and  set True as Summary / Parent

2) Create 2 Child Tax
     
  SGST-8%  Rate is 8% and set SGST+CGST-18% as Parent Tax 
  CGST-8% Rate is 8% and set SGST+CGST-18% as Parent Tax

3 Create a Tax Category GST-18% and assign to a Product PlumTree

4) Now create a Purchase Invoice / Vendor Invoice for the Plum Tree  

5) Now create a Sale Invoice / Customer Invoice for the Plum Tree  

6) Process the both Purchase Invoice and Sales Invoice and check Tax Invoice Tab of both Invoices

 7) In Purchase Invoice Tax calculation is wrong     18% SGST + 18% CGST  = 36%

8) In Sales Invoice Tax Calculation is right    8% SGST + 8% CGST  = 18%
Reply all
Reply to author
Forward
0 new messages