Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 NAME nvarchar(100)   Default = '' A name for the expense.
 DESCRIPTION nvarchar(255)   Default = '' A description of the expense.
 COST money   Default = 0 The cost associated with the expense.
 COSTDISTRIBUTIONMETHODCODE tinyint   Default = 0 The method to be used to apply the expense's base cost to a marketing effort.
 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) CONVERT(bigint, TS) Numeric representation of the timestamp.
 ORGANIZATIONCOST money   Default = 0 The amount of the cost in organization currency.
 COSTDISTRIBUTIONMETHOD nvarchar(39) (Computed) CASE [COSTDISTRIBUTIONMETHODCODE] WHEN 0 THEN N'Per piece' WHEN 1 THEN N'Per response' WHEN 2 THEN N'Per marketing effort' WHEN 4 THEN N'Per thousand' WHEN 3 THEN N'Do not include in marketing effort cost' END

Foreign Key Field Type Null Notes Description
 SITEID uniqueidentifier SITE.ID The site to which the expense belongs.
 EXPENSETYPECODEID uniqueidentifier MKTEXPENSETYPECODE.ID The type of the expense.
 VENDORID uniqueidentifier VENDOR.ID The vendor associated with this expense.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 BASECURRENCYID uniqueidentifier CURRENCY.ID The base currency associated with this document.
 CURRENCYEXCHANGERATEID uniqueidentifier CURRENCYEXCHANGERATE.ID The exchange rate used to convert from amount to organization amount.

Index Name Field(s) Unique Primary Clustered
 IX_MKTEXPENSE_BASECURRENCYID BASECURRENCYID      
 IX_MKTEXPENSE_CURRENCYEXCHANGERATEID CURRENCYEXCHANGERATEID      
 IX_MKTEXPENSE_DATEADDED DATEADDED    
 IX_MKTEXPENSE_DATECHANGED DATECHANGED      
 IX_MKTEXPENSE_SITEID SITEID      
 IX_MKTEXPENSE_VENDORID VENDORID      
 PK_MKTEXPENSE ID  
 UC_MKTEXPENSE_NAME NAME    

Trigger Name Description
 TR_MKTEXPENSE_IU_ORGANIZATIONCOST
 TR_MKTEXPENSE_AUDIT_UPDATE
 TR_MKTEXPENSE_AUDIT_DELETE

Referenced by Field
 MKTPACKAGEEXPENSE EXPENSEID

Entity-Relationship diagram of this table