All tables
tables · table

invdespdtl

The invdespdtl table stores the line-item details for despatch invoices, primarily focused on Job Work (JW) transactions. Unlike standard sales invoices that often list just the finished product, this table captures the specific operations (e.g., Cold Forging, CNC Turning, Drilling) performed on items, their corresponding quantities (despqty), and the specific operation rates (oprrate). It serves as the granular breakdown for invdesphdr.

Row count
18
Last entry
Source
tables

Columns

23
ColumnTypeNullableMeaning
indexintegerNoPrimary Key (Internal)
compcodestringNoCompany identifier
invnointegerNoInvoice Number
invyearintegerNoFinancial year of the invoice
oprcodestringYesOperation code performed on the item
withoutoprstringYesFlag indicating if transaction is without specific operation charges
oprratenumberYesUnit rate for the specific operation
itemcodestringYesInternal code for the part/item
uomstringYesUnit of Measure
despqtynumberYesQuantity despatched for this specific operation/item
remarksstringYesLine-level internal comments
reworkstringYesFlag indicating if the line item is for rework
cgst_PERstringYesCentral GST Percentage
sgst_PERstringYesState GST Percentage
igst_PERstringYesIntegrated GST Percentage
cgst_amtstringYesCentral GST calculated amount
sgst_amtstringYesState GST calculated amount
igst_amtstringYesIntegrated GST calculated amount
snointegerYesSerial number / Line item sequence
ItemAmtnumberNoTotal amount for this line (`despqty` * `oprrate`)
ItemNamestringYesDescriptive name of the item
oprnamestringYesDescriptive name of the operation
HSNstringYesGST HSN classification code

Full documentation

### 1) Overview
 The `invdespdtl` table stores the line-item details for despatch invoices, primarily focused on Job Work (JW) transactions. Unlike standard sales invoices that often list just the finished product, this table captures the specific operations (e.g., Cold Forging, CNC Turning, Drilling) performed on items, their corresponding quantities (`despqty`), and the specific operation rates (`oprrate`). It serves as the granular breakdown for `invdesphdr`.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Primary Key (Internal) | | Primary Key |
 | **compcode** | string | No | Company identifier | e.g., "DAS", "SAP" | Join key |
 | **invno** | integer | No | Invoice Number | | Join key |
 | **invyear** | integer | No | Financial year of the invoice | e.g., 2019, 2022 | Join key |
 | **oprcode** | string | Yes | Operation code performed on the item | e.g., "CF", "CNC1", "DRIL" | Join key |
 | **withoutopr** | string | Yes | Flag indicating if transaction is without specific operation charges | "N", "Y" | Filtering |
 | **oprrate** | number | Yes | Unit rate for the specific operation | | Calculated fields |
 | **itemcode** | string | Yes | Internal code for the part/item | e.g., "CP-002" | Join key |
 | **uom** | string | Yes | Unit of Measure | e.g., "PCS" | Descriptive |
 | **despqty** | number | Yes | Quantity despatched for this specific operation/item | | Aggregations (SUM) |
 | **remarks** | string | Yes | Line-level internal comments | | Descriptive |
 | **rework** | string | Yes | Flag indicating if the line item is for rework | "N", "Y" | Filtering |
 | **cgst_PER** | string | Yes | Central GST Percentage | | Financials |
 | **sgst_PER** | string | Yes | State GST Percentage | | Financials |
 | **igst_PER** | string | Yes | Integrated GST Percentage | | Financials |
 | **cgst_amt** | string | Yes | Central GST calculated amount | | Financials |
 | **sgst_amt** | string | Yes | State GST calculated amount | | Financials |
 | **igst_amt** | string | Yes | Integrated GST calculated amount | | Financials |
 | **sno** | integer | Yes | Serial number / Line item sequence | | Sorting |
 | **ItemAmt** | number | No | Total amount for this line (`despqty` * `oprrate`) | | Financials |
 | **ItemName** | string | Yes | Descriptive name of the item | | Reporting |
 | **oprname** | string | Yes | Descriptive name of the operation | | Reporting |
 | **HSN** | string | Yes | GST HSN classification code | e.g., "998898" | Regulatory |
 
 ### 3) Relationships & Join Map
 
 #### Primary Header Relationship
 * **invdesphdr**: Joins on `compcode`, `invno`, and `invyear`. This links the detail lines to the main invoice header (customer info, total value, dates).
 
 #### Master Data Relationships
 * **itemmas**: Joins on `compcode` and `itemcode`. Used to retrieve detailed part specifications and `partno`.
 * **oprmas**: Joins on `compcode` and `oprcode`. Used to retrieve standard operation names and details.
 * **itemopr**: Joins on `compcode`, `itemcode`, and `oprcode`. Used to validate operation rates and machine associations.
 
 #### Likely Joins (Inferred from context)
 * **invdespwodetail**: Likely joins on `compcode`, `invno`, and `invyear` to link work order specifics to the invoice line.
 * **lablenumbers**: Likely joins on `compcode`, `invno`, and `invyear` to correlate specific labels printed for the despatch.