MISCELLANEOUSPAYMENT

All miscellaneous payment records.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

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) yes 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) yes 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 yes 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) yes CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Keys

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.

Indexes

Index Name Fields Unique Primary Clustered
IX_MISCELLANEOUSPAYMENT_DATEADDED DATEADDED yes
IX_MISCELLANEOUSPAYMENT_DATECHANGED DATECHANGED
PK_MISCELLANEOUSPAYMENT ID yes yes

Triggers

Trigger Name Description
TR_MISCELLANEOUSPAYMENT_IUD
TR_MISCELLANEOUSPAYMENT_AUDIT_UPDATE
TR_MISCELLANEOUSPAYMENT_AUDIT_DELETE