tables · table
desp1stjobdtl
The desp1stjobdtl table serves as the line-item detail for first-stage job work or dispatch challans. It captures the specific operations (e.g., Hardening, Normalizing, Final inspection) performed on items listed in a dispatch challan. This table acts as a child to the desp1stjob header and is critical for calculating job work income and monitoring manufacturing progress across different operation stages.
Row count
10,806
Last entry
—
Source
tables
Columns
9| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Internal primary key for the record. |
compcode | string | No | Company code for multi-tenant identification. |
chno | integer | No | Challan Number; links to the parent dispatch header. |
oprcode | string | No | Operation Code identifying the manufacturing step. |
withoutopr | string | Yes | Flag indicating if operation details are bypassed. |
invyear | integer | No | Financial/Invoice year associated with the challan. |
itemcode | string | No | The unique identifier for the part or raw material. |
oprrate | string | Yes | The rate charged for the specific operation. |
opramt | string | Yes | Total amount for the operation (Qty * Rate). |
Full documentation
### 1) Overview The `desp1stjobdtl` table serves as the line-item detail for first-stage job work or dispatch challans. It captures the specific operations (e.g., Hardening, Normalizing, Final inspection) performed on items listed in a dispatch challan. This table acts as a child to the `desp1stjob` header and is critical for calculating job work income and monitoring manufacturing progress across different operation stages. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Internal primary key for the record. | | Primary Key | | **compcode** | string | No | Company code for multi-tenant identification. | e.g., "DAS" | Join Key (Global) | | **chno** | integer | No | Challan Number; links to the parent dispatch header. | | Join Key (Header) | | **oprcode** | string | No | Operation Code identifying the manufacturing step. | BC, FINAL, HARD, HOT, NORM, SB | Join Key / Filter | | **withoutopr** | string | Yes | Flag indicating if operation details are bypassed. | 'N', 'Y' | Filter (Logic) | | **invyear** | integer | No | Financial/Invoice year associated with the challan. | e.g., 2023 | Join Key | | **itemcode** | string | No | The unique identifier for the part or raw material. | | Join Key / Search | | **oprrate** | string | Yes | The rate charged for the specific operation. | | Calculation | | **opramt** | string | Yes | Total amount for the operation (Qty * Rate). | | Financial Reporting | ### 3) Relationships & Join Map #### Parent Table * **desp1stjob**: Joins on `compcode`, `chno`, and `invyear`. This table provides header context such as dates, customer codes, and total quantities. #### Reference Tables * **itemopr**: Joins on `compcode`, `itemcode`, and `oprcode`. Used to retrieve standard operation details, drawing numbers, and weights specific to that item-operation pair. * **oprmas**: Joins on `compcode` and `oprcode`. Used to get the descriptive name of the operation (e.g., "HARD" -> "Hardening"). * **itemmas**: Joins on `compcode` and `itemcode`. Used to fetch part numbers, HSN codes, and item descriptions. #### JOIN Examples ```sql -- Join with Header and Item Operations for financial reporting SELECT h.chdate, d.itemcode, o.oprname, d.opramt FROM desp1stjobdtl d INNER JOIN desp1stjob h ON d.chno = h.chno AND d.compcode = h.compcode AND d.invyear = h.invyear INNER JOIN oprmas o ON d.oprcode = o.oprcode AND d.compcode = o.compcode WHERE d.withoutopr = 'N'; ```