
CREATE PROCEDURE [dbo].[CPJU_Tri_Prender] 	@pJson VARCHAR(8000)
AS
--VERSION: 03/12/2021
 
Declare @pId_Tipo_Lote    SMALLINT

SET @pId_Tipo_Lote	= ISNULL(CONVERT(INT, dbo.CF_JSON_VALUE(@pJson,'Id_Tipo_Lote')), 0)
DECLARE @Mensaje		  CHAR(100)

IF @pId_Tipo_Lote = 1
   BEGIN 

        SET @Mensaje = CAST('Prender Triggers Facturacion' AS CHAR(100))

 /*  EJEMPLO  VELEZ
		ALTER TABLE CBTES ENABLE TRIGGER Tri_Cbtes 
	 
		ALTER TABLE CBTES ENABLE TRIGGER CT_Cbtes_Est_Hist 
		
		ALTER TABLE CBTES ENABLE TRIGGER Tri_Cbtes_Suprema  
	    
		ALTER TABLE CBTES ENABLE TRIGGER TRI_Localidades_Stock 
		 
		ALTER TABLE CLIENTES ENABLE TRIGGER Tri_Socios  
		
*/	
		 
   END

   SELECT	 0					AS ErrorNumber 
			,0					AS ErrorSeverity  
			,0					AS ErrorState 
			,0					AS ErrorProcedure  
			,0          		AS ErrorLine		
			,@Mensaje			AS ErrorMessage



--- EXEC [dbo].[SPJU_Tri_PRENDER] '{"Id_Tipo_Lote":"1"}'