Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 SYSTEMMASK int   Default = 0 System of origin bit mask (1 - GL, 4 - AP, 8 - AR, 16 - SB, 32 - RE, 64 - PY, BBEC - 128, PE - 256, 2048 - CR) add more as we come to them
 PAYMENTSOURCE nvarchar(100)   Default = '' Payment source
 POSTSTATUSCODE tinyint   Default = 1 Post status
 POSTSTATUS nvarchar(11) (Computed) CASE [POSTSTATUSCODE] WHEN 1 THEN N'Not posted' WHEN 2 THEN N'Do not post' END Provides a translation for the 'POSTSTATUSCODE' field.
 PAYMENTMETHODCODE tinyint   Default = 2 Payment method
 PAYMENTMETHOD nvarchar(11) (Computed) CASE [PAYMENTMETHODCODE] WHEN 1 THEN N'Check' WHEN 2 THEN N'Cash' WHEN 8 THEN N'Credit card' WHEN 32 THEN N'Other' END Provides a translation for the 'PAYMENTMETHODCODE' field.
 REFERENCE nvarchar(20)   Default = '' Reference
 REFERENCEDATE datetime Reference date
 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.

Foreign Key Field Type Null Notes Description
 ID uniqueidentifier   FINANCIALTRANSACTION.ID Primary Key.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.

Index Name Field(s) Unique Primary Clustered
 IX_MISCELLANEOUSPAYMENT_DATEADDED DATEADDED    
 IX_MISCELLANEOUSPAYMENT_DATECHANGED DATECHANGED      
 PK_MISCELLANEOUSPAYMENT ID  

Trigger Name Description
 TR_MISCELLANEOUSPAYMENT_IUD
 TR_MISCELLANEOUSPAYMENT_AUDIT_UPDATE
 TR_MISCELLANEOUSPAYMENT_AUDIT_DELETE

Entity-Relationship diagram of this table