IF NOT EXISTS (
		SELECT 1
		FROM sys.objects
		WHERE object_id = OBJECT_ID(N'[dbo].[GLB_NT_OP_AUDIT]')
			AND type IN (N'U')
		)
BEGIN
		CREATE TABLE GLB_NT_OP_AUDIT (
		CD_CTR INT IDENTITY(1,1) NOT NULL,
		CD_NT_OP INT NOT NULL,
		DT_CAD DATETIME,
		CD_USU INT NOT NULL,
		FLAG_NAO_DEDUZ_ICMS_BASE_PIS_COFINS TINYINT DEFAULT 0,
		FLAG_DEDUZ_ICMS_ST_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0,
		FLAG_DEDUZ_ICMS_ST_DARE_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0,
		FLAG_DEDUZ_ICMS_RET_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0,
		FLAG_DEDUZ_ICMS_EFET_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0,
		FLAG_DEDUZ_FCP_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0,
		FLAG_DEDUZ_FCP_ST_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0,
		FLAG_DEDUZ_FCP_RET_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0,
		PRIMARY KEY (CD_CTR, CD_NT_OP)
		);
END
