UFN_REVENUE_GENERATEGLACCOUNT_STANDARD_3

Generates GL Account Code and account from the account code mappings defined in the system.

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@REVENUESPLITID uniqueidentifier IN
@REVENUETRANSACTIONTYPECODE tinyint IN
@REVENUESPLITTYPECODE tinyint IN
@APPLICATIONCODE tinyint IN
@PAYMENTMETHODCODE tinyint IN
@DESIGNATIONID uniqueidentifier IN

Definition

Copy


CREATE function dbo.UFN_REVENUE_GENERATEGLACCOUNT_STANDARD_3(@REVENUESPLITID uniqueidentifier, @REVENUETRANSACTIONTYPECODE tinyint, @REVENUESPLITTYPECODE tinyint, @APPLICATIONCODE tinyint, @PAYMENTMETHODCODE tinyint, @DESIGNATIONID uniqueidentifier)
returns @AccountNumbers table (AccountString nvarchar(100), ProjectCode varchar(255), TransactionTypeCode tinyint, AccountID uniqueidentifier, ErrorMessage varchar(max), MappedValues xml)
as
begin

declare @REVENUEID uniqueidentifier;
select @REVENUEID = FINANCIALTRANSACTIONLINEITEM.FINANCIALTRANSACTIONID
from dbo.FINANCIALTRANSACTIONLINEITEM
where FINANCIALTRANSACTIONLINEITEM.ID = @REVENUESPLITID;

-- Call the new version which can generate from different sources, the source for the old version is always the revenue tables.

insert into @AccountNumbers (AccountString, ProjectCode, TransactionTypeCode, AccountID ,ErrorMessage, MappedValues)
select AccountString, ProjectCode, TransactionTypeCode, AccountID ,ErrorMessage, MappedValues 
from dbo.UFN_REVENUE_GENERATEGLACCOUNT_STANDARD_4(@REVENUEID, @REVENUESPLITID , 0, @REVENUETRANSACTIONTYPECODE, @REVENUESPLITTYPECODE, @APPLICATIONCODE, @PAYMENTMETHODCODE, @DESIGNATIONID, null

return 
end