All tables
tables · table

mrcirhdr

The mrcirhdr table (Material Receipt Cumulative Inspection Report Header) serves as the primary header record for material receipts and initial inspections of components returning from job-work vendors. It specifically tracks the "1st Operation" (Ist Opr) outcomes in a manufacturing process, including received quantities, accepted/rejected counts, and associated weights. It links vendor challans (billno) and job cards (jobcardno) to internal inspection documents (irno).

Row count
19,387
Last entry
2026-01-16
Source
tables

Columns

34
ColumnTypeNullableMeaning
indexintegerNoPrimary Key (Internal)
compcodestringNoCompany identifier
mrpnointegerNoMaterial Receipt Plan/Note Number
mrpdatedatetimeNoDate of material receipt
rgpnointegerYesReturnable Gate Pass Number
billnointegerYesVendor's Bill/Challan Number
billdatedatetimeYesDate on the vendor's bill
gpnointegerYesGate Pass Number
gpdatedatetimeYesGate Pass Date
jobcardnointegerYesReference to the production job card
irnointegerYesInspection Report Number
irdatedatetimeYesDate of inspection
totalwtrecnumberYesTotal weight received (gross)
vendcodestringYesJob-work vendor code
qtyrecdintegerYesActual quantity physically received
qtyacptintegerYesQuantity accepted after inspection
qtyrejintegerYesQuantity rejected (often requires rework)
qtyscrapintegerYesQuantity marked as non-recoverable scrap
wtacptnumberYesWeight of accepted components
wtrejnumberYesWeight of rejected components
scrapwtnumberYesWeight of scrap generated
lotnostringYesProduction lot number
qtychintegerYesQuantity as per vendor's challan
wtchnumberYesWeight as per vendor's challan
wtadjnumberYesWeight adjustment value
itemcodestringYesCode of the component being received
moddatedatetimeYesLast modification date
useraddstringYesUser who added the record
addtimestringYesTimestamp of record creation
final_statusstringYesCompletion status of the inspection
noprcodestringYesNext Operation Code
heatnostringYesRaw material heat number
sublotnostringYesSub-division of the lot number
locationstringYesPhysical storage location

Full documentation

### 1) Overview
 The `mrcirhdr` table (Material Receipt Cumulative Inspection Report Header) serves as the primary header record for material receipts and initial inspections of components returning from job-work vendors. It specifically tracks the "1st Operation" (Ist Opr) outcomes in a manufacturing process, including received quantities, accepted/rejected counts, and associated weights. It links vendor challans (`billno`) and job cards (`jobcardno`) to internal inspection documents (`irno`).
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Primary Key (Internal) | | Primary Key |
 | **compcode** | string | No | Company identifier | e.g., "DAS", "BAM" | Join, Filter |
 | **mrpno** | integer | No | Material Receipt Plan/Note Number | | Unique ID per receipt |
 | **mrpdate** | datetime | No | Date of material receipt | | Date filtering |
 | **rgpno** | integer | Yes | Returnable Gate Pass Number | | Join to `rgphdr` |
 | **billno** | integer | Yes | Vendor's Bill/Challan Number | | Reference tracking |
 | **billdate** | datetime | Yes | Date on the vendor's bill | | |
 | **gpno** | integer | Yes | Gate Pass Number | | Gate entry tracking |
 | **gpdate** | datetime | Yes | Gate Pass Date | | |
 | **jobcardno** | integer | Yes | Reference to the production job card | | Join to `jobhdr` |
 | **irno** | integer | Yes | Inspection Report Number | | Join to `iteminspectionhdr` |
 | **irdate** | datetime | Yes | Date of inspection | | |
 | **totalwtrec** | number | Yes | Total weight received (gross) | | Weight validation |
 | **vendcode** | string | Yes | Job-work vendor code | e.g., "RSI", "VI" | Join to `vendmas` |
 | **qtyrecd** | integer | Yes | Actual quantity physically received | | Quantitative analysis |
 | **qtyacpt** | integer | Yes | Quantity accepted after inspection | | Yield calculation |
 | **qtyrej** | integer | Yes | Quantity rejected (often requires rework) | | Quality metric |
 | **qtyscrap** | integer | Yes | Quantity marked as non-recoverable scrap | | Loss analysis |
 | **wtacpt** | number | Yes | Weight of accepted components | | |
 | **wtrej** | number | Yes | Weight of rejected components | | |
 | **scrapwt** | number | Yes | Weight of scrap generated | | |
 | **lotno** | string | Yes | Production lot number | | Join to `product2` |
 | **qtych** | integer | Yes | Quantity as per vendor's challan | | Reconciliation |
 | **wtch** | number | Yes | Weight as per vendor's challan | | |
 | **wtadj** | number | Yes | Weight adjustment value | | |
 | **itemcode** | string | Yes | Code of the component being received | | Join to `itemmas` |
 | **moddate** | datetime | Yes | Last modification date | | Audit |
 | **useradd** | string | Yes | User who added the record | | Audit |
 | **addtime** | string | Yes | Timestamp of record creation | | Audit |
 | **final_status** | string | Yes | Completion status of the inspection | '0' (WIP), '1' (Final) | Filtering |
 | **noprcode** | string | Yes | Next Operation Code | e.g., "CLOSE", "FINAL" | Join to `oprmas` |
 | **heatno** | string | Yes | Raw material heat number | | Traceability |
 | **sublotno** | string | Yes | Sub-division of the lot number | | Traceability |
 | **location** | string | Yes | Physical storage location | | Join to `location` |
 
 ### 3) Relationships & Join Map
 
 #### Parent Tables
 * **vendmas**: Joined via `compcode` and `vendcode` to retrieve vendor names and GST details.
 * **itemmas**: Joined via `compcode` and `itemcode` to get item descriptions and part numbers.
 * **jobhdr**: Joined via `compcode` and `jobcardno` to link the receipt back to the original 1st operation job issuance.
 * **rgphdr**: Joined via `compcode` and `rgpno` to track returns against gate passes.
 
 #### Child Tables
 * **mrcirdtl**: Joined via `compcode` and `mrpno` to see specific operation-level inspection details.
 * **mrprejhdr**: Joined via `compcode` and `jobcardno` (referenced as `jobno` in child) to track the issuance of rejected items for rework.
 
 #### Join Logic (Example)
 ```sql
 SELECT 
  h.mrpno, 
  v.vendname, 
  i.itemname, 
  j.rmweight,
  h.qtyacpt
 FROM mrcirhdr h
 INNER JOIN vendmas v ON h.compcode = v.compcode AND h.vendcode = v.vendcode
 INNER JOIN itemmas i ON h.compcode = i.compcode AND h.itemcode = i.itemcode
 INNER JOIN jobhdr j ON h.compcode = j.compcode AND h.jobcardno = j.jobcardno
 WHERE h.mrpdate BETWEEN '2023-01-01' AND '2023-12-31';
 ```