
CREATE PROCEDURE [dbo].[CPJU_Tri_Parar] 	@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('Apagar Triggers Facturacion' AS CHAR(100))

 /*  EJEMPLO  VELEZ
		ALTER TABLE CBTES DISABLE TRIGGER Tri_Cbtes 
	 
		ALTER TABLE CBTES DISABLE TRIGGER CT_Cbtes_Est_Hist 
		
		ALTER TABLE CBTES DISABLE TRIGGER Tri_Cbtes_Suprema  
	    
		ALTER TABLE CBTES DISABLE TRIGGER TRI_Localidades_Stock 
		 
		ALTER TABLE CLIENTES DISABLE 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_Parar] '{"Id_Tipo_Lote":"1"}'