tables · table
sfpo
The sfpo table serves as the Purchase Order Header for Semi-Finished (SF) goods. It stores high-level procurement metadata, including supplier references, contract terms (Term 1-7), delivery schedules, and taxation totals (GST breakdown). It is a critical component in the procurement-to-receipt workflow, linking indents (requisitions) to final goods receipts (fghdr).
Row count
46
Last entry
2026-03-31
Source
tables
Columns
22| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Primary Key |
compcode | string | No | Physical Company Code |
pono | number | No | Purchase Order Number |
podate | datetime | Yes | Date PO was issued |
supcode | string | Yes | Supplier Code |
indentno | integer | Yes | Reference Requisition Number |
delivery | datetime | Yes | Expected Delivery Date |
f_o_r | string | Yes | Freight on Receipt terms |
username | string | Yes | Record Creator |
amndno | integer | Yes | Amendment/Version Number |
authflag | number | Yes | Authorization Status |
povalue | number | Yes | Total Base Value of PO |
invyear | integer | Yes | Financial Year for Invoice/PO |
consignee | string | Yes | Shipping destination code |
PODoc | string | Yes | Human-readable PO Document ID |
TaxableAmt | number | Yes | Amount subject to tax |
CGST_Amt | number | Yes | Central GST Amount |
SGST_Amt | number | Yes | State GST Amount |
IGST_Amt | number | Yes | Integrated GST Amount |
Location | string | Yes | Physical Plant/Warehouse location |
lock | string | Yes | Record modification lock |
auth_date | datetime | Yes | Final Authorization Timestamp |
Full documentation
### 1. Overview The `sfpo` table serves as the **Purchase Order Header** for Semi-Finished (SF) goods. It stores high-level procurement metadata, including supplier references, contract terms (Term 1-7), delivery schedules, and taxation totals (GST breakdown). It is a critical component in the procurement-to-receipt workflow, linking indents (requisitions) to final goods receipts (`fghdr`). ### 2. Column dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Primary Key | | | | **compcode** | string | No | Physical Company Code | e.g., "DAS" | Joins to `suppmas`, `sfpoitem` | | **pono** | number | No | Purchase Order Number | | Unique PO ID per year | | **podate** | datetime | Yes | Date PO was issued | | Filtering by date range | | **supcode** | string | Yes | Supplier Code | e.g., "ST", "RF" | Joins to `suppmas.supcode` | | **indentno** | integer | Yes | Reference Requisition Number | | Joins to `sfindent.indentno` | | **delivery** | datetime | Yes | Expected Delivery Date | | Schedule tracking | | **f_o_r** | string | Yes | Freight on Receipt terms | e.g., "Rohtak" | Shipping terms | | **term_1..7** | string | Yes | Standardized Contract Terms | | Payment/Shipping details | | **username** | string | Yes | Record Creator | | Audit trail | | **amndno** | integer | Yes | Amendment/Version Number | 0 = Original | Track PO revisions | | **authflag** | number | Yes | Authorization Status | 1.0 = Authorized | Logic gate for processing | | **povalue** | number | Yes | Total Base Value of PO | | Financial reporting | | **invyear** | integer | Yes | Financial Year for Invoice/PO | e.g., 2013 | Part of composite logical key | | **consignee** | string | Yes | Shipping destination code | | Joins to `suppmas.supcode` | | **PODoc** | string | Yes | Human-readable PO Document ID | e.g., "SF/2021-22/0009" | Display on reports | | **TaxableAmt** | number | Yes | Amount subject to tax | | Tax calculation base | | **CGST_Amt** | number | Yes | Central GST Amount | | Financial reconciliation | | **SGST_Amt** | number | Yes | State GST Amount | | Financial reconciliation | | **IGST_Amt** | number | Yes | Integrated GST Amount | | Interstate transactions | | **Location** | string | Yes | Physical Plant/Warehouse location | | Joins to `location.location` | | **lock** | string | Yes | Record modification lock | 'Y', 'N' | Concurrency control | | **auth_date** | datetime | Yes | Final Authorization Timestamp | | Audit/SLA tracking | ### 3. Relationships & join map #### Primary Logical Key The logical uniqueness of a record is typically maintained by: `compcode` + `pono` + `invyear` + `amndno`. #### Joins (Authoritative via SCHEMA_MAP) * **PO Line Items**: Join to `sfpoitem` using `(pono, compcode, invyear)`. * **Supplier Details**: Join to `suppmas` using `(supcode, compcode)`. * **Requisition Reference**: Join to `sfindent` using `(indentno, compcode)`. * **Goods Receipt**: Join to `fghdr` (Finish Goods Header) using `(pono, compcode)` to track received vs. ordered quantities. * **Site/Location**: Join to `location` using `(location, compcode)`. * **HSN/Taxation**: Join to `chapter` (Inferred via REFERENCE_JSON) using `(hsn)`. #### Likely Joins (Based on Usage) * **Amendments**: Join to `sfpoamnd` using `(pono, compcode, invyear, amndno)` to compare historical versions. * **User Info**: Join to `pass1` using `(username, compcode)`.