tables · table
cmrrhdr
The cmrrhdr table serves as the Consumable/Material Repair Receipt Header. Within the ERP's procurement and inventory lifecycle, this table records the return of items that were previously sent out to vendors or repairers via a Returnable Gate Pass (RGP). It acts as the primary document for reconciling repair services, capturing vendor billing details, gate entry dates, and total taxable amounts for services rendered.
Row count
24,376
Last entry
2029-08-29
Source
tables
Columns
15| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Internal system row identifier |
compcode | string | No | Unique Company Code |
mrpno | integer | No | **Material Receipt/Repair Number**. The unique ID for this receipt. |
mrpdate | datetime | Yes | Date of the repair receipt/entry |
rgpno | integer | Yes | Linked **Returnable Gate Pass Number** |
vendcode | string | Yes | Unique code for the Vendor/Repairer |
billno | integer | Yes | Vendor's Invoice/Bill Number |
billdate | datetime | Yes | Date on the vendor's invoice |
billamt | number | Yes | Total Gross Bill Amount (including taxes) |
gpno | integer | Yes | Gate Pass/Entry Number from security |
gpdate | datetime | Yes | Date the material entered the gate |
chno | integer | Yes | Reference Challan Number |
chdate | datetime | Yes | Date on the reference challan |
vattype | string | Yes | VAT categorization (Legacy field) |
Tot_TaxableAmt | number | Yes | Total taxable value of the repair service |
Full documentation
### 1. Overview The `cmrrhdr` table serves as the **Consumable/Material Repair Receipt Header**. Within the ERP's procurement and inventory lifecycle, this table records the return of items that were previously sent out to vendors or repairers via a **Returnable Gate Pass (RGP)**. It acts as the primary document for reconciling repair services, capturing vendor billing details, gate entry dates, and total taxable amounts for services rendered. ### 2. Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Internal system row identifier | | Primary Key | | **compcode** | string | No | Unique Company Code | e.g., "DAS" | Join; Filter | | **mrpno** | integer | No | **Material Receipt/Repair Number**. The unique ID for this receipt. | | Primary Join Key | | **mrpdate** | datetime | Yes | Date of the repair receipt/entry | | Filter; Grouping | | **rgpno** | integer | Yes | Linked **Returnable Gate Pass Number** | | Join to `rgphdr` | | **vendcode** | string | Yes | Unique code for the Vendor/Repairer | e.g., "SR", "NI" | Join to `vendmas` | | **billno** | integer | Yes | Vendor's Invoice/Bill Number | | Reference | | **billdate** | datetime | Yes | Date on the vendor's invoice | | Audit; Reconciliation | | **billamt** | number | Yes | Total Gross Bill Amount (including taxes) | | Financial Calculation | | **gpno** | integer | Yes | Gate Pass/Entry Number from security | | Audit Trail | | **gpdate** | datetime | Yes | Date the material entered the gate | | Logic validation | | **chno** | integer | Yes | Reference Challan Number | | External Reference | | **chdate** | datetime | Yes | Date on the reference challan | | External Reference | | **vattype** | string | Yes | VAT categorization (Legacy field) | | Likely Null | | **Tot_TaxableAmt** | number | Yes | Total taxable value of the repair service | | Tax Reporting (GST/VAT) | ### 3. Relationships & Join Map Based on the `SCHEMA_MAP` and `REFERENCE_JSON`, the following joins are authoritative: #### Primary Internal Joins (Transaction Details) * **cmrrdtl**: Join on `mrpno` and `compcode`. Captures specific item-level details (quantities accepted/rejected) for the repair receipt. * **cmrrduty**: Join on `mrpno` and `compcode`. Captures tax components (CGST, SGST, IGST) associated with the repair bill. #### External Entity Joins * **vendmas (Vendor Master)**: Join on `vendcode` and `compcode`. Used to retrieve vendor names, GSTIN, and address details. * **rgphdr (RGP Header)**: Join on `rgpno` and `compcode`. Used to reconcile the incoming material against the original outgoing document. * **rgpdtl (RGP Detail)**: Join on `rgpno` and `compcode` (Likely also on `citmcode` via `cmrrdtl`) to verify specific items sent for repair. #### Upstream Relationships (Referenced in Procedures) * **citemmas**: Linked indirectly via `cmrrdtl.citmcode` to fetch Consumable Item names and UOMs. * **FinancialMonitoringStatus (SP)**: Aggregates `billamt` from `cmrrhdr` to report on repair and maintenance expenses. * **GstRegisterInput (SP)**: Uses `Tot_TaxableAmt` and `mrpno` to generate Input Tax Credit (ITC) reports.