All tables
tables · table

cpotempdtlamnd

The cpotempdtlamnd table serves as a Temporary Staging Area for Purchase Order Detail Amendments. It stores line-item level changes for customer purchase orders (CPOs) before they are finalized or committed to the permanent amendment tables (like cpodtlamnd). It tracks quantities, rates, discounts, and item-specific identifiers such as HSN codes and part numbers.

Row count
1
Last entry
Source
tables

Columns

16
ColumnTypeNullableMeaning
indexintegerNoPrimary Key (Internal)
compcodestringNoCompany Identifier
lineintegerYesLine sequence in the amendment
snointegerYesSerial number of the item in the original PO
ponointegerNoPurchase Order Number
itemcodestringYesInternal Item Identifier
itemnamestringYesDescriptive name/specification of the item
uomstringYesUnit of Measure
amountnumberYesTotal calculated line amount
makeintegerYesManufacturer/Brand ID
itemqtynumberYesQuantity of items being amended
ratenumberYesUnit price per item
discountnumberYesDiscount percentage or amount
descriptionstringYesAdditional technical/line notes
partnostringYesManufacturer's Part Number
hsnstringYesHarmonized System of Nomenclature code

Full documentation

### 1) Overview
 The `cpotempdtlamnd` table serves as a **Temporary Staging Area for Purchase Order Detail Amendments**. It stores line-item level changes for customer purchase orders (CPOs) before they are finalized or committed to the permanent amendment tables (like `cpodtlamnd`). It tracks quantities, rates, discounts, and item-specific identifiers such as HSN codes and part numbers.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Primary Key (Internal) | Auto-incrementing | `WHERE index = 0` |
 | **compcode** | string | No | Company Identifier | e.g., "DAS" | `JOIN` on `compcode` |
 | **line** | integer | Yes | Line sequence in the amendment | 1, 2, 3... | `ORDER BY line` |
 | **sno** | integer | Yes | Serial number of the item in the original PO | 1, 2, 3... | `AND sno = 1` |
 | **pono** | integer | No | Purchase Order Number | e.g., 2068 | `JOIN` on `pono` |
 | **itemcode** | string | Yes | Internal Item Identifier | e.g., "BALLNOSE97" | `JOIN` on `itemcode` |
 | **itemname** | string | Yes | Descriptive name/specification of the item | | Text Search |
 | **uom** | string | Yes | Unit of Measure | e.g., "NOS" | `JOIN` on `uom` |
 | **amount** | number | Yes | Total calculated line amount | | `SUM(amount)` |
 | **make** | integer | Yes | Manufacturer/Brand ID | e.g., 1190 | Filter by Manufacturer |
 | **itemqty** | number | Yes | Quantity of items being amended | | Inventory logic |
 | **rate** | number | Yes | Unit price per item | | Price analysis |
 | **discount** | number | Yes | Discount percentage or amount | | `rate * (discount/100)` |
 | **description** | string | Yes | Additional technical/line notes | | Reference |
 | **partno** | string | Yes | Manufacturer's Part Number | | Cross-ref |
 | **hsn** | string | Yes | Harmonized System of Nomenclature code | | Tax reporting |
 
 ### 3) Relationships & Join Map
 
 #### Parent Tables (Headers)
 * **dbo.cpotemphdr (pono, compcode):** Joins to the temporary amendment header to retrieve overall order status and dates.
 * **dbo.cpohdr (pono, compcode):** Likely joins to the original PO header to compare amended values against original order values.
 
 #### Master Data
 * **dbo.itemmas (itemcode, compcode):** Joins to retrieve item master details like weight, dimensions, or categories.
 * **dbo.UoMMaster (uom via PUoM/CUoM):** Likely joins to validate unit conversion factors.
 
 #### Related Transactional Data
 * **dbo.cpodtlamnd (pono, sno, compcode):** Joins to the permanent amendment detail table (Likely the target table after this temporary data is processed).
 
 ---