All tables
tables · table

invtax

The invtax table is a transactional sub-ledger that stores itemized tax and duty components (such as Excise, VAT, CST, and various cesses) for sales invoices. While invhdr stores the total invoice value, invtax provides the breakdown of specific levies based on a duty_code.

Row count
154,292
Last entry
Source
tables

Columns

8
ColumnTypeNullableMeaning
indexintegerNOPrimary Key (Identity)
compcodestringNOCompany Identifier
SnointegerYESSerial number within the invoice tax list
invnointegerYESSales Invoice Number
invyearintegerYESFinancial Year of the invoice
duty_codeintegerYESIdentifier for tax type
taxpernumberYESTax percentage rate applied
taxamountnumberYESMonetary value of this specific tax/duty

Full documentation

### 1) Overview
 The `invtax` table is a transactional sub-ledger that stores itemized tax and duty components (such as Excise, VAT, CST, and various cesses) for sales invoices. While `invhdr` stores the total invoice value, `invtax` provides the breakdown of specific levies based on a `duty_code`.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | NO | Primary Key (Identity) | | Internal reference. |
 | **compcode** | string | NO | Company Identifier | e.g., "DAS" | Part of composite join key. |
 | **Sno** | integer | YES | Serial number within the invoice tax list | 1, 2, 3... | Used for ordering tax lines. |
 | **invno** | integer | YES | Sales Invoice Number | | Primary link to `invhdr` and `invdtl`. |
 | **invyear** | integer | YES | Financial Year of the invoice | e.g., 2013 | Essential for unique invoice identification. |
 | **duty_code** | integer | YES | Identifier for tax type | 1=Basic, 7=Excise, 11=VAT, 13=CST, 22=Other | Joined with `dutymas` or `cdutymas`. |
 | **taxper** | number | YES | Tax percentage rate applied | 0.00 - 100.00 | Informational for reporting. |
 | **taxamount** | number | YES | Monetary value of this specific tax/duty | | Aggregated for total tax reports. |
 
 ### 3) Relationships & Join Map
 
 #### Parent Table (Authority)
 * **dbo.invhdr**: Joins on `compcode`, `invno`, and `invyear`. This is the most common join used to filter taxes by date or customer.
 * **dbo.invdtl**: Relates via `invno`, `invyear`, and `compcode` to correlate specific tax lines with itemized goods.
 
 #### Master Data Reference
 * **dbo.dutymas** / **dbo.cdutymas**: **Likely** joins on `duty_code` and `compcode` to retrieve the human-readable name of the tax (e.g., "VAT @ 12.5%").
 
 #### Join Map Table
 | Target Table | Join Columns | Join Type | Logic |
 | :--- | :--- | :--- | :--- |
 | `dbo.invhdr` | `compcode`, `invno`, `invyear` | One-to-Many | Links tax breakdown to invoice header (dates/customers). |
 | `dbo.invdtl` | `compcode`, `invno`, `invyear` | Many-to-Many | Connects tax components to specific invoice items. |
 | `dbo.dutymas` | `compcode`, `duty_code` | Many-to-One | **Likely** lookup for tax names and accounting ledgers. |
 | `dbo.invdesphdr`| `compcode`, `invno`, `invyear` | One-to-Many | **Likely** links to dispatch/delivery documents. |
 
 ---