REVENUESCHEDULEDIRECTDEBITPAYMENT

Stores direct debit detail information for a pledge or recurring gift record when the payment method is direct debit.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
REFERENCEDATE UDT_FUZZYDATE Default = '00000000' The date that the reference was made.
REFERENCENUMBER nvarchar(20) Default = ''
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.
DIRECTDEBITRESULTCODE nvarchar(10) Default = '' The result code from a direct debit return file.
DDISOURCEDATE date yes UK only paperless mandates DDI source date.
SENDPMINSTRUCTION bit Default = 0 UK only Indicates that a paperless mandate instruction should be sent for this record.
PMINSTRUCTIONTOSENDCODE tinyint Default = 0 UK only indicates the paperless mandate instruction that should be sent for this record.
PMINSTRUCTIONTOSEND nvarchar(6) (Computed) yes CASE [PMINSTRUCTIONTOSENDCODE] WHEN 0 THEN N'' WHEN 1 THEN N'New' WHEN 2 THEN N'Cancel' WHEN 3 THEN N'Set-up' END Provides a translation for the 'PMINSTRUCTIONTOSENDCODE' field.
PMINSTRUCTIONDATE_NEW date yes UK only indicates the date that a new paperless mandate instruction was sent for this record.
PMINSTRUCTIONDATE_CANCEL date yes UK only indicates the date that a cancel paperless mandate instruction was sent for this record.
PMINSTRUCTIONDATE_SETUP date yes UK only indicates the date that a set-up paperless mandate instruction was sent for this record.
PMADVANCENOTICESENTDATE date yes UK only indicates the date that a paperless mandate advance notice was sent to the constituent for this record.

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier REVENUESCHEDULE.ID Primary Key.
CONSTITUENTACCOUNTID uniqueidentifier yes CONSTITUENTACCOUNT.ID FK to CONSTITUENTACCOUNT
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
DDISOURCECODEID uniqueidentifier yes DDISOURCECODE.ID UK only paperless mandates DDI source.
SEPAMANDATEID uniqueidentifier yes SEPAMANDATE.ID

Indexes

Index Name Fields Unique Primary Clustered
IX_REVENUESCHEDULEDIRECTDEBITPAYMENT_DATEADDED DATEADDED yes
IX_REVENUESCHEDULEDIRECTDEBITPAYMENT_DATECHANGED DATECHANGED
PK_REVENUESCHEDULEDIRECTDEBITPAYMENT ID yes yes

Triggers

Trigger Name Description
TR_REVENUESCHEDULEDIRECTDEBITPAYMENT_AUDIT_UPDATE
TR_REVENUESCHEDULEDIRECTDEBITPAYMENT_AUDIT_DELETE