GIFTINKINDPAYMENTMETHODDETAIL

Stores gift in kind detail information for a revenue record when the payment method is gift in kind.

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.
ITEMNAME nvarchar(100) Default = '' Stores the name of the item
DISPOSITIONCODE tinyint Default = 0 Whether the item is designated for sale or use
DISPOSITION nvarchar(7) (Computed) yes CASE [DISPOSITIONCODE] WHEN 0 THEN N'To use' WHEN 1 THEN N'To sell' END Provides a translation for the 'DISPOSITIONCODE' field.
NUMBEROFUNITS int Default = 0 The number of units of the item issued.
FAIRMARKETVALUE money Default = 0 The value assessed to each unit of the item
ORGANIZATIONFAIRMARKETVALUE money Default = 0 The value assessed to each unit of the item in the organization currency.
TRANSACTIONFAIRMARKETVALUE money Default = 0 The value assessed to each unit of the item in the transaction currency.

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier REVENUEPAYMENTMETHOD.ID Primary Key.
GIFTINKINDSUBTYPECODEID uniqueidentifier yes GIFTINKINDSUBTYPECODE.ID Stores the subtype for a gift in kind.
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 record.
ORGANIZATIONEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to calculate the organization amount.
TRANSACTIONCURRENCYID uniqueidentifier yes CURRENCY.ID The transaction currency associated with this record.
BASEEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to calculate the base amount.

Indexes

Index Name Fields Unique Primary Clustered
IX_GIFTINKINDPAYMENTMETHODDETAIL_BASECURRENCYID BASECURRENCYID
IX_GIFTINKINDPAYMENTMETHODDETAIL_BASEEXCHANGERATEID BASEEXCHANGERATEID
IX_GIFTINKINDPAYMENTMETHODDETAIL_DATEADDED DATEADDED yes
IX_GIFTINKINDPAYMENTMETHODDETAIL_DATECHANGED DATECHANGED
IX_GIFTINKINDPAYMENTMETHODDETAIL_ORGANIZATIONEXCHANGERATEID ORGANIZATIONEXCHANGERATEID
IX_GIFTINKINDPAYMENTMETHODDETAIL_TRANSACTIONCURRENCYID TRANSACTIONCURRENCYID
PK_GIFTINKINDPAYMENTMETHODDETAIL ID yes yes

Triggers

Trigger Name Description
TR_GIFTINKINDPAYMENTMETHODDETAIL_AUDIT_UPDATE
TR_GIFTINKINDPAYMENTMETHODDETAIL_AUDIT_DELETE
TR_GIFTINKINDPAYMENTMETHODDETAIL_INSERTUPDATE_CURRENCY

Referenced by

Referenced by Field
GIFTINKINDAPPRAISAL GIFTINKINDPAYMENTMETHODDETAILID
GIFTINKINDSALE_EXT GIFTINKINDPAYMENTMETHODDETAILID