GIFTINKINDSALETEMP

Stores details about a gift-in-kind sale.

Fields

Field Field Type Null Notes Description
ID uniqueidentifier Default = (newid()) Primary Key.
GIFTINKINDPAYMENTMETHODDETAILID uniqueidentifier FK to GIFTINKINDPAYMENTMETHODDETAIL
SALEDATE datetime The date to use when posting the sold gift-in-kind.
SALEAMOUNT money Default = 0 The price at which the gift-in-kind was sold.
NUMBEROFUNITS int Default = 0 The number of gift-in-kind units sold.
SALEPOSTDATE datetime yes The date to use when posting the sold gift-in-kind record.
SALEPOSTSTATUSCODE tinyint Default = 1 Flag used to indicate whether sold gift-in-kind has been posted, should be posted or needs to be posted.
SALEPOSTSTATUS nvarchar(11) (Computed) yes CASE [SALEPOSTSTATUSCODE] WHEN 0 THEN N'Posted' WHEN 1 THEN N'Not Posted' WHEN 2 THEN N'Do Not Post' END Provides a translation for the 'SALEPOSTSTATUSCODE' field.
ORGANIZATIONSALEAMOUNT money Default = 0 The price at which the gift-in-kind was sold in the organization currency.
TRANSACTIONSALEAMOUNT money Default = 0 The price at which the gift-in-kind was sold in the transaction currency.
BASECURRENCYID uniqueidentifier yes The base currency associated with this record.
ORGANIZATIONEXCHANGERATEID uniqueidentifier yes The exchange rate used to calculate the organization amount.
TRANSACTIONCURRENCYID uniqueidentifier yes The transaction currency associated with this record.
BASEEXCHANGERATEID uniqueidentifier yes The exchange rate used to calculate the base amount.
ADDEDBYID uniqueidentifier FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier FK to CHANGEAGENT.
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.

Indexes

Index Name Fields Unique Primary Clustered
IX_GIFTINKINDSALE_DATEADDED DATEADDED yes

Triggers

Trigger Name Description
TR_GIFTINKINDSALE_INSERTUPDATE_CURRENCY
TR_GIFTINKINDSALE_AUDIT_UPDATE
TR_GIFTINKINDSALE_AUDIT_DELETE