BATCHREVENUEADDITIONALAPPLICATIONS

Stores additional applications info for batch

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
TYPECODE tinyint Default = 0 The type of application.
APPLIED money Default = 0
DECLINESGIFTAID bit Default = 0 Indicates whether Gift Aid is declined for this application.
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.
TYPE nvarchar(31) (Computed) yes CASE [TYPECODE] WHEN 0 THEN N'Donation' WHEN 1 THEN N'Other' WHEN 2 THEN N'Unapplied matching gift payment' WHEN 3 THEN N'Additional sponsorship donation' END Provides a translation for the 'TYPECODE' field.
SPONSORSHIPID uniqueidentifier yes FK to SPONSORSHIP
ISGIFTAIDSPONSORSHIP bit Default = 0 Indicates whether this application is a Gift Aid sponsorship.
REVENUESPLITID uniqueidentifier yes Split id for revenue update batch.
OVERRIDEBUSINESSUNITS bit Default = 0 Boolean value to tell whether business units attached to the application/payment were overridden

Foreign Keys

Foreign Key Field Type Null Notes Description
BATCHREVENUEID uniqueidentifier BATCHREVENUE.ID FK to BATCHREVENUE
DESIGNATIONID uniqueidentifier DESIGNATION.ID FK to DESIGNATION
OTHERTYPECODEID uniqueidentifier yes REVENUEOTHERTYPECODE.ID FK to REVENUEOTHERTYPECODE
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
OPPORTUNITYID uniqueidentifier yes OPPORTUNITY.ID FK to OPPORTUNITY
REVENUESPLITBUSINESSUNITOVERRIDECODEID uniqueidentifier yes REVENUESPLITBUSINESSUNITOVERRIDECODE.ID Stores the reason for overriding business units on this revenue split record.
GLREVENUECATEGORYMAPPINGID uniqueidentifier yes GLREVENUECATEGORYMAPPING.ID Foreign key to the GLREVENUECATEGORYMAPPING table.

Indexes

Index Name Fields Unique Primary Clustered
IX_BATCHREVENUEADDITIONALAPPLICATIONS_BATCHREVENUEID BATCHREVENUEID
IX_BATCHREVENUEADDITIONALAPPLICATIONS_DATEADDED DATEADDED yes
IX_BATCHREVENUEADDITIONALAPPLICATIONS_DATECHANGED DATECHANGED
PK_BATCHREVENUEADDITIONALAPPLICATIONS ID yes yes

Triggers

Trigger Name Description
TR_BATCHREVENUEADDITIONALAPPLICATIONS_AUDIT_UPDATE
TR_BATCHREVENUEADDITIONALAPPLICATIONS_AUDIT_DELETE

Referenced by

Referenced by Field
BATCHREVENUEADDITIONALAPPLICATIONBUSINESSUNIT BATCHREVENUEADDITIONALAPPLICATIONID
BATCHREVENUEADDITIONALAPPLICATIONCAMPAIGN BATCHREVENUEADDITIONALAPPLICATIONSID