Thursday, June 22, 2017

GST Calculation Formula (India) using SQL Server

Hi, friends GST is now start in INDIA. Now I’m describing how to calculate Product Amount and GST price from MRP Rate through our programing languages.

The basic calculation is Amount Excluding GST = (100*MRP (With GST))/ (100+GST (%))

For Example MRP Rate = 105 (N.B. MRP is include with GST)
That price has included GST 5%.
Amount Excluding GST = (100 * 105) / (100 + 5)
That will give Amount Excluding GST = 100 Rs.
GST Amount = MRP RATE – Amount Excluding GST 
GST Amount = (105 – 100)
GST Amount = 5 Rs.

Now I’ve written a simple SQL Query to fetch these amount. This code is help you to use in other languages like .Net, Java, etc.

DECLARE @MRP AS NUMERIC(19,2) = 100
DECLARE @GST AS NUMERIC(19,2) = 5
SELECT Amount = (100*@MRP)/(100+@GST)
SELECT GST = @MRP - (100*@MRP)/(100+@GST)
-------------------------------------------------------------------------------------------------------------------
Result : Amount = 95.238095238095238
              GST = 4.761904761904762
-------------------------------------------------------------------------------------------------------------------
If there is any other better option,
Please share it here or mail to me arkaa4@gmail.com

Thank You,
Arka Gupta.

5 comments:

  1. The GST receipt is given dependent on the GST charge rate, by a merchant with a legitimate GSTIN. Vakilsearch site to know about gst invoice

    ReplyDelete
  2. Thanks, Visit to the following link to GST Filing Online

    ReplyDelete
  3. A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. GST Primary Application Result

    ReplyDelete
  4. thanks. I used this in tsql to calc gst and non gst values based on itemtype using a case stmt below: (saved this in a view) SELECT dbo.DC02_ItemsWholegood.DC02ItemsDKey,
    dbo.DC02_ItemsWholegood.ItemNumber,
    dbo.DC02_ItemsWholegood.ItemName,
    dbo.DC02_ItemsWholegood.ItemDescription,
    dbo.DC02_ItemsWholegood.HierarchyLevel4Description,
    dbo.DC02_ItemsWholegood.HierarchyLevel4,
    dbo.DC12_ItemFacility.RrpPrice,
    ( case when dbo.DC02_ItemsWholegood.ItemType = N'W01' then dbo.DC12_ItemFacility.[RRPprice] when dbo.DC02_ItemsWholegood.ItemType = N'W44' then dbo.DC12_ItemFacility.[RRPprice]*1.15 end) AS RRPInclGST,
    ( case when dbo.DC02_ItemsWholegood.ItemType = N'W01' then (100*dbo.DC12_ItemFacility.[RRPprice])/ (100+15) when dbo.DC02_ItemsWholegood.ItemType = N'W44' then dbo.DC12_ItemFacility.[RRPprice] end) AS RRPExGST
    FROM dbo.DC02_ItemsWholegood INNER JOIN
    dbo.DC12_ItemFacility ON
    dbo.DC02_ItemsWholegood.ItemNumber = dbo.DC12_ItemFacility.ItemNumber

    ReplyDelete