USP_DATALIST_GIFTAIDDISQUALIFICATIONSDECLINESGIFTAID
Datalist that shows which designations for pledges and recurring gifts decline Gift Aid.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@REVENUEID | uniqueidentifier | IN | Input parameter indicating the context ID for the data list. |
Definition
Copy
CREATE procedure dbo.USP_DATALIST_GIFTAIDDISQUALIFICATIONSDECLINESGIFTAID
(
@REVENUEID uniqueidentifier
)
as
set nocount on
select DESIGNATION.NAME
from dbo.FINANCIALTRANSACTIONLINEITEM RS
inner join dbo.REVENUESPLIT_EXT on REVENUESPLIT_EXT.ID = RS.ID
inner join dbo.DESIGNATION on REVENUESPLIT_EXT.DESIGNATIONID = DESIGNATION.ID
inner join dbo.REVENUESPLITGIFTAID RSGA on RS.ID = RSGA.ID
where RS.FINANCIALTRANSACTIONID = @REVENUEID and RSGA.DECLINESGIFTAID = 1
and RS.DELETEDON is null AND RS.TYPECODE <> 1;