USE DAGAZ	
	IF OBJECT_ID('NET_DEL_VOO') IS NOT NULL
		DROP PROC NET_DEL_VOO

	GO
		CREATE PROC NET_DEL_VOO
	(
	  @pCodVoo INT = NULL
	, @pType VARCHAR(30) = NULL
	, @pStatus INT = NULL

	)
	AS 
		
		BEGIN
			SET NOCOUNT ON
	
IF @pType = 'DELETE'		
				DELETE FROM 
										NET_VOO
							WHERE     
										((CodVoo   = @pCodVoo) );
ELSE
				UPDATE 
										NET_VOO
						SET
													Status =CASE WHEN  Status  = 1 THEN 0 ELSE 1 END
							WHERE     
										((CodVoo = @pCodVoo) );


	SET NOCOUNT OFF 
	END 

