All tables
tables · table

desp1stjob

The desp1stjob table is a transaction ledger for Outward Job Work Dispatch (Stage 1). It records the movement of items sent to customers or external vendors for the first phase of processing. The table captures logistical details (Challan numbers, vehicle info), financial data (GST breakdown, item value), and production tracking (MRP numbers, job card references, and operation codes). It is primarily used for generating dispatch documents, tracking material balances with sub-contractors, and financial monitoring of job work activities.

Row count
2,651
Last entry
2026-01-13
Source
tables

Columns

42
ColumnTypeNullableMeaning
indexintegerNoInternal primary key.
compcodestringNoCompany code.
chnonumberNoChallan Number (Document ID).
chdatedatetimeNoChallan Date.
custcodestringYesCustomer/Vendor unique identifier.
mrpnointegerYesMovement Reference / MRP Number.
mrpdatedatetimeYesDate associated with the MRP.
lotnostringYesProduction lot number identifier.
pjobcardnonumberYesProduction Job Card Number.
pjobdatedatetimeYesDate the job card was created.
itemcodestringYesUnique code for the dispatched item.
despqtynumberYesQuantity dispatched.
recqtynumberYesQuantity received back (returns).
bal_qtynumberYesRemaining balance quantity at vendor site.
usernamestringYesUser who created the record.
uomstringYesUnit of Measure.
cancel_flagstringYesCancellation status.
okqtynumberYesQuantity accepted as "Good".
invyearintegerNoFinancial/Invoice year for document unique identification.
casesstringYesPackaging details (e.g., bin count).
despbystringYesMode of dispatch or transport details.
rejqtystringYesQuantity rejected (stored as string).
cmrpnostringYesCustomer MRP reference number.
consigneestringYesRecipient code (often same as custcode).
scrapflagintegerYesFlag indicating if item is scrap.
itemvaluenumberYesTaxable value of the items.
locationstringYesStorage/Production location.
CGST_TaxPernumberYesCentral GST Percentage.
CGST_AmtnumberYesCentral GST Amount.
SGST_TaxPernumberYesState GST Percentage.
SGST_AmtnumberYesState GST Amount.
IGST_TaxPernumberYesIntegrated GST Percentage.
IGST_AmtnumberYesIntegrated GST Amount.
TotalAMtnumberYesTotal Invoice Value (Net + Tax).
VehicleNostringYesTransport vehicle registration number.
docstringYesDocument type or series name.
RemarksstringYesGeneral notes.
tpcodestringYesTransporter Code.
Calculated_ScrapnumberYesSystem-derived scrap weight/qty.
JobDocstringYesPhysical Job Document Reference.
ProdLotNostringYesSpecific Production Lot ID.
nOprCodestringYesNext Operation Code.

Full documentation

### 1) Overview
 The `desp1stjob` table is a transaction ledger for **Outward Job Work Dispatch (Stage 1)**. It records the movement of items sent to customers or external vendors for the first phase of processing. The table captures logistical details (Challan numbers, vehicle info), financial data (GST breakdown, item value), and production tracking (MRP numbers, job card references, and operation codes). It is primarily used for generating dispatch documents, tracking material balances with sub-contractors, and financial monitoring of job work activities.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Internal primary key. | | PK |
 | **compcode** | string | No | Company code. | e.g., "DAS" | Join Key |
 | **chno** | number | No | Challan Number (Document ID). | | Join Key |
 | **chdate** | datetime | No | Challan Date. | | Filtering |
 | **custcode** | string | Yes | Customer/Vendor unique identifier. | | Join to `dbo.cust` |
 | **mrpno** | integer | Yes | Movement Reference / MRP Number. | | Join Key |
 | **mrpdate** | datetime | Yes | Date associated with the MRP. | | Reporting |
 | **lotno** | string | Yes | Production lot number identifier. | | Tracking |
 | **pjobcardno** | number | Yes | Production Job Card Number. | | Cross-referencing |
 | **pjobdate** | datetime | Yes | Date the job card was created. | | Tracking |
 | **itemcode** | string | Yes | Unique code for the dispatched item. | | Join to `dbo.itemmas` |
 | **despqty** | number | Yes | Quantity dispatched. | | Calculation |
 | **recqty** | number | Yes | Quantity received back (returns). | | Calculation |
 | **bal_qty** | number | Yes | Remaining balance quantity at vendor site. | | Stock tracking |
 | **username** | string | Yes | User who created the record. | | Auditing |
 | **uom** | string | Yes | Unit of Measure. | PCS, KGS | JOIN to `dbo.UoMMaster` |
 | **cancel_flag** | string | Yes | Cancellation status. | 'N', 'Y' | Filtering |
 | **okqty** | number | Yes | Quantity accepted as "Good". | | QC |
 | **invyear** | integer | No | Financial/Invoice year for document unique identification. | | Join Key |
 | **cases** | string | Yes | Packaging details (e.g., bin count). | | Logistics |
 | **despby** | string | Yes | Mode of dispatch or transport details. | | Logistics |
 | **rejqty** | string | Yes | Quantity rejected (stored as string). | | QC |
 | **cmrpno** | string | Yes | Customer MRP reference number. | | Ref Only |
 | **consignee** | string | Yes | Recipient code (often same as custcode). | | Join to `dbo.cust` |
 | **scrapflag** | integer | Yes | Flag indicating if item is scrap. | 0, 1 | Filtering |
 | **itemvalue** | number | Yes | Taxable value of the items. | | Financials |
 | **location** | string | Yes | Storage/Production location. | | Join to `dbo.PhyLocation` |
 | **CGST_TaxPer** | number | Yes | Central GST Percentage. | | Tax calc |
 | **CGST_Amt** | number | Yes | Central GST Amount. | | Financials |
 | **SGST_TaxPer** | number | Yes | State GST Percentage. | | Tax calc |
 | **SGST_Amt** | number | Yes | State GST Amount. | | Financials |
 | **IGST_TaxPer** | number | Yes | Integrated GST Percentage. | | Tax calc |
 | **IGST_Amt** | number | Yes | Integrated GST Amount. | | Financials |
 | **TotalAMt** | number | Yes | Total Invoice Value (Net + Tax). | | Financials |
 | **VehicleNo** | string | Yes | Transport vehicle registration number. | | Logistics |
 | **doc** | string | Yes | Document type or series name. | | Ref Only |
 | **Remarks** | string | Yes | General notes. | | Ref Only |
 | **tpcode** | string | Yes | Transporter Code. | | Join to `dbo.transptmas` |
 | **Calculated_Scrap**| number | Yes | System-derived scrap weight/qty. | | Calculation |
 | **JobDoc** | string | Yes | Physical Job Document Reference. | | Cross-referencing |
 | **ProdLotNo** | string | Yes | Specific Production Lot ID. | | Likely Join Key |
 | **nOprCode** | string | Yes | Next Operation Code. | e.g., "FINAL" | Join to `dbo.oprmas` |
 
 ### 3) Relationships & Join Map
 
 Based on `SCHEMA_MAP` and `REFERENCE_JSON`, the primary join keys are `compcode`, `chno` (for detail tables), `mrpno` (for process tracking), and `itemcode`.
 
 #### Authoritative Joins (Physical Tables):
 * **desp1stjobdtl**: Join via `compcode`, `chno`, and `invyear`. (Provides operation-level rates and amounts).
 * **rmjobrec1st**: Join via `compcode` and `mrpno`. (Links dispatch back to the original raw material receipt).
 * **cust**: Join via `compcode` and `custcode` (or `consignee`). (Retrieves customer names and addresses).
 * **itemmas**: Join via `compcode` and `itemcode`. (Retrieves item descriptions, HSN codes, and part numbers).
 * **oprmas**: Join via `compcode` and `nOprCode` (maps to `oprcode`). (Retrieves operation names).
 * **transptmas**: Join via `compcode` and `tpcode`. (Retrieves transporter details).
 
 #### Logical/Inferred Joins:
 * **rmreturncust**: Join via `compcode` and `mrpno`. (To calculate material returned by customer without processing).
 * **itemopr**: Join via `compcode`, `itemcode`, and operation codes in detail tables. (To fetch operation-specific drawing numbers and weights).