------------------/*/*/*/-----------------------------------------------------
/*
   _   _   _   _     _   _   _   _   _   _  
  / \ / \ / \ / \   / \ / \ / \ / \ / \ / \ 
 ( I | T | E | C ) ( B | R | A | Z | I | L )
  \_/ \_/ \_/ \_/   \_/ \_/ \_/ \_/ \_/ \_/ 
--MODULO NFE -
--CRIACAO DA TABELA EST_NF_ENT_DANFE_PROVISORIO_DOWNLOAD
--15-08-20014
-- ©WSANTALUZ 1970..2014†
*/
------------------/*/*/*/-----------------------------------------------------

IF NOT EXISTS (
		SELECT
			* 
		FROM 
			sysobjects 
		WHERE 
			NAME = 'EST_NF_ENT_DANFE_PROVISORIO_DOWNLOAD'
            
      )      
	
BEGIN
 CREATE TABLE [dbo].[EST_NF_ENT_DANFE_PROVISORIO_DOWNLOAD] (
  [NR_AUTORIZADOR] varchar(150) COLLATE SQL_Latin1_General_CP1_CI_AS CONSTRAINT [DF_EST_NF_ENT_DANFE_PROVISORIO_DOWNLOAD_NR_AUTORIZADOR] DEFAULT '' NOT NULL,
  [CD_EMP] int NOT NULL,
  [CD_FILIAL] int NOT  NULL,
  [CD_FORN] int NULL,
  [DT_CAD] datetime CONSTRAINT [DF_EST_NF_ENT_DANFE_PROVISORIO_DOWNLOAD_DT_CAD] DEFAULT getdate() NULL,
  [DT_OPERACAO] datetime NULL,
  [DS_ERRO] varchar(max) COLLATE Latin1_General_CI_AS NULL,
  [DS_ORIGEM] varchar(50) COLLATE Latin1_General_CI_AS NULL,
  [STS_IMP] int NULL,
  [MSG_SEFAZ] varchar(max) COLLATE Latin1_General_CI_AS NULL,
  CONSTRAINT [PK_EST_NF_ENT_DANFE_PROVISORIO_DOWNLOAD] PRIMARY KEY CLUSTERED ([NR_AUTORIZADOR])
)


END
