All tables
tables · table

rmpotabamnd

The rmpotabamnd table serves as the historical header archive for Raw Material Purchase Order (RMPO) Amendments. It captures a snapshot of a Purchase Order's header information (terms, delivery dates, freight details, and vendor references) every time a change is authorized.

Row count
1,584
Last entry
2026-03-31
Source
tables

Columns

28
ColumnTypeNullableMeaning
indexintegerNoPrimary Key
compcodestringNoCompany Identifier
pononumberNoPurchase Order Number
amndnointegerNoAmendment Sequence Number
amnddatedatetimeYesDate the amendment was created
podatedatetimeYesOriginal Purchase Order date
supcodestringYesSupplier/Vendor Code
indentnointegerYesReference to Material Requisition
deliverydatetimeYesRevised Delivery Deadline
f_o_rstringYesFreight Terms (Free on Rail/Road)
usernamestringYesUser who created the amendment
useraddstringYesUser who added the record
addtimestringYesTimestamp of record creation
usermodstringYesUser who last modified the record
modtimestringYesTimestamp of last modification
printflagstringYesFlag indicating if PO was printed
remarksstringYesNarrative notes regarding the change
quotnostringYesSupplier quotation reference
quotdatedatetimeYesDate of supplier quotation
authflagintegerYesAuthorization Status
wefdatedatetimeYes"With Effect From" Date
povaluestringYesTotal numeric value of the PO
povaluewordstringYesPO value written in words
invyearintegerNoFinancial Year for document series
consigneestringYesCode for delivery destination
podocstringYesPO Document reference/path
cancel_flagstringYesCancellation status
lockstringYesRecord lock status

Full documentation

### 1. Overview
 The `rmpotabamnd` table serves as the historical header archive for **Raw Material Purchase Order (RMPO) Amendments**. It captures a snapshot of a Purchase Order's header information (terms, delivery dates, freight details, and vendor references) every time a change is authorized. 
 
 This table allows the system to maintain a multi-version audit trail of a single PO (`pono`), where `amndno` 0 represents the original entry and subsequent integers represent sequential revisions. It is primarily used for reporting on changes between PO versions and for historical price/term tracking.
 
 ### 2. Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Primary Key | Auto-incrementing | `WHERE index = 10` |
 | **compcode** | string | No | Company Identifier | e.g., "DAS" | `JOIN` key |
 | **pono** | number | No | Purchase Order Number | | `JOIN` key |
 | **amndno** | integer | No | Amendment Sequence Number | 0 (Original), 1, 2... | `JOIN` key |
 | **amnddate** | datetime | Yes | Date the amendment was created | | Filtering |
 | **podate** | datetime | Yes | Original Purchase Order date | | Reporting |
 | **supcode** | string | Yes | Supplier/Vendor Code | e.g., "ST", "RS" | `JOIN` to `suppmas` |
 | **indentno** | integer | Yes | Reference to Material Requisition | | `JOIN` to `rmindent` |
 | **delivery** | datetime | Yes | Revised Delivery Deadline | | Planning |
 | **f_o_r** | string | Yes | Freight Terms (Free on Rail/Road) | e.g., "Rohtak" | Information |
 | **term_1 ... term_7**| string | Yes | Commercial terms & conditions | e.g., "30 DAYS", "VAT @ 5%" | Information |
 | **username** | string | Yes | User who created the amendment | | Auditing |
 | **useradd** | string | Yes | User who added the record | | Auditing |
 | **addtime** | string | Yes | Timestamp of record creation | | Auditing |
 | **usermod** | string | Yes | User who last modified the record | | Auditing |
 | **modtime** | string | Yes | Timestamp of last modification | | Auditing |
 | **printflag** | string | Yes | Flag indicating if PO was printed | | Status |
 | **remarks** | string | Yes | Narrative notes regarding the change | | Documentation |
 | **quotno** | string | Yes | Supplier quotation reference | | Cross-reference |
 | **quotdate** | datetime | Yes | Date of supplier quotation | | Cross-reference |
 | **authflag** | integer | Yes | Authorization Status | 1 = Authorized | Logic gates |
 | **wefdate** | datetime | Yes | "With Effect From" Date | | Validity |
 | **povalue** | string | Yes | Total numeric value of the PO | | Calculation |
 | **povalueword** | string | Yes | PO value written in words | | Document Printing |
 | **invyear** | integer | No | Financial Year for document series | e.g., 2013 | `JOIN` key |
 | **consignee** | string | Yes | Code for delivery destination | | `JOIN` Likely |
 | **podoc** | string | Yes | PO Document reference/path | | Documentation |
 | **cancel_flag** | string | Yes | Cancellation status | N, Y, NULL | Filtering |
 | **lock** | string | Yes | Record lock status | N, Y | System lock |
 
 ---
 
 ### 3. Relationships & Join Map
 
 #### Logical Parents
 * **rmindent**: Linked via `(compcode, indentno)`. Tracks the origin of the purchase request.
 * **suppmas**: Linked via `(compcode, supcode)`. Provides vendor name and tax profile.
 * **company**: Linked via `(compcode)`. Provides entity-level details.
 
 #### Logical Children (Amendment Details)
 * **rmpotabitemamnd**: Linked via `(compcode, pono, invyear, amndno)`. This table contains the specific raw material items associated with this specific PO revision.
 
 #### Strategic Join Map
 | Target Table | Join Columns | Purpose |
 | :--- | :--- | :--- |
 | `rmpotabitemamnd` | `compcode, pono, invyear, amndno` | Retrieve line items for a specific PO revision. |
 | `rmindent` | `compcode, indentno` | Trace PO back to the internal requisition. |
 | `suppmas` | `compcode, supcode` | Get vendor details for the amended PO. |
 | `brandmas` | `compcode, quotno` (Likely) | Join via line-item `make` for brand names. |