UFN_PDACCOUNT_GETMEMBERSHIPLEVEL
Returns Membership Level ID for transaction being generated.
Return
| Return Type |
|---|
| uniqueidentifier |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @REVENUESPLITID | uniqueidentifier | IN | |
| @REVENUETRANSACTIONTYPECODE | tinyint | IN | |
| @APPLICATIONCODE | tinyint | IN | |
| @PAYMENTMETHODCODE | tinyint | IN | |
| @DESIGNATIONID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_PDACCOUNT_GETMEMBERSHIPLEVEL
(@REVENUESPLITID as uniqueidentifier,
@REVENUETRANSACTIONTYPECODE as tinyint,
@APPLICATIONCODE tinyint,
@PAYMENTMETHODCODE as tinyint,
@DESIGNATIONID as uniqueidentifier) returns uniqueidentifier
As
begin
declare @RESULT as uniqueidentifier
select @RESULT = MEMBERSHIPLEVELID from dbo.MEMBERSHIPTRANSACTION
where REVENUESPLITID = @REVENUESPLITID;
if @APPLICATIONCODE = 10 and @RESULT is null -- order payment
begin
select @RESULT = MEMBERSHIPLEVELID from dbo.REVENUESPLITORDER
where REVENUESPLITORDER.ID = @REVENUESPLITID;
end
return @RESULT
end