REVENUESPLITGIFTAID

Stores gift aid information for each revenue split.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
DECLINESGIFTAID bit Default = 0
TAXCLAIMNUMBER nvarchar(10) Default = '' Tax Claim Number
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.
RULES_STATUS bit Default = 0 If revenuesplit is disqualified based on rules
ATTRIBUTES_STATUS bit Default = 0 If revenuesplit is disqualified based on attributes
BASETAXCLAIMAMOUNT money Default = 0 Base Tax Claim Amount
TRANSITIONALTAXCLAIMAMOUNT money Default = 0 Transitional Tax Claim Amount
INCLUDETRANSITIONALAMOUNTCODE tinyint Default = 0 Indicates whether transitional amount is included in TAXCLAIMAMOUNT.
ISCOVENANT bit Default = 0 If revenuesplit is a covenant
CHARITYCLAIMREFERENCENUMBER nvarchar(20) Default = '' The Charity Claim Reference Number under which this application was claimed.
INCLUDETRANSITIONALAMOUNT nvarchar(48) (Computed) yes CASE [INCLUDETRANSITIONALAMOUNTCODE] WHEN 0 THEN N'Calculate whether to include in tax claim amount' WHEN 1 THEN N'Include in tax claim amount' WHEN 2 THEN N'Exclude from tax claim amount' END Provides a translation for the 'INCLUDETRANSITIONALAMOUNTCODE' field.
ISSPONSORSHIP bit Default = 0 If revenuesplit is a gift aid sponsorship
CLAIMEDASSPONSORSHIP bit Default = 0 If revenuesplit was claimed on an R68 as a sponsorship
TRANSACTIONBASETAXCLAIMAMOUNT money Default = 0 The amount of the Gift Aid revenue split in transaction currency.
TRANSACTIONTRANSITIONALTAXCLAIMAMOUNT money Default = 0 The amount of the transitional tax claim in transaction currency.
ORGANIZATIONBASETAXCLAIMAMOUNT money Default = 0 The amount of the tax claim in organization currency.
ORGANIZATIONTRANSITIONALTAXCLAIMAMOUNT money Default = 0 The amount of the transitional tax claim in organization currency.
BASERATE decimal(20, 4) yes Default = 0
TRANSITIONALRATE decimal(20, 4) yes Default = 0
RATE decimal(21, 4) (Computed) yes BASERATE + TRANSITIONALRATE
TAXCLAIMAMOUNT money (Computed) yes case when TRANSITIONALTAXCLAIMAMOUNT = 0 then BASETAXCLAIMAMOUNT when dbo.UFN_REVENUESPLITGIFTAID_TRANSITIONALREFLIEFEXPIRED(ID, INCLUDETRANSITIONALAMOUNTCODE) = 0 then BASETAXCLAIMAMOUNT + TRANSITIONALTAXCLAIMAMOUNT else BASETAXCLAIMAMOUNT end
TRANSACTIONTAXCLAIMAMOUNT money (Computed) yes case when TRANSACTIONTRANSITIONALTAXCLAIMAMOUNT = 0 then TRANSACTIONBASETAXCLAIMAMOUNT when dbo.UFN_REVENUESPLITGIFTAID_TRANSITIONALREFLIEFEXPIRED(ID, INCLUDETRANSITIONALAMOUNTCODE) = 0 then TRANSACTIONBASETAXCLAIMAMOUNT + TRANSACTIONTRANSITIONALTAXCLAIMAMOUNT else TRANSACTIONBASETAXCLAIMAMOUNT end
ORGANIZATIONTAXCLAIMAMOUNT money (Computed) yes case when ORGANIZATIONTRANSITIONALTAXCLAIMAMOUNT = 0 then ORGANIZATIONBASETAXCLAIMAMOUNT when dbo.UFN_REVENUESPLITGIFTAID_TRANSITIONALREFLIEFEXPIRED(ID, INCLUDETRANSITIONALAMOUNTCODE) = 0 then ORGANIZATIONBASETAXCLAIMAMOUNT + ORGANIZATIONTRANSITIONALTAXCLAIMAMOUNT else ORGANIZATIONBASETAXCLAIMAMOUNT end

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier FINANCIALTRANSACTIONLINEITEM.ID Primary Key.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
PENDINGR68STATUSID uniqueidentifier yes BUSINESSPROCESSSTATUS.ID The business process status id for the R68 process which has an un-committed claim for this revenue application.
TRANSACTIONCURRENCYID uniqueidentifier yes CURRENCY.ID The transaction currency associated with this revenue.
BASECURRENCYID uniqueidentifier yes CURRENCY.ID The base currency associated with this revenue.
BASEEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to convert from transaction amount to amount.
ORGANIZATIONEXCHANGERATEID uniqueidentifier yes CURRENCYEXCHANGERATE.ID The exchange rate used to convert to organization amount.

Indexes

Index Name Fields Unique Primary Clustered
IX_REVENUESPLITGIFTAID_BASECURRENCYID BASECURRENCYID
IX_REVENUESPLITGIFTAID_BASEEXCHANGERATEID BASEEXCHANGERATEID
IX_REVENUESPLITGIFTAID_CHARITYCLAIMREFERENCENUMBER CHARITYCLAIMREFERENCENUMBER
IX_REVENUESPLITGIFTAID_DATEADDED DATEADDED yes
IX_REVENUESPLITGIFTAID_DATECHANGED DATECHANGED
IX_REVENUESPLITGIFTAID_ID ID
IX_REVENUESPLITGIFTAID_ORGANIZATIONEXCHANGERATEID ORGANIZATIONEXCHANGERATEID
IX_REVENUESPLITGIFTAID_PENDINGR68STATUSID PENDINGR68STATUSID
IX_REVENUESPLITGIFTAID_TAXCLAIMNUMBER TAXCLAIMNUMBER
IX_REVENUESPLITGIFTAID_TRANSACTIONCURRENCYID TRANSACTIONCURRENCYID
PK_REVENUESPLITGIFTAID ID yes yes

Triggers

Trigger Name Description
TR_REVENUESPLITGIFTAID_AUDIT_UPDATE
TR_REVENUESPLITGIFTAID_AUDIT_DELETE
TR_REVENUESPLITGIFTAID_INSERTUPDATE_CURRENCY
TR_REVENUESPLITGIFTAID_D

Referenced by

Referenced by Field
REVENUESPLITGIFTAIDPOSTED ID