tables · table
rmreturn
The rmreturn table is a transaction ledger used to track the return of raw materials (RM) within a manufacturing or inventory management system. It specifically records materials returned to the stores from two primary sources:
Row count
2,912
Last entry
2026-01-15
Source
tables
Columns
24| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Primary Key |
compcode | string | Yes | Company Code |
returnno | integer | Yes | Return Transaction Number |
returndate | datetime | Yes | Date of Return |
issueno | integer | Yes | In-house Issue Number |
jobno | integer | Yes | Job Card Number |
mrpno | integer | Yes | Material Receipt No (GRN) |
rmcode | string | Yes | Raw Material Code |
chno | integer | Yes | Challan Number |
returnwt | number | Yes | Weight Returned |
remarks | string | Yes | Transaction Notes |
username | string | Yes | Authorized User |
useradd | string | Yes | Created By |
addtime | string | Yes | Entry Timestamp |
usermod | string | Yes | Modified By |
modtime | string | Yes | Modification Timestamp |
printflag | string | Yes | Print Status |
gpno | number | Yes | Gate Pass Number |
gpdate | datetime | Yes | Gate Pass Date |
authflag | string | Yes | Authorization Status |
reason | string | Yes | Reason for Return |
location | string | Yes | Storage Location |
heatno | string | Yes | Material Heat Number |
mrpdate | datetime | Yes | Batch/MRP Date |
Full documentation
### 1) Overview The `rmreturn` table is a transaction ledger used to track the return of raw materials (RM) within a manufacturing or inventory management system. It specifically records materials returned to the stores from two primary sources: 1. **In-house Machines:** Identified by the `issueno` column (linking to machine issue headers). 2. **External Job Work Vendors:** Identified by the `jobno` column (linking to job card numbers). The table captures the weight returned (`returnwt`), the specific material batch reference (`mrpno`), and authorization statuses (`authflag`). It is critical for calculating accurate material balances and net consumption for specific jobs or production runs. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Primary Key | | Internal unique identifier. | | **compcode** | string | Yes | Company Code | e.g., "DAS", "RF2" | Used for multi-tenant data partitioning. | | **returnno** | integer | Yes | Return Transaction Number | | Primary document reference for the return. | | **returndate** | datetime | Yes | Date of Return | | Filters returns by fiscal period. | | **issueno** | integer | Yes | In-house Issue Number | | Links to `mchdr` or `rmmchdr`. 0 if return is from vendor. | | **jobno** | integer | Yes | Job Card Number | | Links to `jobhdr.jobcardno` for vendor-side returns. | | **mrpno** | integer | Yes | Material Receipt No (GRN) | | Links to `rmincoming` to identify the material batch. | | **rmcode** | string | Yes | Raw Material Code | | Joins with `rmmas` to get material descriptions. | | **chno** | integer | Yes | Challan Number | | External document reference. | | **returnwt** | number | Yes | Weight Returned | | Subtracted from issued weights in stock reports. | | **remarks** | string | Yes | Transaction Notes | | General comments (e.g., "SENT TO RASHMI ENGG"). | | **username** | string | Yes | Authorized User | | Tracks which user authorized the transaction. | | **useradd** | string | Yes | Created By | | Audit trail for entry creation. | | **addtime** | string | Yes | Entry Timestamp | | System-generated date and time of record creation. | | **usermod** | string | Yes | Modified By | | Audit trail for record updates. | | **modtime** | string | Yes | Modification Timestamp | | Last update time. | | **printflag** | string | Yes | Print Status | | Likely 'Y' or NULL. | | **gpno** | number | Yes | Gate Pass Number | | Security/Logistics reference. | | **gpdate** | datetime | Yes | Gate Pass Date | | Security/Logistics reference. | | **authflag** | string | Yes | Authorization Status | 'Y', 'N' | Filters valid/authorized returns in stock logic. | | **reason** | string | Yes | Reason for Return | | e.g., "new f4 issue", "Bended Pipe". | | **location** | string | Yes | Storage Location | | Physical location code. | | **heatno** | string | Yes | Material Heat Number | | Traceability reference for the material batch. | | **mrpdate** | datetime | Yes | Batch/MRP Date | | Reference date for the original material receipt. | ### 3) Relationships & Join Map #### Logical Joins (Authorized by SCHEMA_MAP) 1. **Material Master:** * Join `rmreturn` to `rmmas` on `rmcode` and `compcode`. * *Usage:* To retrieve material descriptions (`rmname`), grades, and units of measure. 2. **Job Card Header:** * Join `rmreturn` to `jobhdr` on `jobno` = `jobcardno` and `compcode`. * *Usage:* To reconcile vendor returns against specific Job Work challans. 3. **Machine Issue Header:** * Join `rmreturn` to `mchdr` on `issueno` and `compcode`. * *Usage:* To reconcile in-house machine returns against production issue slips. 4. **Batch Receipt (GRN):** * Join `rmreturn` to `rmincoming` on `mrpno` and `compcode`. * *Usage:* To track returns back to the original supplier purchase/receipt batch. 5. **Vendor Master (via Job Work):** * Join `rmreturn` → `jobhdr` (on `jobno`) → `vendmas` (on `vendcode`). * *Usage:* To report on raw material returns categorized by vendor. ### Summary Block