tables · table
chapter
The chapter table serves as the central master repository for HSN (Harmonized System of Nomenclature) codes and their associated tax configurations. It categorizes tractor parts, raw materials, and consumables into specific "chapters" or HSN groups, defining the baseline taxrate and SaleTaxRate for each. This table is critical for tax calculation logic in procurement (PO), production (Good Receipts), and sales (Invoicing) modules.
Row count
1,096
Last entry
—
Source
tables
Columns
5| Column | Type | Nullable | Meaning |
|---|---|---|---|
compcode | `VARCHAR` | No | Unique identifier for the company/entity. |
chapter | `VARCHAR` | No | The HSN Code or Chapter number. |
chaptertype | `VARCHAR` | Yes | Descriptive name of the HSN category or part group. |
taxrate | `DECIMAL` | Yes | The standard purchase or baseline tax percentage. |
SaleTaxRate | `DECIMAL` | Yes | The specific tax percentage applied during sales/invoicing. |
Full documentation
### 1. Overview The `chapter` table serves as the central master repository for **HSN (Harmonized System of Nomenclature)** codes and their associated tax configurations. It categorizes tractor parts, raw materials, and consumables into specific "chapters" or HSN groups, defining the baseline `taxrate` and `SaleTaxRate` for each. This table is critical for tax calculation logic in procurement (PO), production (Good Receipts), and sales (Invoicing) modules. ### 2. Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **compcode** | `VARCHAR` | No | Unique identifier for the company/entity. | e.g., "DAS" | Primary filter for all joins and multi-tenant queries. | | **chapter** | `VARCHAR` | No | The HSN Code or Chapter number. | e.g., "87089900", "27101940" | The primary business key used to join with Item masters and Invoices. | | **chaptertype** | `VARCHAR` | Yes | Descriptive name of the HSN category or part group. | e.g., "Tractor Parts", "2711" | Used in reporting (e.g., RG1 reports) to provide human-readable categories. | | **taxrate** | `DECIMAL` | Yes | The standard purchase or baseline tax percentage. | e.g., 5.0, 18.0 | Used for tax estimation in Purchase Orders. | | **SaleTaxRate** | `DECIMAL` | Yes | The specific tax percentage applied during sales/invoicing. | e.g., 12.0, 18.0 | Applied in Sales Register and Invoice generation logic. | *Note: While `index` is present in the data sample, it is omitted from the authoritative SCHEMA_MAP and is likely a row identifier or identity column.* ### 3. Relationships & Join Map The `chapter` table is a reference master linked to various transactional and master entities via the `chapter` (HSN) and `compcode` columns. #### Physical Joins (Authoritative via SCHEMA_MAP) **1. Item Masters (HSN Lookup)** * **dbo.itemmas**: Maps standard items to tax chapters. * `chapter.chapter = itemmas.chapter` AND `chapter.compcode = itemmas.compcode` * **dbo.rmmas**: Maps raw materials to tax chapters. * `chapter.chapter = rmmas.chapter` AND `chapter.compcode = rmmas.compcode` * **dbo.saleitemmas**: Maps finished goods/sales items to tax chapters. * `chapter.chapter = saleitemmas.chapter` AND `chapter.compcode = saleitemmas.compcode` **2. Sales & Invoicing (Tax Validation)** * **dbo.invhdr**: Links HSN chapters directly to invoice headers for tax summarization. * `chapter.chapter = invhdr.chapter` AND `chapter.compcode = invhdr.compcode` * **dbo.TEMPSALEREGISTER**: Used for generating statutory sales reports. * `chapter.chapter = TEMPSALEREGISTER.chapter` AND `chapter.compcode = TEMPSALEREGISTER.compcode` **3. Procurement (PO Taxing)** * **dbo.pohdr / dbo.pohdramnd**: Determines the tax rate applicable to specific Purchase Orders. * `chapter.chapter = pohdr.chapter` AND `chapter.compcode = pohdr.compcode` **4. Production (Receipting)** * **dbo.goodreceipt**: Used to record tax chapters during the inspection and receipt of goods. * `chapter.chapter = goodreceipt.chapter` AND `chapter.compcode = goodreceipt.compcode` #### Inferred Joins (Likely) * **dbo.invdtl / dbo.Performainvdtl**: Although these tables use `hsn`, they logically align with the `chapter.chapter` column for descriptive lookups in stored procedures like `rg1_rptItemJIP`.