USP_BANKACCOUNTDEPOSIT_UNLOCK

Executes the "Unlock Deposit" record operation.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Input parameter indicating the ID of the record being updated.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the update.

Definition

Copy


CREATE procedure dbo.USP_BANKACCOUNTDEPOSIT_UNLOCK
(
    @ID uniqueidentifier,
    @CHANGEAGENTID uniqueidentifier
)
as begin

        set nocount on;

        declare @CURRENTDATE datetime;

        if @CHANGEAGENTID is null exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output;

    set @CURRENTDATE = getdate();

    UPDATE dbo.BANKACCOUNTDEPOSIT SET STATUSCODE=1, CHANGEDBYID=@CHANGEAGENTID, DATECHANGED=@CURRENTDATE WHERE ID=@ID AND STATUSCODE<>1

    return 0;

end