REVENUESPLITBUSINESSUNIT

Stores business units associated with revenue splits.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
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.
AMOUNT money Default = 0 Amount of money given to this business unit.
ORGANIZATIONAMOUNT money Default = 0 The amount of the revenue split in organization currency.

Foreign Keys

Foreign Key Field Type Null Notes Description
REVENUESPLITID uniqueidentifier FINANCIALTRANSACTIONLINEITEM.ID FK to REVENUESPLIT
BUSINESSUNITCODEID uniqueidentifier BUSINESSUNITCODE.ID FK to BUSINESSUNITCODE
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 split.
ORGANIZATIONEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to convert from amount to organization amount.

Indexes

Index Name Fields Unique Primary Clustered
IX_REVENUESPLITBUSINESSUNIT_DATEADDED DATEADDED yes
IX_REVENUESPLITBUSINESSUNIT_DATECHANGED DATECHANGED
PK_REVENUESPLITBUSINESSUNIT ID yes yes
UIX_REVENUESPLITBUSINESSUNIT_REVENUESPLITID_BUSINESSUNITCODEID REVENUESPLITID, BUSINESSUNITCODEID yes

Triggers

Trigger Name Description
TR_REVENUESPLITBUSINESSUNIT_INSERTUPDATE_CURRENCY
TR_REVENUESPLITBUSINESSUNIT_AUDIT_UPDATE
TR_REVENUESPLITBUSINESSUNIT_AUDIT_DELETE