All tables
tables · table

desp2jobdtl

The desp2jobdtl table serves as a secondary-stage (Job 2) transaction detail table within the inventory and production management system. It specifically stores line-item operation details for items dispatched or received via job work challans. It tracks the specific operations performed (e.g., CNC, Broaching, Final inspection), the financial year of the transaction, and flag statuses for rework and operation-less processing.

Row count
129,555
Last entry
Source
tables

Columns

10
ColumnTypeNullableMeaning
indexintegerNoPrimary key for row identification.
compcodestringNoUnique identifier for the company/branch.
challannointegerNoThe reference number of the job work challan.
oprcodestringNoThe code representing the specific manufacturing operation.
withoutoprstringYesFlag indicating if the dispatch is treated as having no specific operation.
invyearintegerNoThe financial/invoice year associated with the challan.
itemcodestringNoThe unique identifier for the material/part.
reworkstringYesIndicates if the line item is related to a rework process.
oprratedecimalYesThe financial rate applied for this specific operation.
opramtdecimalYesThe total amount for the operation (Qty * Rate).

Full documentation

### 1) Overview
 The `desp2jobdtl` table serves as a secondary-stage (Job 2) transaction detail table within the inventory and production management system. It specifically stores line-item operation details for items dispatched or received via job work challans. It tracks the specific operations performed (e.g., CNC, Broaching, Final inspection), the financial year of the transaction, and flag statuses for rework and operation-less processing.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Primary key for row identification. | | Internal ID |
 | **compcode** | string | No | Unique identifier for the company/branch. | e.g., "DAS", "HRS" | Join/Filter |
 | **challanno** | integer | No | The reference number of the job work challan. | | Join/Filter |
 | **oprcode** | string | No | The code representing the specific manufacturing operation. | CF, CNC1, CNC2, FINAL, VMC, SB | Join (to `oprmas`) |
 | **withoutopr** | string | Yes | Flag indicating if the dispatch is treated as having no specific operation. | 'N', 'Y' | Logic Filter |
 | **invyear** | integer | No | The financial/invoice year associated with the challan. | e.g., 2021, 2025 | Join/Filter |
 | **itemcode** | string | No | The unique identifier for the material/part. | | Join (to `itemmas`) |
 | **rework** | string | Yes | Indicates if the line item is related to a rework process. | 'N', ' ', 'Y' | Logic Filter |
 | **oprrate** | decimal | Yes | The financial rate applied for this specific operation. | | Calculation |
 | **opramt** | decimal | Yes | The total amount for the operation (Qty * Rate). | | Calculation |
 
 ### 3) Relationships & Join Map
 
 The table functions as a child to the `desp2job` header and relates heavily to item and operation masters for reporting.
 
 #### Primary Relationships:
 * **dbo.desp2job (Header):** Joined on `compcode`, `challanno`, and `invyear`. This is the most common join for retrieving dates (`challandate`) and quantities (`despqty`).
 * **dbo.itemmas (Item Master):** Joined on `compcode` and `itemcode` to retrieve part names, HSN codes, and surface finish details.
 * **dbo.oprmas (Operation Master):** Joined on `compcode` and `oprcode` to get full operation names (`oprname`).
 * **dbo.itemopr (Item Operation Rates):** Joined on `compcode`, `itemcode`, and `oprcode` to validate specific operation rates or operation sequences (`pisno`).
 
 #### Potential Joins (based on SCHEMA_MAP):
 * **dbo.rmjobrec2nd:** Linked via `mrpno` (found in the header `desp2job`) to track the raw material source or heat number.
 * **dbo.mactypemas:** Linked via `mccode` (indirectly through `itemopr`) to identify the machine used for the operation.