USP_DATALIST_CONSTITUENTGROUP_GIVINGHISTORY_2
This datalist returns all of a constituent group and its members' gifts.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CONSTITUENTID | uniqueidentifier | IN | Input parameter indicating the context ID for the data list. |
@INCLUDESOFTCREDIT | bit | IN | Include soft credits |
@NUMBERTOSHOWCODE | smallint | IN | Show |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@SITEFILTERMODE | tinyint | IN | Sites |
@SITESSELECTED | xml | IN | |
@SECURITYFEATUREID | uniqueidentifier | IN | Input parameter indicating the ID of the feature to use for site security checking. |
@SECURITYFEATURETYPE | tinyint | IN | Input parameter indicating the type of the feature to use for site security checking. |
@CURRENCYCODE | tinyint | IN | Currency |
Definition
Copy
CREATE procedure dbo.USP_DATALIST_CONSTITUENTGROUP_GIVINGHISTORY_2
(
@CONSTITUENTID uniqueidentifier,
@INCLUDESOFTCREDIT bit = 0,
@NUMBERTOSHOWCODE smallint = 2,
@CURRENTAPPUSERID uniqueidentifier = null,
@SITEFILTERMODE tinyint = 0,
@SITESSELECTED xml = null,
@SECURITYFEATUREID uniqueidentifier = null,
@SECURITYFEATURETYPE tinyint = null,
@CURRENCYCODE tinyint = 2
) as
set nocount on;
declare @GROUPINCLUDESMEMBERGIVING bit;
-- households are always donors and include member giving, other types get looked up
select
@GROUPINCLUDESMEMBERGIVING =
case
when GD.GROUPTYPECODE = 0 then 1
when GD.GROUPTYPECODE = 1 then GT.INCLUDEMEMBERGIVING
end
from dbo.GROUPDATA GD
left join dbo.GROUPTYPE GT on GD.GROUPTYPEID = GT.ID
where GD.ID=@CONSTITUENTID;
exec dbo.USP_CONSTITUENT_GETGIVINGHISTORY_2 @CONSTITUENTID, @INCLUDESOFTCREDIT, @NUMBERTOSHOWCODE, @CURRENTAPPUSERID, @SITEFILTERMODE, @SITESSELECTED, @SECURITYFEATUREID, @SECURITYFEATURETYPE, @GROUPINCLUDESMEMBERGIVING,@CURRENCYCODE;