USP_RECURRINGGIFT_SKIPPROMPT
Provides the prompt for the "Transaction: Skip" record operation.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | Represents information to be displayed in the record operation prompt. |
@PROMPT | nvarchar(1024) | INOUT |
Definition
Copy
CREATE procedure dbo.USP_RECURRINGGIFT_SKIPPROMPT
(
@ID uniqueidentifier,
@PROMPT nvarchar(1024) output
)
as
set nocount on;
declare @ENDDATE datetime;
declare @NEXTTRANSACTIONDATE datetime;
begin try
if exists (select RD.ID
from dbo.REVENUE RD
inner join dbo.REVENUESCHEDULE RS on RD.ID = RS.ID
where RD.ID = @ID
and dbo.[UFN_REVENUE_GETNEXTTRANSACTIONDATE_BYID_1_1](@ID, NEXTTRANSACTIONDATE) > RS.ENDDATE)
set @PROMPT = 'Are you sure you want to skip the last transaction? Doing so will change the recurring gift status to completed.'
else
set @PROMPT = 'Are you sure you want to skip the next transaction?'
end try
begin catch
exec dbo.USP_RAISE_ERROR;
return 1;
end catch
return 0;