tables · table
productgrade
The productgrade table serves as a reference master for defining and categorizing quality grades or technical specifications for products. It maps specific numeric grades to detailed descriptions and short codes, providing standardized classification levels used across inventory, sales, and quality inspection modules.
Row count
1
Last entry
—
Source
tables
Columns
5| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Primary Key; unique internal record identifier |
compcode | string | No | Company Code; unique identifier for the organizational unit |
productgrade | number | No | The numeric value or rating assigned to a specific quality level |
pgradedetail | string | Yes | Detailed textual description of the product grade |
shortcode | string | Yes | Abbreviated code used for quick entry or display |
Full documentation
### 1) Overview The `productgrade` table serves as a reference master for defining and categorizing quality grades or technical specifications for products. It maps specific numeric grades to detailed descriptions and short codes, providing standardized classification levels used across inventory, sales, and quality inspection modules. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Primary Key; unique internal record identifier | Auto-incremented | Join key for internal row referencing | | **compcode** | string | No | Company Code; unique identifier for the organizational unit | e.g., "DAS" | `WHERE compcode = 'DAS'` | | **productgrade** | number | No | The numeric value or rating assigned to a specific quality level | e.g., 0.0, 1.0 | Join key for item master and inspections | | **pgradedetail** | string | Yes | Detailed textual description of the product grade | e.g., "Prime Quality" | Filtering and display labels | | **shortcode** | string | Yes | Abbreviated code used for quick entry or display | e.g., "01" | UI display or report filtering | ### 3) Relationships & Join Map The `productgrade` table functions as a master table. Joins are primarily performed on the numeric grade and company context. #### Primary Joins (SCHEMA_MAP Verified): * **dbo.itemmas**: Join on `compcode` and `productgrade`. This assigns a specific grade level to a cataloged item. * **dbo.pdiinspectionhdr**: Join on `compcode` and `productgrade`. Used during Pre-Delivery Inspection (PDI) to validate if a finished good meets the required grade. * **dbo.saleitemmas**: Join on `compcode` and `pgradedetail`. Likely used to link sales-specific item definitions to the master grade description. #### Join Examples: ```sql -- Checking item master for specific grades SELECT i.itemname, g.pgradedetail FROM dbo.itemmas i JOIN dbo.productgrade g ON i.compcode = g.compcode AND i.productgrade = g.productgrade; -- Quality Inspection validation SELECT h.irno, g.shortcode FROM dbo.pdiinspectionhdr h JOIN dbo.productgrade g ON h.compcode = g.compcode AND h.ProductGrade = g.productgrade; ```