TAXITEM

An Item belonging to a specific Tax

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
PERCENTAGE decimal(7, 4) Default = 0 The percentage of the Tax Item
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Keys

Foreign Key Field Type Null Notes Description
TAXID uniqueidentifier TAX.ID The ID of the Tax that the Tax Item belongs to
TAXENTITYCODEID uniqueidentifier TAXENTITYCODE.ID The ID of the Tax Entity that belongs to this Tax
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_TAXITEM_DATEADDED DATEADDED yes
IX_TAXITEM_DATECHANGED DATECHANGED
PK_TAXITEM ID yes yes
UIX_TAXITEM_TAXENTITYCODEID_TAXID TAXENTITYCODEID, TAXID yes

Triggers

Trigger Name Description
TR_TAXITEM_AUDIT_UPDATE
TR_TAXITEM_AUDIT_DELETE