Last updated: 29 August 2026
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.
Each item carries its own GST rates. Set them in Accounts → Masters → Items (see Item Management):
| Field | Type | Meaning |
|---|---|---|
| cgst | decimal(6,3) | Central GST rate (percentage) |
| sgst | decimal(6,3) | State GST rate (percentage) |
| igst | decimal(6,3) | Integrated GST rate (percentage) — reserved, currently unused |
| hsn_sac_code | varchar | HSN (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.
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%).
An item with salePrice = ₹500, quantity = 2, cgst = 9%, sgst = 9%, and a 10% discount:
| Step | Calculation | Result |
|---|---|---|
| Gross | 500 × 2 | ₹1000.00 |
| After discount | 1000 × (100 − 10) / 100 | ₹900.00 |
| CGST | 900 × 9 / 100 | ₹81.00 |
| SGST | 900 × 9 / 100 | ₹81.00 |
| gstAmount | 81 + 81 | ₹162.00 |
| totalItemAmount | 900 + 162 | ₹1062.00 |
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.
Three tables hold tax-related data:
| Table | Role | GST columns |
|---|---|---|
| Item Master (config) | One row per configured item, holds the rates | cgst, sgst, igst, hsn_sac_code, salePrice |
item (invoice line items) | One row per billed line, stores the applied rates and computed amounts | cgst, sgst, igst, gstAmount, itemAmount, totalItemAmount, quantity, discount, salePrice |
voucher (header) | The invoice header | total amount |
Field meanings on the item line-item table (see models/models/interfaces/Accounts.ts):
itemAmount + gstAmountThere is no dedicated GSTIN field on the printed invoice. The organization's GST number should be embedded in the letterhead/header image:
accountHeaderUrlaccountHeaderPharmacyUrlSee 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.)
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.