All tables
tables · table

csubgroupmas

The csubgroupmas table serves as the Consumable Sub-Group Master within the SQL Server database. It defines sub-classifications for items (typically consumables or maintenance spares) that belong to a broader category defined in the Group Master. This table is primarily used for inventory reporting, categorization in the item master, and generating ledger details (e.g., in itemledger_det).

Row count
9
Last entry
Source
tables

Columns

5
ColumnTypeNullableMeaning
indexintegerNoInternal row identifier (Primary Key).
compcodestringYesUnique identifier for the company.
groupcodestringYesCode representing the parent group classification.
subgroupcodestringYesUnique identifier for the specific sub-group.
subgroupnamestringYesDescriptive name of the sub-group category.

Full documentation

### 1) Overview
 The `csubgroupmas` table serves as the **Consumable Sub-Group Master** within the SQL Server database. It defines sub-classifications for items (typically consumables or maintenance spares) that belong to a broader category defined in the Group Master. This table is primarily used for inventory reporting, categorization in the item master, and generating ledger details (e.g., in `itemledger_det`).
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Internal row identifier (Primary Key). | 0, 1, 2... | Internal sorting. |
 | **compcode** | string | Yes | Unique identifier for the company. | e.g., "DAS" | `WHERE compcode = @company_code` |
 | **groupcode** | string | Yes | Code representing the parent group classification. | e.g., "13", "122" | Joins to `cgroupmas`. |
 | **subgroupcode** | string | Yes | Unique identifier for the specific sub-group. | e.g., "01", "02" | Joins to `citemmas`. |
 | **subgroupname** | string | Yes | Descriptive name of the sub-group category. | e.g., "ELECTRICAL" | Displaying labels in reports. |
 
 ### 3) Relationships & Join Map
 
 Based on `SCHEMA_MAP` and `REFERENCE_JSON`, the table connects to the item master and group hierarchy as follows:
 
 #### Primary Joins (Strict):
 * **dbo.citemmas**: Joins on `compcode` and `subgroupcode`. This is the most frequent join used to assign category names to individual consumable items.
 * **dbo.cgroupmas**: Joins on `compcode` and `groupcode` to establish a parent-child relationship between major groups and sub-groups.
 
 #### Secondary Joins (Common):
 * **dbo.CompanyConfig**: Joins on `compcode` for company-specific categorization logic.
 * **dbo.Suppmas / dbo.Vendmas**: Frequently associated in inventory stored procedures via `compcode` when filtering items by vendor and category.
 
 #### Likely Joins (Inferred):
 * **dbo.itemledger_det (Stored Proc)**: Uses `subgroupcode` to filter inventory movement and calculate balances for specific item categories.