USP_DATAFORMTEMPLATE_VIEW_CONSITUENTREVENUEHISTORYEXPANDEDWRITEOFFVIEW

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN
@CURRENTAPPUSERID uniqueidentifier IN
@DATALOADED bit INOUT
@CAMPAIGNS nvarchar(max) INOUT
@APPEAL nvarchar(100) INOUT
@REVENUECATEGORIES nvarchar(max) INOUT
@NAMINGOPPORTUNITIES nvarchar(max) INOUT
@TRIBUTES nvarchar(max) INOUT
@GIVENANONYMOUSLY bit INOUT
@ACKNOWLEDGEMENTDATE datetime INOUT
@SITES nvarchar(max) INOUT
@OPPORTUNITYCOUNT int INOUT
@OPPORTUNITYID uniqueidentifier INOUT
@OPPORTUNITYNAME nvarchar(300) INOUT
@OPPORTUNITYDATE datetime INOUT
@OPPORTUNITYAMOUNT money INOUT
@APPBASECURRENCY uniqueidentifier INOUT

Definition

Copy

                create procedure dbo.USP_DATAFORMTEMPLATE_VIEW_CONSITUENTREVENUEHISTORYEXPANDEDWRITEOFFVIEW
                (
                    @ID uniqueidentifier,    
                    @CURRENTAPPUSERID uniqueidentifier = null,    
                    @DATALOADED bit = 0 output,
                    @CAMPAIGNS nvarchar(max) = null output,
                    @APPEAL nvarchar(100) = null output,
                    @REVENUECATEGORIES nvarchar(max) = null output,
                    @NAMINGOPPORTUNITIES nvarchar(max) = null output,
                    @TRIBUTES nvarchar(max) = null output,
                    @GIVENANONYMOUSLY bit = null output,
                    @ACKNOWLEDGEMENTDATE datetime = null output,
                    @SITES nvarchar(max) = null output,
                    @OPPORTUNITYCOUNT integer = null output,
                    @OPPORTUNITYID uniqueidentifier = null output,
                    @OPPORTUNITYNAME nvarchar(300) = null output,
                    @OPPORTUNITYDATE datetime = null output,
                    @OPPORTUNITYAMOUNT money = null output,
                    @APPBASECURRENCY uniqueidentifier = null output
                )
                as
                set nocount on;

                /*JamesWill WI166057 2011-07-27 The datalist which uses this form was originally designed to pass the revenue ID into this form for write-off rows.
                    There are some rendering issues with that (where several columns in the row all point to the revenue ID) where the renderer gets confused about 
                    which rows are parents and which are children. So I've changed it to pass in write-off IDs instead. So, if @ID is a write-off ID, this statement
                    will convert it into its revenue ID. If it's already a revenue ID, no rows will be returned and @ID will be unmodified. */
                /*JamesWill WI180444 2012-01-11 Writeoffs can be stored in a table other than WRITEOFF */
                select top 1 @ID = WRITEOFF.REVENUEID from dbo.WRITEOFF where ID = @ID;

                exec dbo.USP_CONSITUENTREVENUEHISTORYEXPANDEDVIEW_GET
                    @ID = @ID,
                    @CURRENTAPPUSERID = @CURRENTAPPUSERID,
                    @DATALOADED = @DATALOADED output,
                    @CAMPAIGNS = @CAMPAIGNS output,
                    @APPEAL = @APPEAL output,
                    @REVENUECATEGORIES = @REVENUECATEGORIES output,
                    @NAMINGOPPORTUNITIES = @NAMINGOPPORTUNITIES output,
                    @TRIBUTES = @TRIBUTES output,
                    @GIVENANONYMOUSLY = @GIVENANONYMOUSLY output,
                    @ACKNOWLEDGEMENTDATE = @ACKNOWLEDGEMENTDATE output,
                    @SITES = @SITES output,
                    @OPPORTUNITYCOUNT = @OPPORTUNITYCOUNT output,
                    @OPPORTUNITYID = @OPPORTUNITYID output,
                    @OPPORTUNITYNAME = @OPPORTUNITYNAME output,
                    @OPPORTUNITYDATE = @OPPORTUNITYDATE output,
                    @OPPORTUNITYAMOUNT = @OPPORTUNITYAMOUNT output,
                    @APPBASECURRENCY = @APPBASECURRENCY output

                return 0;