Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 DATE datetime  
 POSTSTATUSCODE tinyint   Default = 1 Flag used to indicate whether write-off has been posted, should be posted or needs to be posted.
 POSTDATE datetime The date to use when posting the write-off record.
 REASON nvarchar(300)   Default = '' Gives further details for why this write-off 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) CONVERT(bigint, TS) Numeric representation of the timestamp.
 POSTSTATUS nvarchar(11) (Computed) 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.

Foreign Key Field Type Null Notes Description
 REVENUEID uniqueidentifier   REVENUE.LOCALID FK to REVENUE
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 REASONCODEID uniqueidentifier WRITEOFFREASONCODE.ID Indicates the reason this write-off was made.

Index Name Field(s) Unique Primary Clustered
 IX_WRITEOFF_DATEADDED DATEADDED    
 IX_WRITEOFF_DATECHANGED DATECHANGED      
 IX_WRITEOFF_REVENUEID REVENUEID      
 PK_WRITEOFF ID  

Trigger Name Description
 TR_WRITEOFF_AUDIT_UPDATE
 TR_WRITEOFF_AUDIT_DELETE

Referenced by Field
 INSTALLMENTSPLITWRITEOFF WRITEOFFID
 WRITEOFFADJUSTMENT WRITEOFFID
 WRITEOFFGLDISTRIBUTION WRITEOFFID
 WRITEOFFSPLIT WRITEOFFID

Entity-Relationship diagram of this table