GIFTINKINDSALEADJUSTMENT (4.0SP20)

Stores details about a gift-in-kind sale.

Primary Key
Primary Key Field Type

ID

uniqueidentifier

Foreign Key Fields
Foreign Key Field Type Null Notes Description

GIFTINKINDSALEID

uniqueidentifier

false

FK to GIFTINKINDSALE

REASONCODEID

uniqueidentifier

true

Indicates the reason this adjustment was made.

BASECURRENCYID

uniqueidentifier

true

The base currency associated with this record.

ORGANIZATIONEXCHANGERATEID

uniqueidentifier

true

The exchange rate used to calculate the organization amount.

TRANSACTIONCURRENCYID

uniqueidentifier

true

The transaction currency associated with this record.

BASEEXCHANGERATEID

uniqueidentifier

true

The exchange rate used to calculate the base amount.

ADDEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

CHANGEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

Fields
Field Field Type Null Notes Description

PREVIOUSAMOUNT

money

false

0

Gift-in-kind sale amount prior to adjustment

DATE

datetime

true

The date of the adjustment to the gift-in-kind sale record.

POSTDATE

datetime

true

The date to use when posting the adjustment to the gift-in-kind sale record.

POSTSTATUSCODE

tinyint

false

1

Flag used to indicate if the adjustment has been posted.

POSTSTATUS

nvarchar(11) (Computed)

true

Provides a translation for the 'POSTSTATUSCODE' field.

REASON

nvarchar(300)

false

''

Gives further details for why this adjustment was made.

ORGANIZATIONPREVIOUSAMOUNT

money

false

0

The price at which the gift-in-kind was sold in the organization currency.

TRANSACTIONPREVIOUSAMOUNT

money

false

0

The price at which the gift-in-kind was sold in the transaction currency.

DATEADDED

datetime

false

getdate()

Indicates the date this record was added.

DATECHANGED

datetime

false

getdate()

Indicates the date this record was last changed.

TS

timestamp

false

Timestamp.

TSLONG

bigint (Computed)

true

Numeric representation of the timestamp.

Indexes
Index Name Field(s) Unique Primary Clustered

IX_GIFTINKINDSALEADJUSTMENT_BASECURRENCYID

BASECURRENCYID

False

False

False

IX_GIFTINKINDSALEADJUSTMENT_BASEEXCHANGERATEID

BASEEXCHANGERATEID

False

False

False

IX_GIFTINKINDSALEADJUSTMENT_DATEADDED

DATEADDED

False

False

True

IX_GIFTINKINDSALEADJUSTMENT_DATECHANGED

DATECHANGED

False

False

False

IX_GIFTINKINDSALEADJUSTMENT_GIFTINKINDSALEID

GIFTINKINDSALEID

False

False

False

IX_GIFTINKINDSALEADJUSTMENT_ORGANIZATIONEXCHANGERATEID

ORGANIZATIONEXCHANGERATEID

False

False

False

IX_GIFTINKINDSALEADJUSTMENT_TRANSACTIONCURRENCYID

TRANSACTIONCURRENCYID

False

False

False

PK_GIFTINKINDSALEADJUSTMENT

ID

True

True

False

Triggers
Trigger Name Description

TR_GIFTINKINDSALEADJUSTMENT_INSERTUPDATE_CURRENCY

TR_GIFTINKINDSALEADJUSTMENT_AUDIT_UPDATE

TR_GIFTINKINDSALEADJUSTMENT_AUDIT_DELETE

Referenced by
Referenced by Field

ADJUSTMENTHISTORYGIFTINKIND

GIFTINKINDSALEADJUSTMENTID