tables · table
rmmas
The rmmas table is a central lookup used across purchasing (rmincoming), inventory (rmstock), and production (jobhdr, mchdr). It stores technical details such as material grade, size ranges, unit of measure, and HSN codes, as well as operational flags for status (active/inactive) and record locking.
Row count
542
Last entry
—
Source
tables
Columns
22| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Primary Key |
compcode | string | No | Company Identifier |
rmcode | string | No | Raw Material Code |
rmname | string | Yes | Material Description |
rmcolor | string | Yes | Material Finish/Color |
rmsize | number | Yes | Physical Size (From) |
uom | string | Yes | Unit of Measure |
rmrate | number | Yes | Standard Purchase Rate |
debitrmrate | string | Yes | Debit Note Rate |
rmgrade | string | Yes | Material Specification/Grade |
username | string | Yes | Audit: Creator/Modifier |
active | string | Yes | Operational Status |
chapter | string | Yes | Tax Category (Legacy) |
rmtype | string | Yes | Shape or Form |
rmsizeto | number | Yes | Physical Size (To) |
irmcode | string | Yes | Internal Reference Code |
taxrate | number | Yes | GST/Tax Percentage |
hsn | string | Yes | HSN Code |
lock | string | Yes | Record Lock Status |
RM_Condition | string | Yes | Physical State |
make | number | Yes | Brand/Manufacturer Link |
selfRMCode | string | Yes | Parent/Alternative RM Code |
Full documentation
This documentation describes the **Raw Material Master (`rmmas`)** table, which serves as the primary repository for all raw material definitions, specifications, pricing, and tax configurations within the system. ### 1) Overview The `rmmas` table is a central lookup used across purchasing (`rmincoming`), inventory (`rmstock`), and production (`jobhdr`, `mchdr`). It stores technical details such as material grade, size ranges, unit of measure, and HSN codes, as well as operational flags for status (active/inactive) and record locking. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Primary Key | | Row identifier. | | **compcode** | string | No | Company Identifier | e.g., "DAS", "RF2" | Used for multi-tenant data partitioning. | | **rmcode** | string | No | Raw Material Code | Unique alphanumeric | The unique identifier for the material; joins with inventory and purchasing. | | **rmname** | string | Yes | Material Description | e.g., "WIRE ROD 11.0 MM" | Primary descriptive label for reports. | | **rmcolor** | string | Yes | Material Finish/Color | "BLACK", "BRIGHT", "SILVER" | Used for visual identification. | | **rmsize** | number | Yes | Physical Size (From) | e.g., 11.0, 45.0 | Minimum diameter or thickness. | | **uom** | string | Yes | Unit of Measure | "KGS", "MTR", "PCS" | Primary unit for quantity calculations. | | **rmrate** | number | Yes | Standard Purchase Rate | | Used for valuation when actual purchase rates are missing. | | **debitrmrate** | string | Yes | Debit Note Rate | | Likely used for material returns to suppliers. | | **rmgrade** | string | Yes | Material Specification/Grade | e.g., "SAE1018", "16MnCr5" | Technical quality classification. | | **username** | string | Yes | Audit: Creator/Modifier | | Tracks the last user to update the record. | | **active** | string | Yes | Operational Status | "Y", "N" | Determines if the material is available for selection. | | **chapter** | string | Yes | Tax Category (Legacy) | | Often matches the HSN code. | | **rmtype** | string | Yes | Shape or Form | "BAR", "WIRE", "ROUND", "HEX" | Categorizes materials by physical form factor. | | **rmsizeto** | number | Yes | Physical Size (To) | | Maximum diameter or thickness for a range. | | **irmcode** | string | Yes | Internal Reference Code | | Cross-reference to legacy or external codes. | | **taxrate** | number | Yes | GST/Tax Percentage | e.g., 18.0 | Default tax rate applied during procurement. | | **hsn** | string | Yes | HSN Code | 8-digit codes | Mandatory for GST invoice generation. | | **lock** | string | Yes | Record Lock Status | "Y", "N" | Prevents modification of sensitive material masters. | | **RM_Condition** | string | Yes | Physical State | | e.g., "Annealed" (Inferred). | | **make** | number | Yes | Brand/Manufacturer Link | Links to `brandmas` | Numeric ID of the material producer. | | **selfRMCode** | string | Yes | Parent/Alternative RM Code | | Used for material mapping or substitution. | ### 3) Relationships & Join Map #### Parent Table * **dbo.rmtype**: Joins on `rmtype`. * **dbo.grademas**: Joins on `rmgrade`. * **dbo.brandmas**: Joins on `make` (matches `brandmas.Br_code`). #### Child Tables (Transactions & Inventory) * **dbo.itemmas**: Links via `rmcode`. `itemmas` records use specific Raw Materials as their base component. * **dbo.rmincoming**: Joins on `rmcode` and `compcode`. Tracks specific receipts and purchase bills for these materials. * **dbo.rmjobhdr / dbo.rmjobdtl**: Links via `rmcode` or `rmcodereq`. Used when issuing material for drawing or machining. * **dbo.rmstock**: Joins on `rmcode`. Provides current ledger balances for materials. * **dbo.rmmrphdr**: Joins on `rmcodereq`. Tracks material drawing/annealing results. * **dbo.RMOpr**: Joins on `rmcode`. Maps specific manufacturing operations to the raw material. * **dbo.rmpotabitem**: Joins on `rmcode`. Links the master record to line items in Purchase Orders. * **dbo.jobhdr**: Joins on `rmcode`. Tracks material issued to first-operation job cards. #### Join Examples ```sql -- Purchasing Audit SELECT M.rmname, I.billno, I.rmwt, I.rmrate FROM dbo.rmmas M JOIN dbo.rmincoming I ON M.rmcode = I.rmcode AND M.compcode = I.compcode; -- Production Planning SELECT M.rmgrade, J.jobcardno, J.rmweight FROM dbo.rmmas M JOIN dbo.rmjobhdr J ON M.rmcode = J.rmcodereq AND M.compcode = J.compcode; ```