All tables
tables · table

exppotax

The exppotax table serves as a detailed ledger for tax and duty configurations applied specifically to Export Purchase Orders (PO). It acts as a bridge between a specific Purchase Order and the various tax components (duties) that apply to it. Each record defines a specific tax rate (taxpercentage) associated with a duty type (duty_code) for a particular customer's PO.

Row count
1
Last entry
Source
tables

Columns

7
ColumnTypeNullableMeaning
indexintegerNoPrimary Key - System generated unique identifier.
compcodestringNo**Company Code**: Unique identifier for the business unit.
ponostringNo**Purchase Order Number**: The reference ID for the export order.
custcodestringNo**Customer Code**: The unique identifier for the customer.
srnointegerNo**Serial Number**: The sequence of the tax line item within the PO.
duty_codeintegerNo**Duty/Tax Code**: Foreign key representing the type of tax (GST, Excise, etc.).
taxpercentagenumberNo**Tax Percentage**: The numerical rate applied for the specific duty.

Full documentation

### 1) Overview
 The `exppotax` table serves as a detailed ledger for tax and duty configurations applied specifically to **Export Purchase Orders (PO)**. It acts as a bridge between a specific Purchase Order and the various tax components (duties) that apply to it. Each record defines a specific tax rate (`taxpercentage`) associated with a duty type (`duty_code`) for a particular customer's PO.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | No | Primary Key - System generated unique identifier. | e.g., 0, 1, 2 | `WHERE index = 0` |
 | **compcode** | string | No | **Company Code**: Unique identifier for the business unit. | e.g., "DAS" | `JOIN` on `compcode` |
 | **pono** | string | No | **Purchase Order Number**: The reference ID for the export order. | e.g., "4501160860" | `JOIN` on `pono` |
 | **custcode** | string | No | **Customer Code**: The unique identifier for the customer. | e.g., "TENNECO(TH" | `JOIN` on `custcode` |
 | **srno** | integer | No | **Serial Number**: The sequence of the tax line item within the PO. | e.g., 1, 2 | Sort order |
 | **duty_code** | integer | No | **Duty/Tax Code**: Foreign key representing the type of tax (GST, Excise, etc.). | e.g., 10 | `JOIN` on `duty_code` |
 | **taxpercentage** | number | No | **Tax Percentage**: The numerical rate applied for the specific duty. | e.g., 100.0 (Likely % or Ratio) | Calculations |
 
 ---
 
 ### 3) Relationships & Join Map
 
 The `exppotax` table is central to export financial reporting and links primarily to Purchase Order headers and Tax Master tables.
 
 #### Primary Joins (SCHEMA_MAP Grounded):
 * **Export Purchase Orders**: 
  * Join with `dbo.pohdr` on `pono` and `compcode` to retrieve PO dates and terms.
  * Join with `dbo.exppodtl` on `pono` and `compcode` to link taxes to specific item quantities.
 * **Customer Master**:
  * Join with `dbo.cust` on `custcode` and `compcode` to fetch customer addresses and registration details.
 * **Tax/Duty Masters**:
  * Join with `dbo.dutymas` or `dbo.cdutymas` on `duty_code` and `compcode` to get the descriptive name of the tax (e.g., "Export Duty", "IGST").
 * **Related Tax Tables**:
  * Structure is identical to `dbo.potax` (Domestic PO Tax) and `dbo.potaxamnd` (Tax Amendments).
 
 #### Join Example:
 ```sql
 SELECT 
  h.PONO, 
  c.custname, 
  d.duty_name, 
  t.taxpercentage 
 FROM dbo.exppotax t
 JOIN dbo.pohdr h ON t.pono = h.PONO AND t.compcode = h.compcode
 JOIN dbo.cust c ON t.custcode = c.custcode AND t.compcode = c.compcode
 JOIN dbo.dutymas d ON t.duty_code = d.duty_code AND t.compcode = d.compcode;
 ```