tables · table
cpohdr
The cpohdr (Consumable Purchase Order Header) table serves as the primary repository for metadata related to purchase orders for consumable and general items (Type: 'CS'). It stores administrative details, commercial terms (FOR, delivery dates, payment terms), supplier references, and total valuation for a specific order. This table is the "Parent" in the Consumables PO lifecycle, linked to itemized details and subsequent goods receipt documents.
Row count
5,275
Last entry
2026-12-26
Source
tables
Columns
27| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | NO | Primary Key |
compcode | string | NO | Company Identifier |
type | string | YES | PO Category |
pono | integer | NO | Purchase Order Number |
podate | datetime | YES | Purchase Order Creation Date |
supcode | string | YES | Supplier Code |
indentno | integer | YES | Requisition/Indent Reference |
delivery | datetime | YES | Expected Delivery Date |
f_o_r | string | YES | Freight On Road Terms |
refdate | datetime | YES | Reference/Indent Date |
quotationno | string | YES | Vendor Quotation Reference |
amendno | integer | YES | PO Amendment Sequence |
remarks | string | YES | Header Level Remarks |
authflag | integer | YES | Authorization Status |
povalue | number | YES | Total PO Value |
povalueword | string | YES | Total PO Value (In Words) |
lock | string | YES | Status Lock |
invyear | integer | NO | Financial/Inventory Year |
useradd | string | YES | User who created PO |
userauth | string | YES | User who authorized PO |
Consignee | string | YES | Receiving Party Code |
location | string | YES | Internal Storage Location |
CGST_Amt | string | YES | Total Central GST Amount |
SGST_Amt | string | YES | Total State GST Amount |
IGST_Amt | string | YES | Total Integrated GST Amount |
Freight_Amt | string | YES | Shipping/Freight Cost |
Cancel_flag | string | YES | Cancellation Status |
Full documentation
### 1) Overview The `cpohdr` (Consumable Purchase Order Header) table serves as the primary repository for metadata related to purchase orders for consumable and general items (Type: 'CS'). It stores administrative details, commercial terms (FOR, delivery dates, payment terms), supplier references, and total valuation for a specific order. This table is the "Parent" in the Consumables PO lifecycle, linked to itemized details and subsequent goods receipt documents. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | NO | Primary Key | 0, 1, 2... | Internal row ID | | **compcode** | string | NO | Company Identifier | e.g., "DAS" | Join key to all tables | | **type** | string | YES | PO Category | "CS " (Consumables) | Filter/Discriminator | | **pono** | integer | NO | Purchase Order Number | | Unique PO reference | | **podate** | datetime | YES | Purchase Order Creation Date | | Temporal reporting | | **supcode** | string | YES | Supplier Code | Links to `suppmas` | Vendor identification | | **indentno** | integer | YES | Requisition/Indent Reference | | Link to `cindent` | | **delivery** | datetime | YES | Expected Delivery Date | | Logistics tracking | | **f_o_r** | string | YES | Freight On Road Terms | e.g., "ROHTAK" | Commercial terms | | **term_1..7** | string | YES | Commercial Terms & Conditions | | Legal/PO Printing | | **refdate** | datetime | YES | Reference/Indent Date | | Audit trail | | **quotationno** | string | YES | Vendor Quotation Reference | | Procurement trail | | **amendno** | integer | YES | PO Amendment Sequence | 0 = Original | Version control | | **remarks** | string | YES | Header Level Remarks | | User notes | | **authflag** | integer | YES | Authorization Status | 1 = Authorized | Workflow filter | | **povalue** | number | YES | Total PO Value | | Financial reporting | | **povalueword**| string | YES | Total PO Value (In Words) | | Document printing | | **lock** | string | YES | Status Lock | "N", "Y" | Edit protection | | **invyear** | integer | NO | Financial/Inventory Year | e.g., 2013 | Join key for partitioning | | **useradd** | string | YES | User who created PO | | Audit | | **userauth** | string | YES | User who authorized PO | | Audit | | **Consignee** | string | YES | Receiving Party Code | Links to `suppmas` | Shipping instruction | | **location** | string | YES | Internal Storage Location | Links to `location` | Inventory routing | | **CGST_Amt** | string | YES | Total Central GST Amount | | Taxation | | **SGST_Amt** | string | YES | Total State GST Amount | | Taxation | | **IGST_Amt** | string | YES | Total Integrated GST Amount | | Taxation | | **Freight_Amt** | string | YES | Shipping/Freight Cost | | Valuation | | **Cancel_flag** | string | YES | Cancellation Status | "Y", NULL | Exclusion filter | ### 3) Relationships & Join Map #### Join Logic: * **Mandatory Composite Keys:** Joins to detail or transactional tables must use `compcode`, `pono`, and `invyear` to ensure uniqueness across financial years. #### Physical Joins (SCHEMA_MAP): * **PO Details:** Join to `dbo.cpodtl` via `(compcode, pono, invyear)`. * **Supplier Info:** Join to `dbo.suppmas` via `(compcode, supcode)`. * **Incoming Goods:** Join to `dbo.incomconitem` via `(compcode, pono)`. Note: Goods receipts link back to the PO to track balance. * **Inventory Locations:** Join to `dbo.location` via `(compcode, location)`. * **Amendments:** Join to `dbo.cpodtlamnd` and `dbo.cpohdramnd` via `(compcode, pono, invyear, amendno)`. #### Likely Inferred Joins (Usage Context): * **Consumable Items:** Through `cpodtl`, joins to `dbo.citemmas` on `citmcode`. * **Requisition Tracking:** Links to `dbo.cindent` on `indentno` (Likely).