GIFTINKINDSALEADJUSTMENT
Stores details about a gift-in-kind sale.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
PREVIOUSAMOUNT |
money |
|
Default = 0 |
Gift-in-kind sale amount prior to adjustment |
DATE |
datetime |
yes |
|
The date of the adjustment to the gift-in-kind sale record. |
POSTDATE |
datetime |
yes |
|
The date to use when posting the adjustment to the gift-in-kind sale record. |
POSTSTATUSCODE |
tinyint |
|
Default = 1 |
Flag used to indicate if the adjustment has been posted. |
POSTSTATUS |
nvarchar(11) (Computed) |
yes |
CASE [POSTSTATUSCODE] WHEN 0 THEN N'Posted' WHEN 1 THEN N'Not Posted' WHEN 2 THEN N'Do Not Post' END |
Provides a translation for the 'POSTSTATUSCODE' field. |
REASON |
nvarchar(300) |
|
Default = '' |
Gives further details for why this adjustment was made. |
ORGANIZATIONPREVIOUSAMOUNT |
money |
|
Default = 0 |
The price at which the gift-in-kind was sold in the organization currency. |
TRANSACTIONPREVIOUSAMOUNT |
money |
|
Default = 0 |
The price at which the gift-in-kind was sold in the transaction currency. |
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. |
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
GIFTINKINDSALEID |
uniqueidentifier |
|
FINANCIALTRANSACTION.ID
|
FK to GIFTINKINDSALE |
REASONCODEID |
uniqueidentifier |
yes |
ADJUSTMENTREASONCODE.ID
|
Indicates the reason this adjustment was made. |
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. |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_GIFTINKINDSALEADJUSTMENT_BASECURRENCYID |
BASECURRENCYID |
|
|
|
IX_GIFTINKINDSALEADJUSTMENT_BASEEXCHANGERATEID |
BASEEXCHANGERATEID |
|
|
|
IX_GIFTINKINDSALEADJUSTMENT_DATEADDED |
DATEADDED |
|
|
yes |
IX_GIFTINKINDSALEADJUSTMENT_DATECHANGED |
DATECHANGED |
|
|
|
IX_GIFTINKINDSALEADJUSTMENT_GIFTINKINDSALEID |
GIFTINKINDSALEID |
|
|
|
IX_GIFTINKINDSALEADJUSTMENT_ORGANIZATIONEXCHANGERATEID |
ORGANIZATIONEXCHANGERATEID |
|
|
|
IX_GIFTINKINDSALEADJUSTMENT_TRANSACTIONCURRENCYID |
TRANSACTIONCURRENCYID |
|
|
|
PK_GIFTINKINDSALEADJUSTMENT |
ID |
yes |
yes |
|
Triggers
Referenced by