USP_DATAFORMTEMPLATE_ADD_MEMBERSHIPPAYMENT_PRELOAD
The load procedure used by the edit dataform template "Membership Payment Add Data Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@MEMBERS | xml | INOUT | Members |
@CONSTITUENTID | uniqueidentifier | IN | Input parameter indicating the context ID for the record being added. |
@ISADD | bit | INOUT | |
@GIVENBYID | uniqueidentifier | INOUT | Given By |
@TRANSACTIONDATE | datetime | INOUT | Transaction date |
@AMOUNT | money | INOUT | Amount |
@ISPAYMENT | bit | INOUT | |
@STATUSCODE | tinyint | INOUT | Status |
@APPLICATIONCURRENCYID | uniqueidentifier | INOUT | Base currency |
@TRANSACTIONCURRENCYID | uniqueidentifier | INOUT | Transaction currency |
@EXCHANGERATE | decimal(20, 8) | INOUT | Exchange rate |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_MEMBERSHIPPAYMENT_PRELOAD
(
@MEMBERS xml = null output,
@CONSTITUENTID uniqueidentifier,
@ISADD bit = null output,
@GIVENBYID uniqueidentifier = null output,
@TRANSACTIONDATE datetime = null output,
@AMOUNT money = null output,
@ISPAYMENT bit = null output,
@STATUSCODE tinyint = null output,
@APPLICATIONCURRENCYID uniqueidentifier = null output,
@TRANSACTIONCURRENCYID uniqueidentifier = null output,
@EXCHANGERATE decimal(20,8) = null output
)
as
set nocount on;
set @TRANSACTIONDATE = getdate()
declare @ID uniqueidentifier
set @ID = newid()
declare @CARDID uniqueidentifier;
set @CARDID = newid()
set @STATUSCODE = 2;
declare @CONSTITUENTNAME nvarchar(154);
set @CONSTITUENTNAME =
replace(
replace(
replace(
replace(
replace(dbo.UFN_CONSTITUENT_BUILDNAME(@CONSTITUENTID), '&', '&')
, '>', '>')
, '<', '<')
, '''', ''')
, '"', '"')
set @MEMBERS = '<MEMBERS>
<ITEM>
<ID>'+convert(nvarchar(36),@ID)+'</ID>
<CONSTITUENTID>'+convert(nvarchar(36),@CONSTITUENTID)+'</CONSTITUENTID>
<ISPRIMARY>1</ISPRIMARY>
<MEMBERSHIPCARDS>
<ITEM>
<ID>'+convert(nvarchar(36),@CARDID)+'</ID>
<NAMEONCARD>'+@CONSTITUENTNAME+'</NAMEONCARD>
</ITEM>
</MEMBERSHIPCARDS>
<MEMBERSHIPCARDSDISPLAY><card(s)></MEMBERSHIPCARDSDISPLAY>
</ITEM>
</MEMBERS>';
set @ISADD = 0
set @ISPAYMENT = 0
return 0