WRITEOFFADJUSTMENT

Stores adjustments made to posted write-off.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
PREVIOUSAMOUNT money Default = 0 Amount of gift prior to adjustment
DATE datetime yes The date of the adjustment to the revenue record.
POSTDATE datetime yes The date to use when posting the adjustment to the revenue record.
POSTSTATUSCODE tinyint Default = 1 Flag used to indicate if the adjustment has been posted.
POSTSTATUS nvarchar(10) (Computed) yes CASE [POSTSTATUSCODE] WHEN 0 THEN N'Posted' WHEN 1 THEN N'Not Posted' END Provides a translation for the 'POSTSTATUSCODE' field.
REASON nvarchar(300) Default = '' Gives further details for why this adjustment was made.
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.
ORGANIZATIONPREVIOUSAMOUNT money Default = 0 Amount of gift prior to adjustment in organization currency.
TRANSACTIONPREVIOUSAMOUNT money Default = 0 Amount of gift prior to adjustment in transaction currency.

Foreign Keys

Foreign Key Field Type Null Notes Description
WRITEOFFID uniqueidentifier FINANCIALTRANSACTION.ID FK to WRITEOFF
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
REASONCODEID uniqueidentifier yes ADJUSTMENTREASONCODE.ID Indicates the reason this adjustment was made.
BASECURRENCYID uniqueidentifier yes CURRENCY.ID The base currency associated with this adjustment.
ORGANIZATIONEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to convert to organization amount.
TRANSACTIONCURRENCYID uniqueidentifier yes CURRENCY.ID The transaction currency associated with this adjustment.
BASEEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to convert from transaction amount to amount.

Indexes

Index Name Fields Unique Primary Clustered
IX_WRITEOFFADJUSTMENT_BASECURRENCYID BASECURRENCYID
IX_WRITEOFFADJUSTMENT_BASEEXCHANGERATEID BASEEXCHANGERATEID
IX_WRITEOFFADJUSTMENT_DATEADDED DATEADDED yes
IX_WRITEOFFADJUSTMENT_DATECHANGED DATECHANGED
IX_WRITEOFFADJUSTMENT_ORGANIZATIONEXCHANGERATEID ORGANIZATIONEXCHANGERATEID
IX_WRITEOFFADJUSTMENT_TRANSACTIONCURRENCYID TRANSACTIONCURRENCYID
IX_WRITEOFFADJUSTMENT_WRITEOFFID WRITEOFFID
PK_WRITEOFFADJUSTMENT ID yes yes

Triggers

Trigger Name Description
TR_WRITEOFFADJUSTMENT_INSERTUPDATE_CURRENCY
TR_WRITEOFFADJUSTMENT_AUDIT_UPDATE
TR_WRITEOFFADJUSTMENT_AUDIT_DELETE