tables · table
invtype
The invtype table serves as a master lookup for invoice types within the system. It categorizes different types of transactions (e.g., Sales, Raw Material, Scrap, Export) and associates them with a company code (compcode) and a category (invcategory). This table is primarily used to provide descriptive names for invoice type IDs stored in header tables like invhdr and Performainvhdr.
Row count
14
Last entry
—
Source
tables
Columns
5| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | NO | Primary key/Internal index. |
compcode | string | NO | Unique identifier for the company. |
invtype | integer | NO | Numeric code representing a specific invoice type. |
invtypename | string | YES | Descriptive name of the invoice type. |
invcategory | string | YES | Classification of the invoice. |
Full documentation
### 1) Overview The `invtype` table serves as a master lookup for invoice types within the system. It categorizes different types of transactions (e.g., Sales, Raw Material, Scrap, Export) and associates them with a company code (`compcode`) and a category (`invcategory`). This table is primarily used to provide descriptive names for invoice type IDs stored in header tables like `invhdr` and `Performainvhdr`. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | NO | Primary key/Internal index. | | `PRIMARY KEY` | | **compcode** | string | NO | Unique identifier for the company. | e.g., "DAS", "PDS" | `JOIN`, `WHERE` | | **invtype** | integer | NO | Numeric code representing a specific invoice type. | 0 (Sale), 1 (Raw Material), 4 (Scrap), 9 (Export) | `JOIN` | | **invtypename** | string | YES | Descriptive name of the invoice type. | "SALE", "SCRAP", "EXPORT INVOICE" | `Display Label` | | **invcategory** | string | YES | Classification of the invoice. | **D**: Domestic, **E**: Export | `Filter` | ### 3) Relationships & Join Map The `invtype` table acts as a reference entity. Joins should always include both `compcode` and `invtype` to ensure the correct descriptive label is retrieved for the specific company context. #### Primary Joins (Validated) * **dbo.invhdr**: Join on `invtype.invtype = invhdr.invtype` AND `invtype.compcode = invhdr.compcode`. This is the standard join to get invoice descriptions for sales records. * **dbo.Performainvhdr**: Join on `invtype.invtype = Performainvhdr.invtype` AND `invtype.compcode = Performainvhdr.compcode`. Used to identify the type of proforma invoice. #### Secondary Joins (Likely) * **dbo.TEMPSALEREGISTER**: Join on `invtype.invtype = TEMPSALEREGISTER.Invtype` AND `invtype.compcode = TEMPSALEREGISTER.compcode`. * **dbo.rejaccept_dtl**: Join on `invtype.invtype = rejaccept_dtl.invtype` AND `invtype.compcode = rejaccept_dtl.compcode`. * **dbo.tempinvpaymentcustwise**: Join on `invtype.invtype = tempinvpaymentcustwise.invtype` AND `invtype.compcode = tempinvpaymentcustwise.compcode`.