USP_DATAFORMTEMPLATE_EDIT_GLACCOUNTSTRUCTURE
The save procedure used by the edit dataform template "Accounting Element Edit Form".
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the procedure. |
@GLACCOUNTSTRUCTURE | xml | IN | Accounting Elements |
@SEPARATORCODE | tinyint | IN | Separator |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDIT_GLACCOUNTSTRUCTURE (
@CHANGEAGENTID uniqueidentifier = null,
@GLACCOUNTSTRUCTURE xml,
@SEPARATORCODE tinyint
)
as
set nocount on;
if @CHANGEAGENTID is null
exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output
declare @CURRENTDATE datetime
set @CURRENTDATE = getdate()
begin try
exec dbo.USP_ACCOUNTSTRUCTURE_UPDATEFROMXML @GLACCOUNTSTRUCTURE, @CHANGEAGENTID;
update dbo.PDACCOUNTSTRUCTURE set
SEPARATORCODE = @SEPARATORCODE,
CHANGEDBYID = @CHANGEAGENTID,
DATECHANGED = @CURRENTDATE;
end try
begin catch
exec dbo.USP_RAISE_ERROR
return 1
end catch
return 0;