USP_TAXID_MARKINACTIVE
Executes the "Tax ID: Mark inactive" 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_TAXID_MARKINACTIVE
(
@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.TAXID SET STATUSCODE=0, CHANGEDBYID=@CHANGEAGENTID, DATECHANGED=@CURRENTDATE WHERE ID=@ID AND STATUSCODE<>0
return 0;
end