All tables
tables · table

sfpoitem

The sfpoitem table serves as the line-item detail repository for Semi-Finished (SF) Purchase Orders. It stores the specific item codes, quantities, rates, and tax-related HSN codes associated with a parent Purchase Order record. Each row represents a single item entry within a PO, uniquely identified by a combination of the company code, purchase order number, financial year, and item code.

Row count
154
Last entry
Source
tables

Columns

12
ColumnTypeNullableMeaning
indexintegerNoInternal primary key / Physical row index
compcodestringNoUnique identifier for the company
ponointegerNoPurchase Order Number
itemcodestringNoUnique code for the Semi-Finished item
uomstringYesUnit of Measure
qtynumberYesQuantity of items ordered
itemratenumberYesUnit price/rate of the item
invyearintegerNoFinancial/Invoice year associated with the PO
itemexdetailstringYesExtended item description or special instructions
hsnstringYesHarmonized System of Nomenclature code for GST
LockstringYesStatus flag indicating if the record is locked
SNonumberYesSerial number of the item within the specific PO

Full documentation

### 1. Overview
 The `sfpoitem` table serves as the line-item detail repository for **Semi-Finished (SF) Purchase Orders**. It stores the specific item codes, quantities, rates, and tax-related HSN codes associated with a parent Purchase Order record. Each row represents a single item entry within a PO, uniquely identified by a combination of the company code, purchase order number, financial year, and item code.
 
 ### 2. Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Internal primary key / Physical row index | | Primary Key |
 | **compcode** | string | No | Unique identifier for the company | e.g., "DAS" | Join; Filter |
 | **pono** | integer | No | Purchase Order Number | | Join; Filter |
 | **itemcode** | string | No | Unique code for the Semi-Finished item | | Join; Filter |
 | **uom** | string | Yes | Unit of Measure | PCS, NOS | Reporting |
 | **qty** | number | Yes | Quantity of items ordered | | Calculations |
 | **itemrate** | number | Yes | Unit price/rate of the item | | Calculations |
 | **invyear** | integer | No | Financial/Invoice year associated with the PO | e.g., 2013, 2023 | Join; Partitioning |
 | **itemexdetail** | string | Yes | Extended item description or special instructions | | Reporting |
 | **hsn** | string | Yes | Harmonized System of Nomenclature code for GST | | Taxation |
 | **Lock** | string | Yes | Status flag indicating if the record is locked | 'N', Null | Logic Control |
 | **SNo** | number | Yes | Serial number of the item within the specific PO | | Ordering |
 
 ### 3. Relationships & Join Map
 
 The table primarily acts as a child to Purchase Order headers and a consumer of Item Master data.
 
 #### Primary Joins (Strictly based on SCHEMA_MAP):
 * **sfpo** (PO Header): Join via `compcode`, `pono`, and `invyear`. This is the standard parent-child relationship for PO processing.
 * **itemmas** (Item Master): Join via `compcode` and `itemcode`. Used to retrieve detailed item names, part numbers, and specifications.
 * **sfpoitemamnd** (PO Item Amendments): Join via `compcode`, `pono`, `invyear`, and `itemcode`. Used to compare current PO values against previous amendments.
 * **fghdr** (Finished Goods/Receipts): Join via `compcode`, `pono`, and `itemcode`. Used to calculate the balance quantity (Ordered vs. Received).
 * **sfindentitem** (SF Indent Details): Joins via `compcode` and `itemcode` (and `indentno` through `sfpo`). Used to track POs generated against specific indents.
 
 #### Likely Joins (Inferred):
 * **chapter**: Join via `hsn` (sfpoitem) to `chapter` (chapter) to determine applicable tax rates.
 * **suppmas**: Joined indirectly through `sfpo` (using `supcode`) to fetch supplier details like names and addresses.