UFN_CONTROLACCOUNT_TOITEMLISTXML

Returns an xml collection of control accounts.

Return

Return Type
xml

Parameters

Parameter Parameter Type Mode Description
@SYSTEMID uniqueidentifier IN

Definition

Copy


CREATE function dbo.UFN_CONTROLACCOUNT_TOITEMLISTXML
(
  @SYSTEMID uniqueidentifier
)
returns xml
as begin
  return 
  (        
    select ID
      ,dbo.UFN_CONTROLACCOUNT_GETDATAELEMENTS_TOITEMLISTXML(ID) 
      ,ALLOWEDIT
      ,ALLOWOTHERSUBSIDIARY
      ,ALLOWJOURNALENTRY
      ,ACCOUNTTYPECODE
    from 
      dbo.CONTROLACCOUNT
    where
      CONTROLACCOUNT.SYSTEMID = @SYSTEMID
    for xml raw('ITEM'),type,elements,root('CONTROLACCOUNTS'),BINARY BASE64
  )
end