DROP PROCEDURE IN_AprobarListaPrecioInv
GO
CREATE PROCEDURE IN_AprobarListaPrecioInv
( @SITEID	UD_IDSITE,
  @BATNBR	UD_CORRELATIVOS,
  @USERIDAUTORIZED02 UD_USERID
)
AS
BEGIN
    BEGIN TRAN

    	UPDATE 	IN_PRICELEVELTEM
       	SET 	STKPRICESEND=1,USERIDAUTORIZED02=@USERIDAUTORIZED02,DATETIMEAUTORIZED02=GETDATE()
     	WHERE 	SITEID=@SITEID AND BATNBRPRICELEVELTEM=@BATNBR

    IF (@@error!=0 or @@rowcount=0)
    BEGIN
        ROLLBACK TRAN
        RETURN(1)
    
    END

    COMMIT TRAN

    RETURN(0)
END
