tables · table
potaxamnd
The potaxamnd table serves as a historical repository for Purchase Order Tax Amendments. It tracks modifications made to tax percentages, duty codes, and sequences associated with specific Purchase Orders (pono) and specific amendment versions (amndno). This table is critical for auditing how tax structures evolved over the lifecycle of a procurement contract.
Row count
5
Last entry
—
Source
tables
Columns
8| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | NO | Primary key for the record. |
compcode | string | NO | Unique identifier for the company/branch. |
pono | string | NO | Purchase Order Number. |
custcode | string | NO | Customer or Vendor code associated with the PO. |
srno | integer | NO | Serial number/Sequence of the tax line item. |
duty_code | integer | NO | Internal code identifying the type of tax or duty (GST, Excise, etc.). |
taxpercentage | number | NO | The percentage rate applied for this specific duty. |
amndno | integer | NO | The amendment version number for this specific record. |
Full documentation
### 1) Overview The `potaxamnd` table serves as a historical repository for **Purchase Order Tax Amendments**. It tracks modifications made to tax percentages, duty codes, and sequences associated with specific Purchase Orders (`pono`) and specific amendment versions (`amndno`). This table is critical for auditing how tax structures evolved over the lifecycle of a procurement contract. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | NO | Primary key for the record. | e.g., 0, 1, 2 | `PK` | | **compcode** | string | NO | Unique identifier for the company/branch. | e.g., "DAS" | `JOIN`, `FILTER` | | **pono** | string | NO | Purchase Order Number. | e.g., "M7/RM/2013400036" | `JOIN`, `FILTER` | | **custcode** | string | NO | Customer or Vendor code associated with the PO. | e.g., "QHT(K)" | `JOIN` | | **srno** | integer | NO | Serial number/Sequence of the tax line item. | 1, 2, 3... | `ORDER BY` | | **duty_code** | integer | NO | Internal code identifying the type of tax or duty (GST, Excise, etc.). | e.g., 3, 7, 8 | `JOIN` | | **taxpercentage** | number | NO | The percentage rate applied for this specific duty. | e.g., 100.0, 12.0 | `MATH` | | **amndno** | integer | NO | The amendment version number for this specific record. | e.g., 3 | `JOIN`, `FILTER` | ### 3) Relationships & Join Map The `potaxamnd` table is a transactional child table designed to provide a specific "snapshot" of taxes for a given amendment version. #### Logical Joins: * **PO Header Amendments (`dbo.pohdramnd`)**: Join on `compcode`, `pono`, and `amndno` to retrieve general order status during that amendment. * **PO Detail Amendments (`dbo.podtlamnd`)**: Join on `compcode`, `pono`, and `amndno` to link taxes to specific amended line items. * **Current PO Taxes (`dbo.potax`)**: Join on `compcode` and `pono` to compare current tax rates against amended history. * **Duty Masters (`dbo.dutymas` or `dbo.cdutymas`)**: Join on `compcode` and `duty_code` to retrieve the human-readable name (e.g., "CGST") of the tax. * **Customer/Supplier (`dbo.cust` / `dbo.suppmas`)**: Join on `compcode` and `custcode` (or `supcode`) to get entity details. #### JOIN MAP (Authoritative): | Target Table | Join Column(s) | Likely/Real | | :--- | :--- | :--- | | `dbo.pohdramnd` | `compcode`, `PONO` (pono), `amndno` | **Real** | | `dbo.podtlamnd` | `compcode`, `pono`, `amndno` | **Real** | | `dbo.potax` | `compcode`, `pono`, `custcode`, `duty_code` | **Real** | | `dbo.dutymas` | `compcode`, `duty_code` | **Real** | | `dbo.cdutymas` | `compcode`, `duty_code` | **Real** | | `dbo.cust` | `compcode`, `custcode` | **Real** | ---