GST Tax Calculation

Beta

Last updated: 29 August 2026

Browse Documentation

Overview

GST in NICE HMS is calculated per line item on each invoice. The tax rates are configured once on the item master, inherited by every invoice line, and stored alongside the transaction so the breakdown (CGST/SGST/IGST, taxable value, tax amount) is always auditable.

Where Tax Rates Are Configured

Each item carries its own GST rates. Set them in Accounts → Masters → Items (see Item Management):

FieldTypeMeaning
cgstdecimal(6,3)Central GST rate (percentage)
sgstdecimal(6,3)State GST rate (percentage)
igstdecimal(6,3)Integrated GST rate (percentage) — reserved, currently unused
hsn_sac_codevarcharHSN (goods) or SAC (services) code for the item

For example, an 18% intra-state item is configured as cgst = 9.000 and sgst = 9.000.

How GST Is Calculated

The calculation happens on the frontend (components/accounts/transactions/Invoice/index.tsx) and is re-validated on the server (pages/api/admin/accounts/transfer/patient-billing/invoice/create-invoice.ts). Per line item:

itemAmount = quantity × salePrice
itemAmount = itemAmount × (100 − discount%) / 100     // pre-GST taxable value (rounded 2dp)
gstAmount  = round(itemAmount × cgst/100, 2) + round(itemAmount × sgst/100, 2)
totalItemAmount = itemAmount + gstAmount              // amount the patient pays

So, in words: GST = (salePrice × quantity − discount) × (CGST% + SGST%).

Worked Example

An item with salePrice = ₹500, quantity = 2, cgst = 9%, sgst = 9%, and a 10% discount:

StepCalculationResult
Gross500 × 2₹1000.00
After discount1000 × (100 − 10) / 100₹900.00
CGST900 × 9 / 100₹81.00
SGST900 × 9 / 100₹81.00
gstAmount81 + 81₹162.00
totalItemAmount900 + 162₹1062.00

IGST Status

The igst field exists but is not currently active. The invoice UI hardcodes igst = 0 (with a note that choosing between IGST vs CGST/SGST is future work), so today the system only computes intra-state CGST + SGST. The server-side code already has the inter-state branch ready (if (igst != 0) → treat the entire GST as IGST) but it never triggers because the UI always sends igst = 0.

Where GST Data Is Stored

Three tables hold tax-related data:

TableRoleGST columns
Item Master (config)One row per configured item, holds the ratescgst, sgst, igst, hsn_sac_code, salePrice
item (invoice line items)One row per billed line, stores the applied rates and computed amountscgst, sgst, igst, gstAmount, itemAmount, totalItemAmount, quantity, discount, salePrice
voucher (header)The invoice headertotal amount

Field meanings on the item line-item table (see models/models/interfaces/Accounts.ts):

  • itemAmount — pre-GST taxable value (after discount)
  • gstAmount — the tax amount for the line
  • totalItemAmountitemAmount + gstAmount

GST Number on Printed Documents

There is no dedicated GSTIN field on the printed invoice. The organization's GST number should be embedded in the letterhead/header image:

  • Hospital billingaccountHeaderUrl
  • Pharmacy billingaccountHeaderPharmacyUrl

See Printing and Letter Pad Header for how to upload these images. (Account entities do have optional GST/PAN text fields in the Accounts Master, but the printed document carries the GSTIN via the letterhead image.)

FAQ

Q: Where do I set the GST rate for an item? A: Accounts → Masters → Items — set cgst, sgst, and (for future inter-state use) igst, plus the hsn_sac_code. See Item Management.

Q: Is IGST supported? A: Not yet. The field is reserved and the UI currently hardcodes igst = 0, so only CGST + SGST (intra-state) is calculated.

Q: How is discount handled before GST? A: Discount is applied first as a percentage of the gross line amount, then GST is computed on the discounted value. GST is never charged on the discount.

Q: Can I see the GST breakdown on a saved invoice? A: Yes — each line stores cgst, sgst, gstAmount, itemAmount, and totalItemAmount, and the printed invoice shows a CGST/SGST column breakdown plus a GST summary.

Q: Where does the hospital's GST number go on the invoice? A: In the letterhead/header image (accountHeaderUrl / accountHeaderPharmacyUrl), not a dedicated field.

Related

Was this page helpful?
Index
NICE HMS. 1st Gate Nehru Stadium, City Hubballi, District Dhrawad, State Karnataka, 580020
INDIA, Phone : +919611560555 email admin@nicehms.com, GST 29AEYPB4702Q1ZS
facebook
twitter
linkedin
youtube
RSS