calculate_gst
Compute GST breakdown with CGST/SGST/IGST split and optional cess for invoices, quotations, or compliance. Handles GST-inclusive amounts and intra/inter-state transactions to determine total payable tax.
Instructions
Calculate GST breakdown with CGST/SGST/IGST split and optional cess.
Use when computing tax for invoices, quotations, or GST compliance.
Args: amount: Base amount or GST-inclusive amount in rupees. gst_rate: Valid GST rate percentage. transaction_type: 'intra_state' or 'inter_state'. amount_includes_gst: Set True to back-calculate base. cess_category: For 28% items, specify applicable cess.
Returns: Standard envelope with base amount, CGST/SGST/IGST breakdown, cess amount, total GST, and total payable amount.
Notes: Rates are for general reference. Actual classification may vary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Base amount in rupees (or inclusive amount if flagged) | |
| gst_rate | Yes | GST rate as percentage: 0, 0.1, 0.25, 1.5, 3, 5, 12, 18, 28 | |
| cess_category | No | Cess category for 28% items. Default: 'default' (no cess) | default |
| transaction_type | Yes | 'intra_state' (CGST+SGST) or 'inter_state' (IGST) | |
| amount_includes_gst | No | If True, back-calculate base from GST-inclusive amount |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||