UFN_PDACCOUNT_GETPURPOSECATEGORY

Returns purpose category 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_GETPURPOSECATEGORY
(@REVENUESPLITID as uniqueidentifier,
 @REVENUETRANSACTIONTYPECODE as tinyint,
 @APPLICATIONCODE tinyint,
 @PAYMENTMETHODCODE as tinyint,
 @DESIGNATIONID as uniqueidentifier) returns uniqueidentifier
 As 
 begin
    declare @RESULT as uniqueidentifier

    -- REVISIT: There are five designation levels, we are currently pulling level one!

    select @RESULT = T0.DESIGNATIONLEVELCATEGORYCODEID
    from DESIGNATIONLEVEL T0 
    inner join DESIGNATION T1 on T1.DESIGNATIONLEVEL1ID = T0.ID 
    where T1.ID = @DESIGNATIONID 

    return @RESULT

 end