﻿SET IDENTITY_INSERT [T_CONFIGTIPUS] ON
---------------------------------------
INSERT INTO T_CONFIGTIPUS ([ID], [C_CONFIG], [C_MODUL], [TOROLT], [SERIAL], [LASTCHANGED], [CREATED], [MODIFIER], [CREATOR], [ELOZOTANEVIREKORDID])
VALUES
	(13, 'IsEnabled', 'Nyomtatvany_PedIgHelyettKiall', 'F', 0, GETDATE(), GETDATE(), 0, 0, NULL)
---------------------------------------
SET IDENTITY_INSERT [T_CONFIGTIPUS] OFF

DECLARE @EnvironmentName nvarchar(1000)
	SET @EnvironmentName = (SELECT TOP 1 [Value] FROM dev.EnvironmentInfo WHERE [Key] = 'Kornyezet')

DECLARE @PedIgHelyettKiallIsEnabled nvarchar(255) = CASE WHEN @EnvironmentName IN ('HOI','NSZFH','NSZFH-EMA') THEN 'true' ELSE 'false' END
​
INSERT INTO T_INTEZMENYCONFIG ([C_ERTEK], [C_CONFIGTIPUSID], [C_INTEZMENYID], [TOROLT], [SERIAL], [LASTCHANGED], [CREATED], [MODIFIER], [CREATOR], [ELOZOTANEVIREKORDID])
	SELECT @PedIgHelyettKiallIsEnabled, 13, i.ID, 'F', 0, GETDATE(), GETDATE(), 0, 0, NULL FROM T_INTEZMENY i WHERE i.TOROLT = 'F'