All tables
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
ColumnTypeNullableMeaning
indexintegerNoPrimary key for record identification
compcodestringNoUnique identifier for the company
challannonumberNoSequence number of the despatch challan
challandatedatetimeYesThe date the challan was issued
custcodestringYesUnique identifier for the customer/client
mrpnointegerYesMaterial Requirement Planning/Internal Reference No
mrpdatedatetimeYesDate associated with the MRP record
lotnostringYesProduction lot number for traceability
pjobcardnonumberYesLinked Production Job Card Number
pjobdatedatetimeYesDate the production job card was created
itemcodestringYesInternal code for the manufactured item
despqtynumberYesQuantity dispatched to the customer
recqtynumberYesQuantity received (if returned or for reconciliation)
bal_qtynumberYesRemaining balance quantity
uomstringYesUnit of Measure
usernamestringYesUser who created the entry
casesstringYesPackaging details (bins, pallets, bags)
despbystringYesMode of transport or person responsible
cancel_flagstringYesIndicator if the challan is cancelled
okqtynumberYesQuantity passed as quality-cleared
invyearintegerNoFinancial year of the transaction
rejqtynumberYesRejected quantity
noprcodestringYesNext Operation Code
consigneestringYesEntity receiving the goods
scrapflagintegerYesFlag indicating if scrap was generated
itemvaluenumberYesTotal taxable value of the items
locationstringYesPhysical storage or production location
CGST_TaxPernumberYesCentral GST Percentage
CGST_AmtnumberYesCentral GST Amount
SGST_TaxPernumberYesState GST Percentage
SGST_AmtnumberYesState GST Amount
IGST_AmtnumberYesIntegrated GST Amount
TotalAMtnumberYesFinal amount including taxes
challan_UniqeNonumberYesSystem-generated unique challan ID
AddTimedatetimeYesTimestamp of record creation
VehicleNostringYesTransportation vehicle registration number
docstringYesFormatted document/challan string
RemarksstringYesManual notes
JobDocstringYesLinked 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`).