tables · table
desp2job
The desp2job table is a transaction ledger within the manufacturing and job work module, specifically tracking the Stage-2 (IInd) Job Work Despatch of items to customers or vendors. It records the delivery of processed goods via challans, including quantity tracking (dispatched vs. received), tax calculations (CGST, SGST, IGST), and logistics details (Vehicle No, Removal Time).
Row count
33,676
Last entry
2026-01-16
Source
tables
Columns
39| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Primary key for record identification |
compcode | string | No | Unique identifier for the company |
challanno | number | No | Sequence number of the despatch challan |
challandate | datetime | Yes | The date the challan was issued |
custcode | string | Yes | Unique identifier for the customer/client |
mrpno | integer | Yes | Material Requirement Planning/Internal Reference No |
mrpdate | datetime | Yes | Date associated with the MRP record |
lotno | string | Yes | Production lot number for traceability |
pjobcardno | number | Yes | Linked Production Job Card Number |
pjobdate | datetime | Yes | Date the production job card was created |
itemcode | string | Yes | Internal code for the manufactured item |
despqty | number | Yes | Quantity dispatched to the customer |
recqty | number | Yes | Quantity received (if returned or for reconciliation) |
bal_qty | number | Yes | Remaining balance quantity |
uom | string | Yes | Unit of Measure |
username | string | Yes | User who created the entry |
cases | string | Yes | Packaging details (bins, pallets, bags) |
despby | string | Yes | Mode of transport or person responsible |
cancel_flag | string | Yes | Indicator if the challan is cancelled |
okqty | number | Yes | Quantity passed as quality-cleared |
invyear | integer | No | Financial year of the transaction |
rejqty | number | Yes | Rejected quantity |
noprcode | string | Yes | Next Operation Code |
consignee | string | Yes | Entity receiving the goods |
scrapflag | integer | Yes | Flag indicating if scrap was generated |
itemvalue | number | Yes | Total taxable value of the items |
location | string | Yes | Physical storage or production location |
CGST_TaxPer | number | Yes | Central GST Percentage |
CGST_Amt | number | Yes | Central GST Amount |
SGST_TaxPer | number | Yes | State GST Percentage |
SGST_Amt | number | Yes | State GST Amount |
IGST_Amt | number | Yes | Integrated GST Amount |
TotalAMt | number | Yes | Final amount including taxes |
challan_UniqeNo | number | Yes | System-generated unique challan ID |
AddTime | datetime | Yes | Timestamp of record creation |
VehicleNo | string | Yes | Transportation vehicle registration number |
doc | string | Yes | Formatted document/challan string |
Remarks | string | Yes | Manual notes |
JobDoc | string | Yes | Linked job document reference |
Full documentation
### 1) Overview The `desp2job` table is a transaction ledger within the manufacturing and job work module, specifically tracking the **Stage-2 (IInd) Job Work Despatch** of items to customers or vendors. It records the delivery of processed goods via challans, including quantity tracking (dispatched vs. received), tax calculations (CGST, SGST, IGST), and logistics details (Vehicle No, Removal Time). The table acts as a bridge between production job cards (`pjobcardno`) and the final billing or return-to-stock process, specifically for materials undergoing secondary operations. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Primary key for record identification | | PK | | **compcode** | string | No | Unique identifier for the company | e.g., "DAS" | Join; Filter | | **challanno** | number | No | Sequence number of the despatch challan | e.g., 1.0, 2.0 | Join; Filter | | **challandate** | datetime | Yes | The date the challan was issued | | Filter; Grouping | | **custcode** | string | Yes | Unique identifier for the customer/client | e.g., "KOYO" | Join; Filter | | **mrpno** | integer | Yes | Material Requirement Planning/Internal Reference No | | Join; Filter | | **mrpdate** | datetime | Yes | Date associated with the MRP record | | Reporting | | **lotno** | string | Yes | Production lot number for traceability | | Traceability | | **pjobcardno** | number | Yes | Linked Production Job Card Number | | Join (Likely) | | **pjobdate** | datetime | Yes | Date the production job card was created | | Reporting | | **itemcode** | string | Yes | Internal code for the manufactured item | | Join; Filter | | **despqty** | number | Yes | Quantity dispatched to the customer | | Aggregation | | **recqty** | number | Yes | Quantity received (if returned or for reconciliation) | | Calculation | | **bal_qty** | number | Yes | Remaining balance quantity | | Calculation | | **uom** | string | Yes | Unit of Measure | e.g., "PCS", "KGS" | Reporting | | **username** | string | Yes | User who created the entry | | Audit | | **cases** | string | Yes | Packaging details (bins, pallets, bags) | | Logistics | | **despby** | string | Yes | Mode of transport or person responsible | | Logistics | | **cancel_flag** | string | Yes | Indicator if the challan is cancelled | 'N', 'Y' | Filter | | **okqty** | number | Yes | Quantity passed as quality-cleared | | Reporting | | **invyear** | integer | No | Financial year of the transaction | e.g., 2021 | Join; Filter | | **rejqty** | number | Yes | Rejected quantity | | Quality Control | | **noprcode** | string | Yes | Next Operation Code | e.g., "CNC", "CLOSE" | Join (oprmas) | | **consignee** | string | Yes | Entity receiving the goods | | Join (cust) | | **scrapflag** | integer | Yes | Flag indicating if scrap was generated | 0, 1 | Reporting | | **itemvalue** | number | Yes | Total taxable value of the items | | Financials | | **location** | string | Yes | Physical storage or production location | | Join; Filter | | **CGST_TaxPer** | number | Yes | Central GST Percentage | | Financials | | **CGST_Amt** | number | Yes | Central GST Amount | | Financials | | **SGST_TaxPer** | number | Yes | State GST Percentage | | Financials | | **SGST_Amt** | number | Yes | State GST Amount | | Financials | | **IGST_Amt** | number | Yes | Integrated GST Amount | | Financials | | **TotalAMt** | number | Yes | Final amount including taxes | | Financials | | **challan_UniqeNo** | number | Yes | System-generated unique challan ID | | Reference | | **AddTime** | datetime | Yes | Timestamp of record creation | | Audit | | **VehicleNo** | string | Yes | Transportation vehicle registration number | | Logistics | | **doc** | string | Yes | Formatted document/challan string | | Display | | **Remarks** | string | Yes | Manual notes | | Information | | **JobDoc** | string | Yes | Linked job document reference | | Reference | ### 3) Relationships & Join Map #### Authoritative Joins (via SCHEMA_MAP): * **desp2jobdtl**: Join on `compcode`, `challanno`, and `invyear`. This links the header info to specific operation-wise details. * **itemmas**: Join on `compcode` and `itemcode`. Used to retrieve `itemname`, `hsn`, and `partno`. * **cust**: Join on `compcode` and `custcode`. Used to fetch `custname` and address details. * **rmjobrec2nd**: Join on `compcode` and `mrpno`. This is the primary upstream link identifying the material received for processing. * **oprmas**: Join on `compcode` and `noprcode` (mapping to `oprcode` in `oprmas`). Used to identify the next operation status. #### Likely Joins (Inferred): * **location**: Join on `compcode` and `location` to get department/site details. * **invdesphdr**: Join on `compcode` and `mrpno` for consolidated job-work reporting (referenced in stored procedures). * **itemopr**: Join on `compcode`, `itemcode`, and `oprcode` (via `desp2jobdtl`) to determine operation rates (`oprrate`).