REVENUEVAT

Contains value added tax information for revenue records.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
AMOUNTTOTAX money Default = 0 Amount subject to value added tax in base currency.
VATAMOUNT money Default = 0 Amount of value added tax in base currency.
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.
ORGANIZATIONAMOUNTTOTAX money Default = 0 Amount subject to value added tax in organization currency.
ORGANIZATIONVATAMOUNT money Default = 0 Amount of value added tax in organization currency.
TRANSACTIONAMOUNTTOTAX money Default = 0 Amount subject to value added tax in transaction currency.
TRANSACTIONVATAMOUNT money Default = 0 Amount of value added tax in transaction currency.

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier FINANCIALTRANSACTION.ID Primary Key.
VATTAXRATEID uniqueidentifier yes VATTAXRATE.ID Value added tax rate to used.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
BASECURRENCYID uniqueidentifier yes CURRENCY.ID The base currency associated with this revenue.
ORGANIZATIONEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to convert to organization amount.
TRANSACTIONCURRENCYID uniqueidentifier yes CURRENCY.ID The transaction currency associated with this revenue.
BASEEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to convert from transaction amount to base amount.

Indexes

Index Name Fields Unique Primary Clustered
IX_REVENUEVAT_DATEADDED DATEADDED yes
IX_REVENUEVAT_DATECHANGED DATECHANGED
IX_REVENUEVAT_VATTAXRATEID VATTAXRATEID
PK_REVENUEVAT ID yes yes

Triggers

Trigger Name Description
TR_REVENUEVAT_AUDIT_UPDATE
TR_REVENUEVAT_INSERTUPDATE_CURRENCY
TR_REVENUEVAT_AUDIT_DELETE