RECEIVABLEPAYMENT

Payments in the financial system.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
PAYMENTMETHODCODE tinyint Default = 0 The method of payment in which the revenue was received.
PAYMENTMETHOD nvarchar(12) (Computed) yes CASE [PAYMENTMETHODCODE] WHEN 0 THEN N'Cash' WHEN 1 THEN N'Check' WHEN 2 THEN N'Credit card' WHEN 3 THEN N'Direct debit' WHEN 10 THEN N'Other' END Provides a translation for the 'PAYMENTMETHODCODE' field.
REFERENCEDATE UDT_FUZZYDATE Default = '00000000' The date that the reference was made.
REFERENCENUMBER nvarchar(20) Default = '' Reference number for this cash payment.
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.
CONSTITUENTID uniqueidentifier yes CONSTITUENT.LOCALID The constituent record that the payment was paid by.

Indexes

Index Name Fields Unique Primary Clustered
IX_RECEIVABLEPAYMENT_CONSTITUENTID CONSTITUENTID
IX_RECEIVABLEPAYMENT_DATEADDED DATEADDED yes
IX_RECEIVABLEPAYMENT_DATECHANGED DATECHANGED
PK_RECEIVABLEPAYMENT ID yes yes

Triggers

Trigger Name Description
TR_RECEIVABLEPAYMENT_FINANCIALTRANSACTIONTYPE
TR_RECEIVABLEPAYMENT_AUDIT_UPDATE
TR_RECEIVABLEPAYMENT_AUDIT_DELETE

Referenced by

Referenced by Field
RECEIVABLEPAYMENTCHECK ID
RECEIVABLEPAYMENTCREDITCARD ID
RECEIVABLEPAYMENTDIRECTDEBIT ID
RECEIVABLEPAYMENTOTHERMETHOD ID