IF  NOT EXISTS (SELECT * FROM sys.objects 
					WHERE object_id = OBJECT_ID(N'[dbo].[EST_NF_ENT_IT_ESTORNO]') 
					AND type in (N'U')) 
begin
CREATE TABLE [dbo].[EST_NF_ENT_IT_ESTORNO](
	[CD_CTR] [int] IDENTITY(1,1) NOT NULL,
	[CD_EMP] [int] NOT NULL,
	[CD_FILIAL] [int] NOT NULL,
	[NR_NF] [int] NOT NULL,
	[CD_FORN] [int] NOT NULL,
	[DT_EMI_NF] [datetime] NOT NULL,
	[DT_ENT] [datetime] NOT NULL,
	[DT_CAD] [datetime] NOT NULL,
	[CD_PROD] [int] NOT NULL,
	[SEQ_ITEM] [int] NOT NULL,
	[DS_PROD] [varchar](150) NOT NULL,
	[VLR_IT] [money] NOT NULL,
	[QT_IT] [money] NOT NULL,
	[VLR_ICMS_IT] [money] NOT NULL,
	[ALIQ_ICMS] [money] NOT NULL,
	[CD_TRIB] [int] NOT NULL,
	[UN] [varchar](50) NOT NULL,
	[PERC_IPI] [money] NOT NULL,
	[VLR_PRC_CUSTO] [money] NOT NULL,
	[VLR_BASE_ICMS] [money] NOT NULL,
	[VLR_ICMS_SUBS] [money] NOT NULL,
	[VLR_BASE_SUBS] [money] NOT NULL,
	[VLR_PRC_CUSTO_ANT] [money] NOT NULL,
	[CD_NT_OP] [int] NOT NULL,
	[VLR_IPI] [money] NOT NULL,
	[PERC_DESC] [money] NOT NULL,
	[VLR_DESC] [money] NOT NULL,
	[VLR_ISENTO] [money] NOT NULL,
	[VLR_OUTROS] [money] NOT NULL,
	[VLR_TOT_IT] [money] NOT NULL,
	[PERC_IVA] [money] NOT NULL,
	[QT_EMB] [money] NOT NULL,
	[VLR_FRETE_IT] [money] NOT NULL,
	[PIS_COFINS] [int] NOT NULL,
	[PERC_DESC_FINAN] [money] NOT NULL,
	[PERC_REDU_BASE_SUBS] [money] NOT NULL,
	[PERC_REDU_BASE_ICMS] [money] NOT NULL,
	[VLR_PROD_FRETE] [money] NOT NULL,
	[LISTA_PROD] [int] NOT NULL,
	[VLR_BASE_PIS] [money] NOT NULL,
	[VLR_PIS] [money] NOT NULL,
	[PERC_ALIQ_PIS] [money] NOT NULL,
	[VLR_BASE_COFINS] [money] NOT NULL,
	[VLR_COFINS] [money] NOT NULL,
	[PERC_ALIQ_COFINS] [money] NOT NULL,
	[VLR_BASE_ICMS_RET] [money] NOT NULL,
	[VLR_ICMS_RET] [money] NOT NULL,
	[VLR_OUTRAS_DESPESAS] [money] NOT NULL,
	[VLR_PROD_PMC] [money] NOT NULL,
	[CD_SIT_OPERA_SIMPLES_NACIO] [int] NOT NULL,
	[MODALI_BASE_ICMS_SUBST] [int] NOT NULL,
	[MODALI_BASE_ICMS] [int] NOT NULL,
	[VLR_CRED_BASE_SN] [money] NOT NULL,
	[VLR_CRED_ICMS_SN] [money] NOT NULL,
	[PIS_COFINS_RECALCULADO] [int] NOT NULL,
	[CST_PIS] [int] NOT NULL,
	[CST_COFINS] [int] NOT NULL,
	[VLR_IMPOSTO_REA] [money] NOT NULL,
	[PERC_DESC_COMERCIAL] [money] NOT NULL,
	[ALIQ_ICMS_INTERNO] [money] NOT NULL,
	[TP_PROD] [int] NOT NULL,
	[CD_USU_LIBEROU_VALIDADE_LOTE] [int] NOT NULL,
	[FLAG_N_GERAR_DAR] [int] NOT NULL,
	[TIPO_TRIBUTACAO_PIS_COFINS] [int] NOT NULL,
	[VLR_CUSTO_MD] [money] NOT NULL,
	[FLAG_EXCECAO_PIS_COFINS] [int] NOT NULL,
	[SIGLA_EXCECAO_PIS_COFINS_excluir] [int] NOT NULL,
	[SIGLA_EXCECAO_PIS_COFINS] [varchar](50) NOT NULL,
	[VLR_CUSTO_ANT_RECALC] [money] NOT NULL,
	[XPED_IT] [varchar](15) NOT NULL,
	[N_ITEM_PED] [int] NOT NULL,
	[FLAG_PROD_CESTA_BASICA] [int] NOT NULL,
	[VLR_DESC_FINAN] [money] NOT NULL,
	[VLR_CUSTO_GER] [money] NOT NULL,
	[VLR_CUSTO_GERENCIAL_TRANSF] [money] NOT NULL,
	[FLAG_ICMS_RETIDO_CALCULADO] [int] NOT NULL,
	[VLR_BASE_ICMS_OP] [money] NOT NULL,
	[VLR_ICMS_OP] [money] NOT NULL,
	[VLR_CUSTO_SEM_ST] [money] NOT NULL,
	[PRZ_DESC_FIN] [int] NOT NULL,
	[PERC_ICMS_OP] [money] NOT NULL,
	[PERC_IVA_RET] [money] NOT NULL,
	[PERC_ICMS_RET] [money] NOT NULL,
	[VLR_RESSARCIMENTO_ICMS] [money] NOT NULL,
	[IND_TOTAL] [int] NOT NULL,
	[VLR_CUSTO_ACERTO] [money] NOT NULL,
	[CD_USU] [int] NOT NULL,
 CONSTRAINT [PK_EST_NF_ENT_IT_ESTORNO] PRIMARY KEY CLUSTERED 
(
	[CD_CTR] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_CD_EMP]  DEFAULT ((0)) FOR [CD_EMP]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_CD_FILIAL]  DEFAULT ((0)) FOR [CD_FILIAL]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_Table_1_CD_NF_1]  DEFAULT ((0)) FOR [NR_NF]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_CD_FORN]  DEFAULT ((0)) FOR [CD_FORN]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_DT_CAD]  DEFAULT (getdate()) FOR [DT_CAD]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_CD_PROD]  DEFAULT ((0)) FOR [CD_PROD]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_SEQ_ITEM]  DEFAULT ((0)) FOR [SEQ_ITEM]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_DS_PROD]  DEFAULT ('') FOR [DS_PROD]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_IT]  DEFAULT ((0)) FOR [VLR_IT]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_QT_IT]  DEFAULT ((0)) FOR [QT_IT]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_ICMS_IT]  DEFAULT ((0)) FOR [VLR_ICMS_IT]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_ALIQ_ICMS]  DEFAULT ((0)) FOR [ALIQ_ICMS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_CD_TRIB]  DEFAULT ((0)) FOR [CD_TRIB]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_UN]  DEFAULT ('') FOR [UN]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PERC_IPI]  DEFAULT ((0)) FOR [PERC_IPI]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_PRC_CUSTO]  DEFAULT ((0)) FOR [VLR_PRC_CUSTO]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_BASE_ICMS]  DEFAULT ((0)) FOR [VLR_BASE_ICMS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_ICMS_SUBS]  DEFAULT ((0)) FOR [VLR_ICMS_SUBS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_BASE_SUBS]  DEFAULT ((0)) FOR [VLR_BASE_SUBS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_PRC_CUSTO_ANT]  DEFAULT ((0)) FOR [VLR_PRC_CUSTO_ANT]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_CD_NT_OP]  DEFAULT ((0)) FOR [CD_NT_OP]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_IPI]  DEFAULT ((0)) FOR [VLR_IPI]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PERC_DESC]  DEFAULT ((0)) FOR [PERC_DESC]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_DESC]  DEFAULT ((0)) FOR [VLR_DESC]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_ISENTO]  DEFAULT ((0)) FOR [VLR_ISENTO]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_OUTROS]  DEFAULT ((0)) FOR [VLR_OUTROS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_TOT_IT]  DEFAULT ((0)) FOR [VLR_TOT_IT]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PERC_IVA]  DEFAULT ((0)) FOR [PERC_IVA]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_QT_EMB]  DEFAULT ((0)) FOR [QT_EMB]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_FRETE_IT]  DEFAULT ((0)) FOR [VLR_FRETE_IT]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PIS_COFINS]  DEFAULT ((0)) FOR [PIS_COFINS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PERC_DESC_FINAN]  DEFAULT ((0)) FOR [PERC_DESC_FINAN]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PERC_REDU_BASE_SUBS]  DEFAULT ((0)) FOR [PERC_REDU_BASE_SUBS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PERC_REDU_BASE_ICMS]  DEFAULT ((0)) FOR [PERC_REDU_BASE_ICMS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_PROD_FRETE]  DEFAULT ((0)) FOR [VLR_PROD_FRETE]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_LISTA_PROD]  DEFAULT ((0)) FOR [LISTA_PROD]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_BASE_PIS]  DEFAULT ((0)) FOR [VLR_BASE_PIS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_PIS]  DEFAULT ((0)) FOR [VLR_PIS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PERC_ALIQ_PIS]  DEFAULT ((0)) FOR [PERC_ALIQ_PIS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_BASE_COFINS]  DEFAULT ((0)) FOR [VLR_BASE_COFINS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_COFINS]  DEFAULT ((0)) FOR [VLR_COFINS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PERC_ALIQ_COFINS]  DEFAULT ((0)) FOR [PERC_ALIQ_COFINS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_BASE_ICMS_RET]  DEFAULT ((0)) FOR [VLR_BASE_ICMS_RET]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_ICMS_RET]  DEFAULT ((0)) FOR [VLR_ICMS_RET]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_OUTRAS_DESPESAS]  DEFAULT ((0)) FOR [VLR_OUTRAS_DESPESAS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_PROD_PMC]  DEFAULT ((0)) FOR [VLR_PROD_PMC]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_CD_SIT_OPERA_SIMPLES_NACIO]  DEFAULT ((0)) FOR [CD_SIT_OPERA_SIMPLES_NACIO]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_MODALI_BASE_ICMS_SUBST]  DEFAULT ((0)) FOR [MODALI_BASE_ICMS_SUBST]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_MODALI_BASE_ICMS]  DEFAULT ((0)) FOR [MODALI_BASE_ICMS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_CRED_BASE_SN]  DEFAULT ((0)) FOR [VLR_CRED_BASE_SN]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_CRED_ICMS_SN]  DEFAULT ((0)) FOR [VLR_CRED_ICMS_SN]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PIS_COFINS_RECALCULADO]  DEFAULT ((0)) FOR [PIS_COFINS_RECALCULADO]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_CST_PIS]  DEFAULT ((0)) FOR [CST_PIS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_CST_COFINS]  DEFAULT ((0)) FOR [CST_COFINS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_IMPOSTO_REA]  DEFAULT ((0)) FOR [VLR_IMPOSTO_REA]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PERC_DESC_COMERCIAL]  DEFAULT ((0)) FOR [PERC_DESC_COMERCIAL]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_ALIQ_ICMS_INTERNO]  DEFAULT ((0)) FOR [ALIQ_ICMS_INTERNO]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_TP_PROD]  DEFAULT ((0)) FOR [TP_PROD]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_CD_USU_LIBEROU_VALIDADE_LOTE]  DEFAULT ((0)) FOR [CD_USU_LIBEROU_VALIDADE_LOTE]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_FLAG_N_GERAR_DAR]  DEFAULT ((0)) FOR [FLAG_N_GERAR_DAR]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_TIPO_TRIBUTACAO_PIS_COFINS]  DEFAULT ((0)) FOR [TIPO_TRIBUTACAO_PIS_COFINS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_CUSTO_MD]  DEFAULT ((0)) FOR [VLR_CUSTO_MD]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_FLAG_EXCECAO_PIS_COFINS]  DEFAULT ((0)) FOR [FLAG_EXCECAO_PIS_COFINS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_SIGLA_EXCECAO_PIS_COFINS_excluir]  DEFAULT ((0)) FOR [SIGLA_EXCECAO_PIS_COFINS_excluir]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_SIGLA_EXCECAO_PIS_COFINS]  DEFAULT ('') FOR [SIGLA_EXCECAO_PIS_COFINS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_CUSTO_ANT_RECALC]  DEFAULT ((0)) FOR [VLR_CUSTO_ANT_RECALC]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_XPED_IT]  DEFAULT ('') FOR [XPED_IT]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_N_ITEM_PED]  DEFAULT ((0)) FOR [N_ITEM_PED]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_FLAG_PROD_CESTA_BASICA]  DEFAULT ((0)) FOR [FLAG_PROD_CESTA_BASICA]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_CUSTO_GERENCIAL_TRANSF]  DEFAULT ((0)) FOR [VLR_CUSTO_GERENCIAL_TRANSF]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_FLAG_ICMS_RETIDO_CALCULADO]  DEFAULT ((0)) FOR [FLAG_ICMS_RETIDO_CALCULADO]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_BASE_ICMS_OP]  DEFAULT ((0)) FOR [VLR_BASE_ICMS_OP]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_ICMS_OP]  DEFAULT ((0)) FOR [VLR_ICMS_OP]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_CUSTO_SEM_ST]  DEFAULT ((0)) FOR [VLR_CUSTO_SEM_ST]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PRZ_DESC_FIN]  DEFAULT ((0)) FOR [PRZ_DESC_FIN]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PERC_ICMS_OP]  DEFAULT ((0)) FOR [PERC_ICMS_OP]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PERC_IVA_RET]  DEFAULT ((0)) FOR [PERC_IVA_RET]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_PERC_ICMS_RET]  DEFAULT ((0)) FOR [PERC_ICMS_RET]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_RESSARCIMENTO_ICMS]  DEFAULT ((0)) FOR [VLR_RESSARCIMENTO_ICMS]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_IND_TOTAL]  DEFAULT ((1)) FOR [IND_TOTAL]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_VLR_CUSTO_ACERTO]  DEFAULT ((0)) FOR [VLR_CUSTO_ACERTO]

ALTER TABLE [dbo].[EST_NF_ENT_IT_ESTORNO] ADD  CONSTRAINT [DF_EST_NF_ENT_IT_ESTORNO_CD_USU]  DEFAULT ((0)) FOR [CD_USU]
end

