BATCHREVENUEAPPLICATION

Stores batch information.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
APPLICATIONTYPECODE tinyint Default = 0 Indicates the type of application which was being made.
APPLIED money Default = 0 Indicates the amount to apply to the original revenue item.
WASGENERATED bit Default = 0 Indicates that this application was generated by the generate transaction process.
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.
OVERPAYMENTAPPLICATIONTYPECODE tinyint Default = 255 The destination of an overpayment.
OVERPAYMENTAPPLICATIONTYPE nvarchar(16) (Computed) yes CASE [OVERPAYMENTAPPLICATIONTYPECODE] WHEN 0 THEN N'Pledge balance' WHEN 1 THEN N'Next installment' WHEN 255 THEN N'Not applicable' END Provides a translation for the 'OVERPAYMENTAPPLICATIONTYPECODE' field.
REVENUESPLITID uniqueidentifier yes Split id for revenue update batch.
APPLICATIONTYPE nvarchar(20) (Computed) yes CASE [APPLICATIONTYPECODE] WHEN 0 THEN N'Revenue' WHEN 1 THEN N'EventRegistrant' WHEN 2 THEN N'NewPledge' WHEN 5 THEN N'Membership' WHEN 7 THEN N'MatchingGiftClaims' WHEN 13 THEN N'DonorChallengeClaims' END Provides a translation for the 'APPLICATIONTYPECODE' field.
OVERRIDEBUSINESSUNITS bit Default = 0 Boolean value to tell whether business units attached to the application/payment were overridden
RECEIPTAMOUNT money Default = 0

Foreign Keys

Foreign Key Field Type Null Notes Description
BATCHREVENUEID uniqueidentifier BATCHREVENUE.ID Indicates the batch row this application applies to.
REVENUEID uniqueidentifier yes FINANCIALTRANSACTION.ID Indicates the original revenue item to which a payment is being applied.
REGISTRANTID uniqueidentifier yes REGISTRANT.ID Indicates the original event registrant to which a payment is being applied, if it was an event registrant.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
BATCHREVENUEAPPLICATIONPLEDGEID uniqueidentifier yes BATCHREVENUEAPPLICATIONPLEDGE.ID Indicates the new pledge to which this payment is being applied, if it was created.
BATCHREVENUEAPPLICATIONMEMBERSHIPID uniqueidentifier yes BATCHREVENUEAPPLICATIONMEMBERSHIP.ID Indicates the new membership to which this payment is being applied.
BATCHREVENUEREGISTRANTID uniqueidentifier yes BATCHREVENUEREGISTRANT.ID Indicates the new event registrant to which this payment is being applied, if it was created.
REVENUESPLITBUSINESSUNITOVERRIDECODEID uniqueidentifier yes REVENUESPLITBUSINESSUNITOVERRIDECODE.ID Stores the reason for overriding business units on this revenue split record.

Indexes

Index Name Fields Unique Primary Clustered
IX_BATCHREVENUEAPPLICATION_BATCHREVENUEID BATCHREVENUEID
IX_BATCHREVENUEAPPLICATION_DATEADDED DATEADDED yes
IX_BATCHREVENUEAPPLICATION_DATECHANGED DATECHANGED
IX_BATCHREVENUEAPPLICATION_REVENUEID REVENUEID
PK_BATCHREVENUEAPPLICATION ID yes yes

Triggers

Trigger Name Description
TR_BATCHREVENUEAPPLICATION_AUDIT_UPDATE
TR_BATCHREVENUEAPPLICATION_AUDIT_DELETE

Referenced by

Referenced by Field
BATCHREVENUEAPPLICATIONBUSINESSUNIT BATCHREVENUEAPPLICATIONID