All tables
tables · table

rmpotab

The rmpotab table serves as the Raw Material Purchase Order Header. It stores the primary metadata for purchase orders issued to raw material suppliers, including vendor references, shipping terms (f_o_r), total valuation (povalue), and tax breakdown (GST). It is the parent table for line-item details stored in rmpotabitem.

Row count
82
Last entry
2026-03-31
Source
tables

Columns

23
ColumnTypeNullableMeaning
compcodestringNOUnique code for the company/entity
pononumberNOUnique Purchase Order Number
podatedatetimeYESDate when the PO was generated
supcodestringYESVendor code from Supplier Master
indentnointegerYESReference ID from the original material requisition
deliverydatetimeYESExpected delivery/deadline date
f_o_rstringYESFreight On Road terms (Delivery location)
authflagintegerYESAuthorization status
wefdatedatetimeYES"With Effect From" date for pricing
povaluenumberYESTotal base value of the Purchase Order
povaluewordstringYESTotal PO value written in words
lockstringYESRow status to prevent modification
invyearintegerYESFinancial/Accounting year of the PO
consigneestringYESShip-to party code (if different from vendor)
PODocstringYESFormatted Document Number
Cancel_flagstringYESFlag indicating if PO is cancelled
TaxableAmtnumberYESTotal amount subject to GST
CGST_AmtnumberYESCentral GST Amount
SGST_AmtnumberYESState GST Amount
IGST_AmtnumberYESIntegrated GST Amount
LocationstringYESPlant or storage location code
auth_datedatetimeYESDate PO was authorized
amndnointegerYESAmendment number (versions of the PO)

Full documentation

### 1) Overview
 The `rmpotab` table serves as the **Raw Material Purchase Order Header**. It stores the primary metadata for purchase orders issued to raw material suppliers, including vendor references, shipping terms (`f_o_r`), total valuation (`povalue`), and tax breakdown (GST). It is the parent table for line-item details stored in `rmpotabitem`.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **compcode** | string | NO | Unique code for the company/entity | e.g., "DAS", "BAP" | `JOIN`, `WHERE` |
 | **pono** | number | NO | Unique Purchase Order Number | | `PRIMARY KEY`, `JOIN` |
 | **podate** | datetime | YES | Date when the PO was generated | | `ORDER BY`, `WHERE` |
 | **supcode** | string | YES | Vendor code from Supplier Master | e.g., "ST", "RS" | `JOIN` (suppmas) |
 | **indentno** | integer | YES | Reference ID from the original material requisition | | `JOIN` (rmindent) |
 | **delivery** | datetime | YES | Expected delivery/deadline date | | Filter |
 | **f_o_r** | string | YES | Freight On Road terms (Delivery location) | e.g., "Rohtak" | Information |
 | **term_1..7** | string | YES | Payment and commercial terms and conditions | | Information |
 | **authflag** | integer | YES | Authorization status | 1 = Authorized, 0 = Pending | `WHERE` |
 | **wefdate** | datetime | YES | "With Effect From" date for pricing | | Filter |
 | **povalue** | number | YES | Total base value of the Purchase Order | | Aggregation |
 | **povalueword**| string | YES | Total PO value written in words | | Reporting |
 | **lock** | string | YES | Row status to prevent modification | 'Y', 'N' | `WHERE` |
 | **invyear** | integer | YES | Financial/Accounting year of the PO | e.g., 2013, 2024 | `JOIN`, `WHERE` |
 | **consignee** | string | YES | Ship-to party code (if different from vendor) | | `JOIN` (suppmas) |
 | **PODoc** | string | YES | Formatted Document Number | e.g., "RM/2023-24/0004"| Reporting |
 | **Cancel_flag** | string | YES | Flag indicating if PO is cancelled | 'Y', null | `WHERE` |
 | **TaxableAmt** | number | YES | Total amount subject to GST | | Aggregation |
 | **CGST_Amt** | number | YES | Central GST Amount | | Financials |
 | **SGST_Amt** | number | YES | State GST Amount | | Financials |
 | **IGST_Amt** | number | YES | Integrated GST Amount | | Financials |
 | **Location** | string | YES | Plant or storage location code | | `JOIN` (location) |
 | **auth_date** | datetime | YES | Date PO was authorized | | Audit |
 | **amndno** | integer | YES | Amendment number (versions of the PO) | 0 = Original | `WHERE` |
 
 ### 3) Relationships & Join Map
 
 | Target Table | Join Columns | Relationship Type | Context |
 | :--- | :--- | :--- | :--- |
 | `dbo.rmpotabitem` | `compcode`, `pono`, `invyear` | **One-to-Many** | Primary join for line items (RM codes and rates). |
 | `dbo.suppmas` | `compcode`, `supcode` | **Many-to-One** | Retrieve vendor details (Address, GST, Name). |
 | `dbo.rmindent` | `compcode`, `indentno` | **Many-to-One** | Link back to the internal material requisition. |
 | `dbo.rmincoming` | `compcode`, `pono` | **One-to-Many** | Track receipts/MRNs generated against this PO. |
 | `dbo.location` | `compcode`, `location` | **Many-to-One** | Plant or warehouse where material is to be delivered. |
 | `dbo.rmpotabamnd` | `compcode`, `pono`, `amndno` | **One-to-One** | Link to specific historical versions/amendments. |
 | `dbo.brandmas` | `compcode`, `br_code` | **Many-to-One** | Join via `rmpotabitem.br_code` for manufacturer info. |