IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'FLAG_DEDUZ_ICMS_ST_BASE_PIS_COFINS_SAIDA' AND OBJECT_ID = OBJECT_ID('GLB_NT_OP'))
BEGIN
	ALTER TABLE GLB_NT_OP ADD FLAG_DEDUZ_ICMS_ST_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0
END

IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'FLAG_DEDUZ_ICMS_ST_DARE_BASE_PIS_COFINS_SAIDA' AND OBJECT_ID = OBJECT_ID('GLB_NT_OP'))
BEGIN
	ALTER TABLE GLB_NT_OP ADD FLAG_DEDUZ_ICMS_ST_DARE_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0
END

IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'FLAG_DEDUZ_ICMS_RET_BASE_PIS_COFINS_SAIDA' AND OBJECT_ID = OBJECT_ID('GLB_NT_OP'))
BEGIN
	ALTER TABLE GLB_NT_OP ADD FLAG_DEDUZ_ICMS_RET_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0
END

IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'FLAG_DEDUZ_FCP_BASE_PIS_COFINS_SAIDA' AND OBJECT_ID = OBJECT_ID('GLB_NT_OP'))
BEGIN
	ALTER TABLE GLB_NT_OP ADD FLAG_DEDUZ_FCP_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0
END

IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'FLAG_DEDUZ_FCP_ST_BASE_PIS_COFINS_SAIDA' AND OBJECT_ID = OBJECT_ID('GLB_NT_OP'))
BEGIN
	ALTER TABLE GLB_NT_OP ADD FLAG_DEDUZ_FCP_ST_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0
END

IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'FLAG_DEDUZ_FCP_RET_BASE_PIS_COFINS_SAIDA' AND OBJECT_ID = OBJECT_ID('GLB_NT_OP'))
BEGIN
	ALTER TABLE GLB_NT_OP ADD FLAG_DEDUZ_FCP_RET_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0
END

IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'FLAG_DEDUZ_ICMS_EFET_BASE_PIS_COFINS_SAIDA' AND OBJECT_ID = OBJECT_ID('GLB_NT_OP'))
BEGIN
	ALTER TABLE GLB_NT_OP ADD FLAG_DEDUZ_ICMS_EFET_BASE_PIS_COFINS_SAIDA TINYINT NULL DEFAULT 0
END