EVENTEXPENSE

Contains information pertaining to an event expense.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
BUDGETEDAMOUNT money Default = 0 The budgeted amount for this expense in base currency.
ACTUALAMOUNT money Default = 0 The actual amount charged by the vendor for this expense in base currency.
AMOUNTPAID money Default = 0 The amount paid for this expense in base currency.
DATEDUE datetime yes
DATEPAID datetime yes
COMMENT nvarchar(250) Default = ''
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.
ORGANIZATIONBUDGETEDAMOUNT money Default = 0 The budgeted amount for this expense in organization currency.
ORGANIZATIONACTUALAMOUNT money Default = 0 The actual amount charged by the vendor for this expense in organization currency.
ORGANIZATIONAMOUNTPAID money Default = 0 The amount paid for this expense in organization currency.

Foreign Keys

Foreign Key Field Type Null Notes Description
EVENTID uniqueidentifier EVENT.ID FK to EVENT
EVENTEXPENSETYPECODEID uniqueidentifier EVENTEXPENSETYPECODE.LOCALID FK to EVENTEXPENSETYPECODE
VENDORID uniqueidentifier yes CONSTITUENT.LOCALID FK to CONSTITUENT
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 expense.
ORGANIZATIONEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to convert to organization amount.

Indexes

Index Name Fields Unique Primary Clustered
IX_EVENTEXPENSE_BASECURRENCYID BASECURRENCYID
IX_EVENTEXPENSE_DATEADDED DATEADDED yes
IX_EVENTEXPENSE_DATECHANGED DATECHANGED
IX_EVENTEXPENSE_ORGANIZATIONEXCHANGERATEID ORGANIZATIONEXCHANGERATEID
IX_EVENTEXPENSE_VENDORID VENDORID
PK_EVENTEXPENSE ID yes yes

Triggers

Trigger Name Description
TR_EVENTEXPENSE_INSERTUPDATE_CURRENCY
TR_EVENTEXPENSE_AUDIT_UPDATE
TR_EVENTEXPENSE_AUDIT_DELETE