REVENUESCHEDULE

Stores schedule details for a revenue detail record.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
STARTDATE datetime The start date for the schedule.
ENDDATE datetime yes The end date for the schedule.
NUMBEROFINSTALLMENTS int Default = 0 The number of the schedule.
FREQUENCYCODE tinyint Default = 0 Indicates the frequency of the installment.
NEXTTRANSACTIONDATE datetime yes The date when the next payment is due.
STATUSCODE tinyint Default = 0 Indicates the status of a schedule.
SENDPLEDGEREMINDER bit Default = 1 Indicates whether or not to send reminders for a pledge.
ISPENDING bit Default = 0 Indicates if applicable revenue stream has a payment pending in a batch.
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.
SCHEDULESEEDDATE datetime yes Stores the date that is used to calculate installment dates.
STATUS nvarchar(10) (Computed) yes CASE [STATUSCODE] WHEN 0 THEN N'Active' WHEN 1 THEN N'Held' WHEN 2 THEN N'Terminated' WHEN 3 THEN N'Completed' WHEN 4 THEN N'Canceled' WHEN 5 THEN N'Lapsed' END
FREQUENCY nvarchar(18) (Computed) yes CASE [FREQUENCYCODE] WHEN 0 THEN N'Annually' WHEN 1 THEN N'Semi-annually' WHEN 2 THEN N'Quarterly' WHEN 3 THEN N'Monthly' WHEN 4 THEN N'Irregular' WHEN 5 THEN N'Single Installment' WHEN 6 THEN N'Bimonthly' WHEN 7 THEN N'Semi-Monthly' WHEN 8 THEN N'Biweekly' WHEN 9 THEN N'Weekly' WHEN 10 THEN N'Every 4 weeks' END

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier FINANCIALTRANSACTION.ID Primary Key.
PLEDGESUBTYPEID uniqueidentifier yes PLEDGESUBTYPE.LOCALID Indicates the optional subtype for pledges.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CREDITCARDID uniqueidentifier yes CREDITCARD.ID Stores the credit card details.
EVENTID uniqueidentifier yes EVENT.ID Stores the event ID.
LOCALCORPID uniqueidentifier yes LOCALCORP.ID Stores the local corp ID.

Indexes

Index Name Fields Unique Primary Clustered
IX_REVENUESCHEDULE_DATEADDED DATEADDED yes
IX_REVENUESCHEDULE_DATECHANGED DATECHANGED
PK_REVENUESCHEDULE ID yes yes

Triggers

Trigger Name Description
TR_REVENUESCHEDULE_AUDIT_UPDATE
TR_REVENUESCHEDULE_AUDIT_DELETE

Referenced by

Referenced by Field
REVENUESCHEDULEDIRECTDEBITPAYMENT ID
REVENUESCHEDULESTANDINGORDERPAYMENT ID