tables · table
groupmas
The groupmas table serves as the master registry for item groups and assemblies within the SQL Server database. It defines high-level product groupings, their associated Unit of Measures (UOM), standard rates, and taxation (HSN) details. In the manufacturing workflow, it is frequently used in Finished Goods (FG) stock reporting and assembly production to resolve descriptive names for grouped codes.
Row count
7
Last entry
—
Source
tables
Columns
10| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Primary Key for record identification. |
compcode | string | Yes | Unique identifier for the company/entity. |
groupcode | string | Yes | Unique identifier for the item group or assembly. |
groupname | string | Yes | Full descriptive name of the group/assembly. |
uom | string | Yes | Unit of Measure for the group. |
itemrate | number | Yes | Standard rate or valuation for the group items. |
partno | string | Yes | Reference part number associated with the group. |
oprrate | string | Yes | Operation rate or processing cost associated with the group. |
hsn | string | Yes | Harmonized System of Nomenclature code for tax purposes. |
PItemcode | string | Yes | Parent Item Code for assembly hierarchy. |
Full documentation
### 1) Overview The `groupmas` table serves as the master registry for item groups and assemblies within the SQL Server database. It defines high-level product groupings, their associated Unit of Measures (UOM), standard rates, and taxation (HSN) details. In the manufacturing workflow, it is frequently used in Finished Goods (FG) stock reporting and assembly production to resolve descriptive names for grouped codes. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Primary Key for record identification. | | `PRIMARY KEY` | | **compcode** | string | Yes | Unique identifier for the company/entity. | e.g., "DAS", "BAM" | Filter/Join key for multi-tenant data isolation. | | **groupcode** | string | Yes | Unique identifier for the item group or assembly. | e.g., "PUSHROD", "SPROCKET" | Primary lookup key in stock and production logic. | | **groupname** | string | Yes | Full descriptive name of the group/assembly. | e.g., "AXLE FRONT WHEEL KTR" | Used in reporting labels. | | **uom** | string | Yes | Unit of Measure for the group. | e.g., "PCS", "KGS" | Defines quantity context. | | **itemrate** | number | Yes | Standard rate or valuation for the group items. | | Used in inventory valuation scripts. | | **partno** | string | Yes | Reference part number associated with the group. | | Internal reference. | | **oprrate** | string | Yes | Operation rate or processing cost associated with the group. | | Likely cost-per-operation reference. | | **hsn** | string | Yes | Harmonized System of Nomenclature code for tax purposes. | | Used for GST/Sales tax calculations. | | **PItemcode** | string | Yes | Parent Item Code for assembly hierarchy. | | Used to link child groups to parent products. | ### 3) Relationships & Join Map Based on `SCHEMA_MAP` and `REFERENCE_JSON` usage: #### Foreign Key / Logical Joins: * **dbo.groupitem**: Joins on `groupcode`. (Used to link groups to their constituent items). * **dbo.assemblyprodhdr**: Joins on `PItemCode`. (Used to associate production headers with group definitions). * **dbo.invdtl / dbo.Performainvdtl**: Joins on `PItemCode` (or `groupcode` as ItemCode). (Used to retrieve group names for billing and invoices). * **dbo.citemusedinpitem**: Joins on `PItemcode`. (Relates master group definitions to raw materials/sub-components). #### Shared Dimensions: * **compcode**: Joins with almost all tables (e.g., `dbo.CompanyConfig`, `dbo.ItemCategory`, `dbo.invhdr`) to ensure data is scoped to the correct company entity. * **uom**: Joins with `dbo.UoMMaster (PUoM/CUoM)` for unit conversions. #### Join Logic (Authoritative): ```sql -- Resolving group names for assembly production SELECT a.prodno, g.groupname FROM dbo.assemblyprodhdr a JOIN dbo.groupmas g ON a.PItemCode = g.PItemcode AND a.compcode = g.compcode; -- Mapping groups to specific items SELECT g.groupname, gi.itemcode FROM dbo.groupmas g JOIN dbo.groupitem gi ON g.groupcode = gi.groupcode AND g.compcode = gi.compcode; ```