All tables
tables · table

cpodtl

The cpodtl table functions as the line-item detail repository for Consumable Purchase Orders. It stores granular data for each item requested in a purchase order, including the specific consumable item code (citmcode), quantities, unit rates, and manufacturer details (make). It is a child table to cpohdr and is critical for inventory procurement, tax calculation via HSN codes, and tracking receipts against issued orders.

Row count
14,221
Last entry
Source
tables

Columns

15
ColumnTypeNullableMeaning
indexintegerNOInternal primary key
compcodestringNOCompany identifier
ponointegerNOPurchase Order number
citmcodestringNOConsumable Item Code
makeintegerYESBrand/Manufacturer identifier
itemqtynumberNOQuantity ordered
ratenumberNOUnit price of the item
discountnumberYESPercentage discount applied
descriptionstringYESItem-specific remarks/details
snointegerNOSerial number/Line item number
invyearintegerNOFinancial/Inventory year
partnostringYESManufacturer part number
hsnstringYESGST Harmonized System Nomenclature
UoMstringYESUnit of Measure
LockstringYESTransaction lock status

Full documentation

### 1. Overview
 The `cpodtl` table functions as the line-item detail repository for **Consumable Purchase Orders**. It stores granular data for each item requested in a purchase order, including the specific consumable item code (`citmcode`), quantities, unit rates, and manufacturer details (`make`). It is a child table to `cpohdr` and is critical for inventory procurement, tax calculation via HSN codes, and tracking receipts against issued orders.
 
 ### 2. Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | NO | Internal primary key | Auto-incrementing | Primary Key |
 | **compcode** | string | NO | Company identifier | e.g., "DAS" | Join Key (Global) |
 | **pono** | integer | NO | Purchase Order number | e.g., 16, 19 | Join Key to `cpohdr` |
 | **citmcode** | string | NO | Consumable Item Code | e.g., "ASBAR001" | Join Key to `citemmas` |
 | **make** | integer | YES | Brand/Manufacturer identifier | e.g., 122, 26 | Join Key to `brandmas` |
 | **itemqty** | number | NO | Quantity ordered | | Calculation (Order Vol) |
 | **rate** | number | NO | Unit price of the item | | Calculation (Value) |
 | **discount** | number | YES | Percentage discount applied | e.g., 0.0, 20.0 | Calculation |
 | **description** | string | YES | Item-specific remarks/details | | Metadata |
 | **sno** | integer | NO | Serial number/Line item number | 1, 2, 3... | Sort key for PO lines |
 | **invyear** | integer | NO | Financial/Inventory year | e.g., 2013, 2014 | Join Key to `cpohdr` |
 | **partno** | string | YES | Manufacturer part number | | Filtering/Metadata |
 | **hsn** | string | YES | GST Harmonized System Nomenclature | | Join Key to `chapter` |
 | **UoM** | string | YES | Unit of Measure | e.g., "KGS", "PCS" | Join Key to `UoMMaster` |
 | **Lock** | string | YES | Transaction lock status | "Y", NULL | Business Logic |
 
 ### 3. Relationships & Join Map
 
 #### Logical Parent(s)
 * **cpohdr**: Joined via `compcode`, `pono`, and `invyear`. This provides the PO date, supplier details, and authorization status.
 * **citemmas**: Joined via `compcode` and `citmcode`. This provides the full name and master properties of the consumable item.
 * **brandmas**: Joined via `compcode` and `make` (mapped to `Br_code` in `brandmas`).
 
 #### Logical Child(ren)
 * **incondtl**: Joined via `compcode` and `citmcode`. (Note: References show links through `incomconitem` for PO tracking).
 
 #### Recommended Joins
 * **PO Header:** `cpodtl.pono = cpohdr.pono AND cpodtl.compcode = cpohdr.compcode AND cpodtl.invyear = cpohdr.invyear`
 * **Item Master:** `cpodtl.citmcode = citemmas.citmcode AND cpodtl.compcode = citemmas.compcode`
 * **Brand Lookup:** `cpodtl.make = brandmas.Br_code AND cpodtl.compcode = brandmas.compcode`
 * **Tax/HSN:** `cpodtl.hsn = chapter.chapter AND cpodtl.compcode = chapter.compcode` (Likely)
 * **Inventory Receipt:** `cpodtl.citmcode = incondtl.citmcode` (Used in `pendcpo` view for balancing).