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%