12759 lines
671 KiB
Transact-SQL
12759 lines
671 KiB
Transact-SQL
USE [decomarmolNew]
|
|
GO
|
|
/****** Object: Table [dbo].[vwcomisiones] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vwcomisiones](
|
|
[tipoventas] [char](30) NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[nombre] [char](90) NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[nombrev] [char](50) NULL,
|
|
[apellidov] [char](50) NULL,
|
|
[porc_comisionv] [decimal](12, 4) NULL,
|
|
[sec_vend_a] [smallint] NULL,
|
|
[nombre_a] [char](30) NULL,
|
|
[apellido_a] [char](30) NULL,
|
|
[porc_comisiona] [decimal](12, 4) NULL,
|
|
[tipodocumento] [char](30) NULL,
|
|
[tipo_doc] [char](2) NULL,
|
|
[documento] [int] NULL,
|
|
[valor] [decimal](12, 2) NULL,
|
|
[valor_itbi] [decimal](12, 2) NULL,
|
|
[aplica_a] [int] NULL,
|
|
[fechafactura] [char](10) NULL,
|
|
[fecha] [char](10) NULL,
|
|
[ano] [smallint] NULL,
|
|
[numeromes] [smallint] NULL,
|
|
[mes] [char](30) NULL,
|
|
[valor1] [decimal](12, 2) NULL,
|
|
[valor2] [decimal](12, 2) NULL,
|
|
[valor_orig] [decimal](12, 2) NULL,
|
|
[tasa] [decimal](12, 2) NULL,
|
|
[chitbis] [nchar](2) NULL,
|
|
[porc_valor_a_pagar] [decimal](12, 2) NULL,
|
|
[valor_a_comisionar] [decimal](12, 2) NULL,
|
|
[cotizacion_no] [int] NULL,
|
|
[comision_adicional] [decimal](12, 2) NULL,
|
|
[porc_comision_adicional] [decimal](12, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[viejo1] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[viejo1](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[codn] [smallint] NULL,
|
|
[codgrupo] [smallint] NULL,
|
|
[codtipo] [smallint] NULL,
|
|
[codsec] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00101] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00101](
|
|
[id_devolucion] [smallint] NOT NULL,
|
|
[descripcion] [varchar](100) NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00100] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00100](
|
|
[num_doc] [int] NULL,
|
|
[nombre_contacto] [varchar](100) NULL,
|
|
[posicion_contacto] [varchar](100) NULL,
|
|
[celular_contacto] [varchar](100) NULL,
|
|
[correo_contacto] [varchar](100) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00099] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00099](
|
|
[num_doc] [int] NULL,
|
|
[fecha] [date] NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[vendedor] [varchar](100) NULL,
|
|
[num_emp] [int] NULL,
|
|
[visita_por] [varchar](100) NULL,
|
|
[fecha_cita] [date] NULL,
|
|
[hora_cita] [varchar](50) NULL,
|
|
[lugar_cita] [varchar](100) NULL,
|
|
[confirmada] [varchar](2) NULL,
|
|
[cancelada] [varchar](2) NULL,
|
|
[pospuesta] [varchar](2) NULL,
|
|
[empresa] [varchar](100) NULL,
|
|
[correo_empresa] [varchar](100) NULL,
|
|
[telefono_empresa] [int] NULL,
|
|
[direccion_empresa] [varchar](100) NULL,
|
|
[nombre_cliente] [varchar](100) NULL,
|
|
[arquitecto] [varchar](2) NULL,
|
|
[disenador] [varchar](2) NULL,
|
|
[ingeniero] [varchar](2) NULL,
|
|
[ocupacion] [varchar](100) NULL,
|
|
[masculino] [varchar](2) NULL,
|
|
[femenino] [varchar](2) NULL,
|
|
[fecha_nac] [date] NULL,
|
|
[correo_cliente] [varchar](100) NULL,
|
|
[celular_cliente] [int] NULL,
|
|
[desc_proyecto] [varchar](500) NULL,
|
|
[marcas_productos] [varchar](500) NULL,
|
|
[marcas_productos_orden] [varchar](500) NULL,
|
|
[proyectos_actuales] [varchar](500) NULL,
|
|
[soho] [varchar](2) NULL,
|
|
[velino] [varchar](2) NULL,
|
|
[delta] [varchar](2) NULL,
|
|
[vitra] [varchar](2) NULL,
|
|
[jacizzi] [varchar](2) NULL,
|
|
[laufen] [varchar](2) NULL,
|
|
[carimali] [varchar](2) NULL,
|
|
[mueble_modular] [varchar](2) NULL,
|
|
[neolith] [varchar](2) NULL,
|
|
[techlam] [varchar](2) NULL,
|
|
[caesarstone] [varchar](2) NULL,
|
|
[biticino] [varchar](2) NULL,
|
|
[maestoshield] [varchar](2) NULL,
|
|
[backout] [varchar](2) NULL,
|
|
[permas] [varchar](2) NULL,
|
|
[lube] [varchar](2) NULL,
|
|
[creo] [varchar](2) NULL,
|
|
[cocina_modular] [varchar](2) NULL,
|
|
[close_modular] [varchar](2) NULL,
|
|
[palo_rosa] [varchar](2) NULL,
|
|
[nanogress] [varchar](2) NULL,
|
|
[tendeza] [varchar](2) NULL,
|
|
[apavisa] [varchar](2) NULL,
|
|
[pail] [varchar](2) NULL,
|
|
[pisos_madera] [varchar](2) NULL,
|
|
[puertas] [varchar](2) NULL,
|
|
[laminados] [varchar](2) NULL,
|
|
[giacomino] [varchar](2) NULL,
|
|
[aquapa] [varchar](2) NULL,
|
|
[repolen] [varchar](2) NULL,
|
|
[north_american] [varchar](2) NULL,
|
|
[fila] [varchar](2) NULL,
|
|
[durento] [varchar](2) NULL,
|
|
[laticrete] [varchar](2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00098] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00098](
|
|
[sec_num_doc] [int] NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00097] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00097](
|
|
[factura] [int] NULL,
|
|
[cotizacion_no] [int] NULL,
|
|
[num_oc] [int] NULL,
|
|
[conduce] [int] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](18, 2) NOT NULL,
|
|
[id_kit] [int] NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00096] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00096](
|
|
[fecha] [smalldatetime] NULL,
|
|
[usuario] [nchar](50) NULL,
|
|
[ventas] [nchar](10) NULL,
|
|
[tasa] [decimal](18, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00095] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00095](
|
|
[numero_documento] [int] NULL,
|
|
[cotizacion_no] [int] NULL,
|
|
[fecha_vence] [date] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](12, 5) NULL,
|
|
[vigente] [nchar](10) NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00094] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00094](
|
|
[cotizacion_no] [int] NULL,
|
|
[fecha_registro] [datetime] NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[porc_desc] [decimal](18, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00093] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00093](
|
|
[cotizacion_no] [int] NOT NULL,
|
|
[sec_vend] [int] NOT NULL,
|
|
[nombre_vendedor] [nchar](80) NULL,
|
|
[comision_vendedor] [decimal](18, 2) NULL,
|
|
[comision_adicional] [decimal](18, 2) NULL,
|
|
CONSTRAINT [PK_vetb00093] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cotizacion_no] ASC,
|
|
[sec_vend] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00092] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00092](
|
|
[factura] [int] NULL,
|
|
[num_req] [int] NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](12, 4) NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[sucid] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00091] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00091](
|
|
[ventas] [char](1) NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[precio] [numeric](12, 2) NOT NULL,
|
|
[descripcion] [char](60) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[cod_lista] [smallint] NULL,
|
|
[fecha_inicial] [date] NULL,
|
|
[fecha_final] [date] NULL,
|
|
[idrow] [int] IDENTITY(1,1) NOT NULL,
|
|
[accion] [char](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00090] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00090](
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[porc_comision] [decimal](18, 2) NULL,
|
|
[fecha_termino] [date] NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[estatus] [nchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00088] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00088](
|
|
[cotizacion_no] [int] NOT NULL,
|
|
[fecha_autorizacion] [datetime] NULL,
|
|
[us_autoriza] [nchar](50) NULL,
|
|
[area] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[porc_descuento] [decimal](12, 2) NULL,
|
|
[autoriza] [nchar](3) NULL,
|
|
[porc_desc] [decimal](12, 2) NULL,
|
|
[costo] [decimal](12, 5) NULL,
|
|
CONSTRAINT [PK_vetb00088] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cotizacion_no] ASC,
|
|
[area] ASC,
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00087] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00087](
|
|
[tipo_cliente] [int] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[tipo_negocio_contacto] [int] NULL,
|
|
[contacto] [nchar](60) NULL,
|
|
[puesto] [nchar](60) NULL,
|
|
[puesto1] [nchar](60) NULL,
|
|
[email] [nchar](60) NULL,
|
|
[celular] [nchar](20) NULL,
|
|
[telefono_of] [nchar](20) NULL,
|
|
[telefono_casa] [nchar](20) NULL,
|
|
[id] [smallint] NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[id_crm] [varchar](100) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00086] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00086](
|
|
[cotizacion_no] [int] NULL,
|
|
[porc_negocio] [decimal](12, 2) NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fecha_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fecha_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00085] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00085](
|
|
[cod_cia] [smallint] NULL,
|
|
[cod_lista] [smallint] NULL,
|
|
[descripcion] [nchar](50) NULL,
|
|
[fecha_vigencia] [date] NULL,
|
|
[fecha_inicio] [date] NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00084] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00084](
|
|
[sec_vend] [smallint] NOT NULL,
|
|
[nombre] [char](40) NULL,
|
|
CONSTRAINT [PK_vetb00084] PRIMARY KEY CLUSTERED
|
|
(
|
|
[sec_vend] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00076] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00076](
|
|
[sec_vend] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[porc_vendedor] [decimal](12, 4) NULL,
|
|
[porc_supervisor] [decimal](12, 4) NULL,
|
|
[porc_directo] [decimal](12, 4) NULL,
|
|
[tipo_usuario] [nchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00075] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00075](
|
|
[sec_vend] [smallint] NULL,
|
|
[porc_cobros_a] [decimal](12, 4) NULL,
|
|
[sec_vend_a] [smallint] NULL,
|
|
[porc_cobros] [decimal](12, 4) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00072] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00072](
|
|
[documento] [int] NULL,
|
|
[tipo_doc] [nchar](2) NULL,
|
|
[codigo_dgii] [nchar](20) NULL,
|
|
[ncf] [int] NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00071] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00071](
|
|
[fecha] [smalldatetime] NULL,
|
|
[tipo_ncf] [nchar](80) NULL,
|
|
[tipo_doc] [char](2) NULL,
|
|
[codigo_dgii] [char](14) NULL,
|
|
[ncf_inicial] [smallint] NULL,
|
|
[ncf_final] [int] NULL,
|
|
[disponible] [char](1) NULL,
|
|
[itbis] [nchar](10) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[sucid] [smallint] NULL,
|
|
[fecha_vencimiento] [date] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00061] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00061](
|
|
[ventas] [smallint] NULL,
|
|
[descripcion] [nvarchar](40) NULL,
|
|
[simbolo] [nvarchar](20) NULL,
|
|
[descripcion_moneda] [nchar](20) NULL,
|
|
[defecto] [nchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00060] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00060](
|
|
[ventas] [char](1) NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[paga_itbis] [char](1) NULL,
|
|
[ncf] [nchar](1) NULL,
|
|
[control_creacion_usuario] [nchar](10) NULL,
|
|
[cuenta_no_ventas] [nchar](10) NULL,
|
|
[cuenta_no_prima] [nchar](10) NULL,
|
|
[control_mobile] [nchar](10) NULL,
|
|
[cuenta_no_devolucion] [nchar](10) NULL,
|
|
[cuenta_no_descuento] [nchar](10) NULL,
|
|
[cuenta_no_itbis] [nchar](10) NULL,
|
|
[cuenta_no_ingresos] [nchar](10) NULL,
|
|
[cuenta_no_prima_ingresos] [nchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00053] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00053](
|
|
[cotizacion_no] [int] NOT NULL,
|
|
[us_mod] [nchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00052] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00052](
|
|
[etiqueta] [char](20) NULL,
|
|
[cotizacion_no] [int] NULL,
|
|
[secuencia] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[lado_1] [decimal](12, 5) NULL,
|
|
[lado_2] [decimal](12, 5) NULL,
|
|
[lado_3] [decimal](12, 5) NULL,
|
|
[cantidad] [decimal](12, 5) NULL,
|
|
[medida] [decimal](12, 5) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00051] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00051](
|
|
[cod_cia] [int] NULL,
|
|
[ventas] [char](1) NULL,
|
|
[cotizacion_no] [int] NOT NULL,
|
|
[area] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [int] NULL,
|
|
[cod_tipo] [int] NULL,
|
|
[cod_sec] [int] NULL,
|
|
[descripcion] [nchar](80) NULL,
|
|
[cantidad_1] [decimal](12, 5) NULL,
|
|
[cantidad] [decimal](12, 5) NOT NULL,
|
|
[precio] [decimal](12, 4) NOT NULL,
|
|
[porc_desc] [decimal](8, 2) NULL,
|
|
[nombre_file] [char](50) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](15) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](15) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[foto_producto] [varbinary](max) NULL,
|
|
[descripcion_area] [varchar](50) NULL,
|
|
[id_kit] [int] NULL,
|
|
[cantidad_reservada] [decimal](18, 2) NULL,
|
|
[fecha_vence_reserva] [date] NULL,
|
|
[cotizacion_no_crm] [varchar](100) NULL,
|
|
[secuencia] [int] NULL,
|
|
[fecha_inicio_reserva] [date] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00050] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00050](
|
|
[cod_cia] [int] NULL,
|
|
[ventas] [smallint] NULL,
|
|
[cotizacion_no] [int] NOT NULL,
|
|
[tipo_cliente] [int] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[nombre_cliente] [char](60) NOT NULL,
|
|
[rnc] [char](11) NULL,
|
|
[nombre_proyecto] [char](60) NULL,
|
|
[direccion_cliente] [char](80) NULL,
|
|
[cod_provincia] [smallint] NOT NULL,
|
|
[direccion_proyecto] [varchar](170) NULL,
|
|
[telefono_r] [char](20) NULL,
|
|
[telefono_o] [char](20) NULL,
|
|
[email] [char](100) NULL,
|
|
[tipo_precio] [int] NULL,
|
|
[beeper] [char](20) NULL,
|
|
[celular] [char](20) NULL,
|
|
[prima] [numeric](12, 2) NULL,
|
|
[fax1] [char](20) NULL,
|
|
[celular1] [char](20) NULL,
|
|
[fax] [char](20) NULL,
|
|
[fecha] [date] NULL,
|
|
[fecha_entrega] [date] NULL,
|
|
[plazo_entrega] [char](60) NULL,
|
|
[comentario] [char](60) NULL,
|
|
[contacto] [char](60) NULL,
|
|
[cond_pago] [smallint] NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[porc_itbi] [numeric](8, 2) NULL,
|
|
[total_bruto] [numeric](12, 2) NOT NULL,
|
|
[sub_total] [numeric](12, 2) NOT NULL,
|
|
[monto_desc] [numeric](12, 2) NULL,
|
|
[monto_itbi] [numeric](12, 2) NULL,
|
|
[total_neto] [numeric](12, 2) NOT NULL,
|
|
[monto_dolar] [numeric](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[cotizacion_no_crm] [varchar](100) NULL,
|
|
[direccion_facturacion] [varchar](100) NULL,
|
|
[num_emp_inst] [smallint] NULL,
|
|
[instalador] [varchar](100) NULL,
|
|
CONSTRAINT [PK_vetb00050] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cotizacion_no] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00049] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00049](
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[nombre_proyecto] [char](30) NULL,
|
|
[direccion_proyecto] [char](150) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00048] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00048](
|
|
[factura] [int] NOT NULL,
|
|
[detalle] [char](180) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [varchar](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00045] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00045](
|
|
[ano] [smallint] NOT NULL,
|
|
[mes] [smallint] NOT NULL,
|
|
[ventas] [smallint] NOT NULL,
|
|
[sec_vend] [smallint] NOT NULL,
|
|
[cod_cat] [int] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [numeric](12, 3) NULL,
|
|
[valor] [numeric](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[rowid] [int] IDENTITY(1,1) NOT NULL,
|
|
CONSTRAINT [PK_vetb00045] PRIMARY KEY CLUSTERED
|
|
(
|
|
[ano] ASC,
|
|
[mes] ASC,
|
|
[ventas] ASC,
|
|
[sec_vend] ASC,
|
|
[cod_cat] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00044] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00044](
|
|
[ano] [smallint] NOT NULL,
|
|
[mes] [smallint] NULL,
|
|
[ventas] [smallint] NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cantidad] [numeric](12, 3) NULL,
|
|
[valor] [numeric](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00042] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00042](
|
|
[factura] [int] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[serie] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [varchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00033] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00033](
|
|
[documento] [int] NOT NULL,
|
|
[id] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[porc_desc] [decimal](18, 2) NOT NULL,
|
|
[fecha_inicial] [smalldatetime] NOT NULL,
|
|
[fecha_final] [smalldatetime] NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00032] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00032](
|
|
[documento] [int] NOT NULL,
|
|
[fecha] [date] NOT NULL,
|
|
[descripcion_oferta] [nchar](60) NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](50) NOT NULL,
|
|
[fech_crea] [smalldatetime] NOT NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00031] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00031](
|
|
[id_kit] [int] NULL,
|
|
[cotizacion_no] [int] NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [int] NOT NULL,
|
|
[cod_grupo] [int] NOT NULL,
|
|
[cod_tipo] [int] NOT NULL,
|
|
[cod_sec] [int] NOT NULL,
|
|
[cantidad] [decimal](12, 5) NOT NULL,
|
|
[precio] [decimal](12, 2) NULL,
|
|
[porc_desc] [decimal](12, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00030] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00030](
|
|
[id_kit] [int] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad] [decimal](12, 2) NULL,
|
|
[porc_desc] [decimal](18, 2) NULL,
|
|
[precio] [decimal](18, 2) NULL,
|
|
CONSTRAINT [PK_vetb00030] PRIMARY KEY CLUSTERED
|
|
(
|
|
[id_kit] ASC,
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00029] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00029](
|
|
[id_kit] [int] NULL,
|
|
[descripcion] [nchar](100) NULL,
|
|
[disponible] [nchar](10) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[valor_total] [decimal](18, 2) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[porc_desc] [decimal](18, 2) NULL,
|
|
[costeo_orden] [nchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00028] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00028](
|
|
[cod_vend] [smallint] NULL,
|
|
[sec_vend] [smallint] NOT NULL,
|
|
[tipo_cliente] [smallint] NOT NULL,
|
|
[sec_cliente] [smallint] NOT NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
CONSTRAINT [PK_vetb00028] PRIMARY KEY CLUSTERED
|
|
(
|
|
[sec_vend] ASC,
|
|
[tipo_cliente] ASC,
|
|
[sec_cliente] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00027] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00027](
|
|
[tipo_desc] [smallint] NULL,
|
|
[descrip] [char](30) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[porc_desc] [numeric](5, 2) NULL,
|
|
[cantidad_1] [smallint] NULL,
|
|
[cantidad_2] [smallint] NULL,
|
|
[cajas_bonif] [smallint] NULL,
|
|
[fecha_cambio] [smalldatetime] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00026] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00026](
|
|
[codid] [smallint] NULL,
|
|
[descripcion] [char](25) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00025c] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00025c](
|
|
[ventas] [char](1) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[precio] [numeric](12, 2) NULL,
|
|
[descripcion] [char](60) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[cod_lista] [smallint] NULL,
|
|
[idrow] [int] IDENTITY(1,1) NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00025b] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00025b](
|
|
[ventas] [char](1) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[precio] [numeric](12, 2) NULL,
|
|
[descripcion] [char](60) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[cod_lista] [smallint] NULL,
|
|
[idrow] [int] IDENTITY(1,1) NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00025] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00025](
|
|
[ventas] [char](1) NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[precio] [numeric](12, 2) NOT NULL,
|
|
[descripcion] [char](60) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[cod_lista] [smallint] NULL,
|
|
[fecha_inicial] [date] NULL,
|
|
[fecha_final] [date] NULL,
|
|
[idrow] [int] IDENTITY(1,1) NOT NULL,
|
|
CONSTRAINT [PK_vetb00025] PRIMARY KEY CLUSTERED
|
|
(
|
|
[ventas] ASC,
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00024] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00024](
|
|
[fecha_ini_sem] [smalldatetime] NULL,
|
|
[fecha_fin_sem] [smalldatetime] NULL,
|
|
[cod_vend] [smallint] NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[fecha_visita] [smalldatetime] NULL,
|
|
[hora_visita] [smalldatetime] NULL,
|
|
[compra] [char](1) NULL,
|
|
[persona_contacto] [char](30) NULL,
|
|
[observacion] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00023] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00023](
|
|
[cod_tarifa] [smallint] NULL,
|
|
[descrip] [char](30) NULL,
|
|
[cod_provincia] [smallint] NULL,
|
|
[tarifa_pago] [numeric](7, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00022] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00022](
|
|
[etiqueta] [char](20) NOT NULL,
|
|
[cotizacion_no] [int] NOT NULL,
|
|
[secuencia] [smallint] NOT NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [int] NULL,
|
|
[cod_grupo] [int] NULL,
|
|
[cod_tipo] [int] NULL,
|
|
[cod_sec] [int] NULL,
|
|
[lado_1] [numeric](12, 5) NULL,
|
|
[lado_2] [numeric](12, 5) NULL,
|
|
[lado_3] [numeric](12, 5) NULL,
|
|
[cantidad] [numeric](12, 5) NULL,
|
|
[medida] [numeric](12, 5) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00020] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00020](
|
|
[cod_provincia] [smallint] NOT NULL,
|
|
[nombre_provincia] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[id_ciudad] [smallint] NOT NULL,
|
|
CONSTRAINT [PK_vetb00020] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_provincia] ASC,
|
|
[id_ciudad] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00019] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00019](
|
|
[ano] [char](4) NULL,
|
|
[mes_ini] [char](2) NULL,
|
|
[mes_fin] [char](2) NULL,
|
|
[prima] [numeric](7, 3) NULL,
|
|
[itbi] [numeric](7, 3) NULL,
|
|
[porciento] [numeric](8, 2) NULL,
|
|
[disponible] [char](1) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00018] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00018](
|
|
[anos] [smallint] NULL,
|
|
[fecha_in] [smallint] NULL,
|
|
[fecha_fi] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00016] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00016](
|
|
[id_ciudad] [smallint] NOT NULL,
|
|
[descripcion] [nchar](50) NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[cod_provincia] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00015] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00015](
|
|
[cod_transp] [smallint] NULL,
|
|
[sec_transp] [smallint] NULL,
|
|
[nombre] [char](30) NULL,
|
|
[cedula] [int] NULL,
|
|
[serie] [smallint] NULL,
|
|
[calle] [char](30) NULL,
|
|
[casa_num] [char](10) NULL,
|
|
[barrio] [char](20) NULL,
|
|
[urbanizacion] [char](20) NULL,
|
|
[cod_zona] [smallint] NULL,
|
|
[cod_provincia] [smallint] NULL,
|
|
[telefono] [char](8) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00014] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00014](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[peso_bruto] [decimal](10, 5) NULL,
|
|
[peso_neto] [decimal](10, 5) NULL,
|
|
[dim_caja] [decimal](10, 5) NULL,
|
|
[cantidad] [int] NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00013] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00013](
|
|
[tipo_desc] [smallint] NULL,
|
|
[descrip] [char](30) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[dias_validos] [smallint] NULL,
|
|
[porc_desc] [numeric](5, 2) NULL,
|
|
[valor_desc] [numeric](8, 3) NULL,
|
|
[cantidad_1] [smallint] NULL,
|
|
[cantidad_2] [smallint] NULL,
|
|
[cajas_bonif] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00012] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00012](
|
|
[cond_pago] [smallint] NOT NULL,
|
|
[descrip] [char](30) NULL,
|
|
[dias] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[defecto] [nchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00011] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00011](
|
|
[cod_vend] [smallint] NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[porc_ventas] [numeric](8, 4) NULL,
|
|
[porc_cobros] [numeric](8, 4) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00010] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00010](
|
|
[cod_vend] [smallint] NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[cod_zona] [smallint] NULL,
|
|
[cod_provincia] [smallint] NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00009] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00009](
|
|
[cod_zona] [smallint] NULL,
|
|
[cod_provincia] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00008] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00008](
|
|
[cod_zona] [smallint] NULL,
|
|
[descrip] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00007] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00007](
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[tipo_desc] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00006] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00006](
|
|
[tipo_cliente_s] [smallint] NULL,
|
|
[sec_cliente_s] [smallint] NULL,
|
|
[fecha_solicitud_s] [smalldatetime] NULL,
|
|
[condicion_venta_s] [smallint] NULL,
|
|
[solicitante_s] [char](30) NULL,
|
|
[cedula_s] [int] NULL,
|
|
[serie_s] [smallint] NULL,
|
|
[calle_s] [char](30) NULL,
|
|
[casa_num_s] [char](10) NULL,
|
|
[barrio_s] [char](20) NULL,
|
|
[urbanizacion_s] [char](20) NULL,
|
|
[cod_provincia_s] [smallint] NULL,
|
|
[telefono_s] [char](8) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00005] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00005](
|
|
[tipo_cliente] [smallint] NOT NULL,
|
|
[sec_cliente] [smallint] NOT NULL,
|
|
[calle] [char](100) NULL,
|
|
[casa_num] [char](10) NULL,
|
|
[barrio] [char](30) NULL,
|
|
[urbanizacion] [char](30) NULL,
|
|
[secuencia_visita] [int] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
CONSTRAINT [PK_vetb00005] PRIMARY KEY CLUSTERED
|
|
(
|
|
[tipo_cliente] ASC,
|
|
[sec_cliente] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00004] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00004](
|
|
[tipo_cliente] [smallint] NOT NULL,
|
|
[sec_cliente] [smallint] NOT NULL,
|
|
[nombre] [char](100) NULL,
|
|
[cod_zona] [smallint] NULL,
|
|
[cod_provincia] [smallint] NULL,
|
|
[telefono] [char](25) NULL,
|
|
[fax] [char](25) NULL,
|
|
[telex] [char](25) NULL,
|
|
[patente] [varchar](80) NULL,
|
|
[limite_credito] [numeric](10, 2) NULL,
|
|
[zona_postal] [char](10) NULL,
|
|
[num_rnc] [char](25) NULL,
|
|
[nombre_patente] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[Puesto_laboral] [varchar](50) NULL,
|
|
[telefono_casa] [nchar](25) NULL,
|
|
[tipo_negocio] [smallint] NULL,
|
|
[cond_pago] [smallint] NULL,
|
|
[id_ciudad] [smallint] NULL,
|
|
[url] [varchar](200) NULL,
|
|
[id_crm] [varchar](100) NULL,
|
|
CONSTRAINT [PK_vetb00004] PRIMARY KEY CLUSTERED
|
|
(
|
|
[tipo_cliente] ASC,
|
|
[sec_cliente] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00003] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00003](
|
|
[cod_cia] [smallint] NULL,
|
|
[factura] [int] NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [numeric](12, 5) NULL,
|
|
[cantidad_2] [numeric](14, 2) NULL,
|
|
[bonificacion] [numeric](12, 2) NULL,
|
|
[precio] [numeric](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[id_kit] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00002] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00002](
|
|
[cod_cia] [smallint] NULL,
|
|
[factura] [int] NOT NULL,
|
|
[fecha_factura] [date] NULL,
|
|
[ventas] [nvarchar](1) NULL,
|
|
[zona] [nvarchar](3) NULL,
|
|
[orden] [int] NULL,
|
|
[fecha_orden] [date] NULL,
|
|
[conduce] [int] NULL,
|
|
[fecha_conduce] [date] NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[cod_vend] [int] NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[cond_pago] [smallint] NULL,
|
|
[porc_itbi] [decimal](5, 2) NULL,
|
|
[porc_desc] [decimal](8, 2) NULL,
|
|
[prima_us] [decimal](6, 2) NULL,
|
|
[sub_total] [decimal](10, 2) NULL,
|
|
[monto_desc] [decimal](10, 2) NULL,
|
|
[monto_itbi] [decimal](10, 2) NULL,
|
|
[neto] [decimal](10, 2) NOT NULL,
|
|
[fecha_embarque] [datetime] NULL,
|
|
[status_impresion] [nvarchar](1) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [varchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[Documento] [nchar](15) NULL,
|
|
[placa_transporte] [nchar](25) NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cotizacion_no] [int] NULL,
|
|
[tipo_factura] [nchar](20) NULL,
|
|
[documento_ref] [nchar](25) NULL,
|
|
[descripcion_documento] [varchar](100) NULL,
|
|
[factura_ext] [int] NULL,
|
|
[placa] [varchar](10) NULL,
|
|
CONSTRAINT [PK_vetb00002] PRIMARY KEY CLUSTERED
|
|
(
|
|
[factura] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vetb00001] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vetb00001](
|
|
[cod_cia] [smallint] NULL,
|
|
[ult_factura] [int] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[ventas_soporte] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[ventas_soporte](
|
|
[num_emp] [int] NULL,
|
|
[nombre] [nchar](80) NULL,
|
|
[usuario] [nchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[ventas] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[ventas](
|
|
[compania] [varchar](50) NULL,
|
|
[localidad] [varchar](50) NULL,
|
|
[ventas] [varchar](50) NULL,
|
|
[tipo_ventas] [varchar](50) NULL,
|
|
[origen_producto] [varchar](50) NULL,
|
|
[producto] [varchar](50) NULL,
|
|
[valor_bruto] [decimal](18, 2) NULL,
|
|
[porc_itbis] [decimal](18, 2) NULL,
|
|
[descuento] [decimal](18, 2) NULL,
|
|
[itbis] [varbinary](50) NULL,
|
|
[factura] [varbinary](50) NULL,
|
|
[fecha] [varbinary](50) NULL,
|
|
[numero_mes] [varbinary](50) NULL,
|
|
[ano] [varchar](4) NULL,
|
|
[mes] [varchar](50) NULL,
|
|
[Column 15] [varchar](50) NULL,
|
|
[Column 16] [varchar](50) NULL,
|
|
[Column 17] [varchar](50) NULL,
|
|
[Column 18] [varchar](50) NULL,
|
|
[Column 19] [varchar](50) NULL,
|
|
[Column 20] [varchar](50) NULL,
|
|
[Column 21] [varchar](50) NULL,
|
|
[Column 22] [varchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[vacaciones] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[vacaciones](
|
|
[ano] [smallint] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[nom1_emp] [char](20) NULL,
|
|
[nom2_emp] [char](20) NULL,
|
|
[apell1_emp] [char](20) NULL,
|
|
[apell2_emp] [char](20) NULL,
|
|
[cedula] [char](11) NULL,
|
|
[serie] [char](4) NULL,
|
|
[nomina] [char](1) NULL,
|
|
[fecha_ing] [date] NULL,
|
|
[nom_puesto] [char](25) NULL,
|
|
[fech_vac] [date] NULL,
|
|
[dia] [date] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[Usuarios] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[Usuarios](
|
|
[UsuCodigo] [nvarchar](10) NOT NULL,
|
|
[UsuClave] [nvarchar](20) NOT NULL,
|
|
[UsuNombre] [nvarchar](60) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[USERINFO] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[USERINFO](
|
|
[USERID] [int] NOT NULL,
|
|
[Badgenumber] [nvarchar](24) NOT NULL,
|
|
[SSN] [nvarchar](20) NULL,
|
|
[NAME] [nvarchar](50) NULL,
|
|
[Gender] [nvarchar](8) NULL,
|
|
[TITLE] [nvarchar](20) NULL,
|
|
[PAGER] [nvarchar](20) NULL,
|
|
[BIRTHDAY] [datetime] NULL,
|
|
[HIREDDAY] [datetime] NULL,
|
|
[street] [nvarchar](80) NULL,
|
|
[CITY] [nvarchar](2) NULL,
|
|
[STATE] [nvarchar](2) NULL,
|
|
[ZIP] [nvarchar](12) NULL,
|
|
[OPHONE] [nvarchar](20) NULL,
|
|
[FPHONE] [nvarchar](20) NULL,
|
|
[VERIFICATIONMETHOD] [smallint] NULL,
|
|
[DEFAULTDEPTID] [smallint] NULL,
|
|
[SECURITYFLAGS] [smallint] NULL,
|
|
[ATT] [smallint] NOT NULL,
|
|
[INLATE] [smallint] NOT NULL,
|
|
[OUTEARLY] [smallint] NOT NULL,
|
|
[OVERTIME] [smallint] NOT NULL,
|
|
[SEP] [smallint] NOT NULL,
|
|
[HOLIDAY] [smallint] NOT NULL,
|
|
[MINZU] [nvarchar](8) NULL,
|
|
[PASSWORD] [nvarchar](20) NULL,
|
|
[LUNCHDURATION] [smallint] NOT NULL,
|
|
[MVERIFYPASS] [nvarchar](10) NULL,
|
|
[PHOTO] [image] NULL,
|
|
[Notes] [image] NULL,
|
|
[privilege] [int] NULL,
|
|
[InheritDeptSch] [smallint] NULL,
|
|
[InheritDeptSchClass] [smallint] NULL,
|
|
[AutoSchPlan] [smallint] NULL,
|
|
[MinAutoSchInterval] [int] NULL,
|
|
[RegisterOT] [smallint] NULL,
|
|
[InheritDeptRule] [smallint] NULL,
|
|
[EMPRIVILEGE] [smallint] NULL,
|
|
[CardNo] [nvarchar](20) NULL
|
|
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[travertino] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[travertino](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[porc] [decimal](12, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpvetb00003] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpvetb00003](
|
|
[cod_cia] [smallint] NULL,
|
|
[factura] [int] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [numeric](12, 5) NULL,
|
|
[cantidad_2] [numeric](14, 5) NULL,
|
|
[bonificacion] [numeric](12, 2) NULL,
|
|
[precio] [numeric](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpvetb00002] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpvetb00002](
|
|
[cod_cia] [smallint] NULL,
|
|
[factura] [int] NOT NULL,
|
|
[fecha_factura] [date] NULL,
|
|
[ventas] [nvarchar](1) NULL,
|
|
[zona] [nvarchar](3) NULL,
|
|
[orden] [int] NULL,
|
|
[fecha_orden] [date] NULL,
|
|
[conduce] [int] NULL,
|
|
[fecha_conduce] [date] NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[cod_vend] [int] NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[cond_pago] [smallint] NULL,
|
|
[porc_itbi] [decimal](5, 2) NULL,
|
|
[porc_desc] [decimal](8, 2) NULL,
|
|
[prima_us] [decimal](6, 2) NULL,
|
|
[sub_total] [decimal](10, 2) NULL,
|
|
[monto_desc] [decimal](10, 2) NULL,
|
|
[monto_itbi] [decimal](10, 2) NULL,
|
|
[neto] [decimal](10, 2) NOT NULL,
|
|
[fecha_embarque] [datetime] NULL,
|
|
[status_impresion] [nvarchar](1) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[Documento] [nchar](15) NULL,
|
|
[placa_transporte] [nchar](25) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpventas43] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpventas43](
|
|
[codlista] [int] NULL,
|
|
[ventas] [int] NULL,
|
|
[cod_n] [int] NULL,
|
|
[cod_Grupo] [int] NULL,
|
|
[cod_tipo] [int] NULL,
|
|
[cod_Sec] [int] NULL,
|
|
[precio] [int] NULL,
|
|
[us_Crea] [nvarchar](255) NULL,
|
|
[FECH_CREA] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpventas] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpventas](
|
|
[descrip] [char](10) NULL,
|
|
[descripcion] [nvarchar](40) NULL,
|
|
[vbruto] [char](18) NULL,
|
|
[ventasdia] [varchar](1) NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpTipoCuenta] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpTipoCuenta](
|
|
[nombre] [nchar](20) NULL,
|
|
[apellido] [nchar](20) NULL,
|
|
[cuenta_no] [nchar](20) NULL,
|
|
[tipo_cuenta] [nchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpTIPO] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpTIPO](
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[descripcion] [char](30) NULL,
|
|
CONSTRAINT [PK_tmpTIPO] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_tipo] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmprepuestos1] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmprepuestos1](
|
|
[cod_n] [float] NULL,
|
|
[cod_grupo] [float] NULL,
|
|
[cod_tipo] [float] NULL,
|
|
[cod_sec] [float] NULL,
|
|
[descripcion] [nvarchar](255) NULL,
|
|
[unidad medida] [nvarchar](255) NULL,
|
|
[cod_n1] [float] NULL,
|
|
[cod_grupo1] [float] NULL,
|
|
[cod_tipo1] [float] NULL,
|
|
[cod_sec1] [float] NULL,
|
|
[F11] [nvarchar](255) NULL,
|
|
[F12] [nvarchar](255) NULL,
|
|
[F13] [nvarchar](255) NULL,
|
|
[F14] [nvarchar](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmprepuestos] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmprepuestos](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_Sec] [smallint] NULL,
|
|
[descripcion] [nchar](100) NULL,
|
|
[unidad_med] [nchar](10) NULL,
|
|
[clasificacion] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpproductos] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpproductos](
|
|
[descripcion] [char](120) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_Sec] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmppreciosm2] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmppreciosm2](
|
|
[cod_lista] [float] NULL,
|
|
[ventas] [float] NULL,
|
|
[cod_n] [float] NULL,
|
|
[cod_grupo] [float] NULL,
|
|
[cod_tipo] [float] NULL,
|
|
[cod_Sec] [float] NULL,
|
|
[precio] [float] NULL,
|
|
[descripcion] [nvarchar](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmppreciosm1] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmppreciosm1](
|
|
[cod_lista] [float] NULL,
|
|
[ventas] [float] NULL,
|
|
[cod_n] [float] NULL,
|
|
[cod_grupo] [float] NULL,
|
|
[cod_tipo] [float] NULL,
|
|
[cod_Sec] [float] NULL,
|
|
[precio] [float] NULL,
|
|
[descripcion] [nvarchar](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmppreciosg2] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmppreciosg2](
|
|
[ventas] [smallint] NULL,
|
|
[cod_lista] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[precio] [decimal](12, 2) NULL,
|
|
[descripcion] [nvarchar](60) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmppreciosg1] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmppreciosg1](
|
|
[ventas] [smallint] NULL,
|
|
[cod_lista] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_Sec] [smallint] NULL,
|
|
[precio] [decimal](12, 2) NULL,
|
|
[descripcion] [nvarchar](60) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmppreciosferia] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmppreciosferia](
|
|
[descripcion] [nvarchar](255) NULL,
|
|
[cod_lista] [float] NULL,
|
|
[cod_n] [float] NULL,
|
|
[cod_grupo] [float] NULL,
|
|
[cod_tipo] [float] NULL,
|
|
[cod_sec] [float] NULL,
|
|
[precio] [float] NULL,
|
|
[F8] [float] NULL,
|
|
[F9] [float] NULL,
|
|
[F10] [float] NULL,
|
|
[F11] [nvarchar](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpprecios_costos] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpprecios_costos](
|
|
[cod_cia] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[descripcion] [varchar](100) NULL,
|
|
[precio] [decimal](12, 2) NULL,
|
|
[costo] [decimal](12, 5) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpprecios] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpprecios](
|
|
[ventas] [smallint] NULL,
|
|
[cod_lista] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_Sec] [smallint] NULL,
|
|
[precio] [money] NULL,
|
|
[us_crea] [nvarchar](255) NULL,
|
|
[fech_crea] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpplanchas] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpplanchas](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[material] [float] NULL,
|
|
[labor] [float] NULL,
|
|
[gasto] [decimal](12, 4) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpordenes] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpordenes](
|
|
[num_oc] [int] NULL,
|
|
[cantidad_orden] [decimal](12, 5) NULL,
|
|
[cantidad_conduce] [decimal](12, 5) NULL,
|
|
[diferencia] [decimal](12, 5) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpofertas] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpofertas](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[descuento] [smallint] NULL,
|
|
[fecha] [date] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpnomina] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpnomina](
|
|
[num_nomi] [int] NULL,
|
|
[fecha] [date] NULL,
|
|
[num_emp] [int] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[tipo_emp] [char](2) NULL,
|
|
[sueldo] [float] NULL,
|
|
[vacaciones] [float] NULL,
|
|
[adicional] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpMEDIDA] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpMEDIDA](
|
|
[cod_Sec] [smallint] NOT NULL,
|
|
[descripcion] [char](50) NULL,
|
|
CONSTRAINT [PK_tmpMEDIDA] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_Sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpmatprima] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpmatprima](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_Sec] [smallint] NULL,
|
|
[cantidad] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpiptb012] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpiptb012](
|
|
[idtrx] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_seccion] [smallint] NULL,
|
|
[cod_tramo] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](12, 4) NULL,
|
|
[balance] [decimal](12, 4) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[lado_1] [decimal](12, 4) NULL,
|
|
[lado_2] [decimal](12, 4) NULL,
|
|
[lado_3] [decimal](12, 4) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpiptb00027] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpiptb00027](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpiptb00012] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpiptb00012](
|
|
[idtrx] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_seccion] [smallint] NULL,
|
|
[cod_tramo] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](12, 4) NULL,
|
|
[balance] [decimal](12, 4) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[lado_1] [decimal](12, 4) NULL,
|
|
[lado_2] [decimal](12, 4) NULL,
|
|
[lado_3] [decimal](12, 4) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpiptb00006] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpiptb00006](
|
|
[cod_cia] [smallint] NULL,
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha] [smalldatetime] NOT NULL,
|
|
[fact_no] [char](10) NULL,
|
|
[conduce_no] [char](10) NULL,
|
|
[tipo] [char](2) NULL,
|
|
[orden_compra] [int] NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[cod_transp] [smallint] NULL,
|
|
[sec_transp] [smallint] NULL,
|
|
[placa] [char](10) NULL,
|
|
[cod_tarifa] [smallint] NULL,
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[detalle] [char](60) NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad_1] [decimal](12, 5) NULL,
|
|
[cantidad_2] [decimal](12, 5) NOT NULL,
|
|
[cond_recep] [char](1) NULL,
|
|
[uso_tiempo] [char](1) NULL,
|
|
[bodega] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[num_req] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpiptb00002] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpiptb00002](
|
|
[cod_cia] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[descrip_esp] [char](100) NULL,
|
|
[descrip_ing] [char](50) NULL,
|
|
[unidad_med] [char](4) NULL,
|
|
[nomenclatura] [char](10) NULL,
|
|
[bodega] [smallint] NULL,
|
|
[exist_max] [decimal](10, 2) NULL,
|
|
[exist_min] [decimal](10, 2) NULL,
|
|
[dia_llegada] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[control_existencia] [varchar](2) NULL,
|
|
[control_itbis] [varchar](2) NULL,
|
|
[pcodn] [smallint] NULL,
|
|
[pcodgrupo] [smallint] NULL,
|
|
[pcodtipo] [smallint] NULL,
|
|
[pcodsec] [smallint] NULL,
|
|
[material] [decimal](18, 4) NULL,
|
|
[labor] [decimal](18, 4) NULL,
|
|
[gastos] [decimal](18, 4) NULL,
|
|
[factor] [decimal](18, 4) NULL,
|
|
[ventas] [nchar](2) NULL,
|
|
[cod_lista] [smallint] NULL,
|
|
[precio] [decimal](18, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpipprrp013] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpipprrp013](
|
|
[fecha_inicial] [date] NULL,
|
|
[fecha_final] [date] NULL,
|
|
[categoria] [varchar](100) NULL,
|
|
[suplidor] [varchar](100) NULL,
|
|
[producto] [varchar](200) NULL,
|
|
[codigo] [varchar](50) NULL,
|
|
[descripcion] [varchar](200) NULL,
|
|
[existencia] [float] NULL,
|
|
[disponible] [float] NULL,
|
|
[cantidad_orden] [float] NULL,
|
|
[dias_inv] [int] NULL,
|
|
[ventas] [float] NULL,
|
|
[ult_fecha_compra] [date] NULL,
|
|
[costo] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[TMPINVM] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[TMPINVM](
|
|
[DESCRIPCION] [nvarchar](255) NULL,
|
|
[L1] [float] NULL,
|
|
[L2] [float] NULL,
|
|
[CANTIDAD] [float] NULL,
|
|
[MEDIDA] [float] NULL,
|
|
[CODN] [float] NULL,
|
|
[CODGRUPO] [float] NULL,
|
|
[CODTIPO] [float] NULL,
|
|
[CODSEC] [float] NULL,
|
|
[EXISTENCIA] [float] NULL,
|
|
[COSTO] [float] NULL,
|
|
[CLASIFICACION] [char](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpinventarioFisico] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpinventarioFisico](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[existencia] [decimal](12, 4) NULL,
|
|
[cod_n1] [smallint] NULL,
|
|
[cod_grupo1] [smallint] NULL,
|
|
[cod_tipo1] [smallint] NULL,
|
|
[cod_sec1] [smallint] NULL,
|
|
[fisico] [decimal](12, 4) NULL,
|
|
[costo] [decimal](12, 4) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[TMPINVENTARIO] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[TMPINVENTARIO](
|
|
[Descripcion] [nvarchar](255) NULL,
|
|
[L1] [float] NULL,
|
|
[L2] [float] NULL,
|
|
[Cantidad] [float] NULL,
|
|
[METROS] [float] NULL,
|
|
[CODN] [float] NULL,
|
|
[CODGRUPO] [float] NULL,
|
|
[CODTIPO] [float] NULL,
|
|
[CODSEC] [float] NULL,
|
|
[existencia] [float] NULL,
|
|
[TIPO] [nchar](30) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpGRUPO] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpGRUPO](
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[descripcion] [char](30) NULL,
|
|
CONSTRAINT [PK_tmpGRUPO] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_grupo] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpfempleados] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpfempleados](
|
|
[NUM_EMP] [smallint] NULL,
|
|
[FECHA] [date] NULL,
|
|
[fecha_inicio] [date] NULL,
|
|
[valor_ant] [decimal](18, 2) NULL,
|
|
[VALOR] [decimal](12, 2) NULL,
|
|
[estado] [nchar](20) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpfacturas_ext] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpfacturas_ext](
|
|
[factura_ext] [int] NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[factura_c] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[TMPFACTURAS] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[TMPFACTURAS](
|
|
[factura] [float] NULL,
|
|
[cantidad] [float] NULL,
|
|
[precio] [float] NULL,
|
|
[DESC#] [float] NULL,
|
|
[valor] [float] NULL,
|
|
[cod_n] [float] NULL,
|
|
[cod_grupo] [float] NULL,
|
|
[cod_tipo] [float] NULL,
|
|
[cod_sec] [float] NULL,
|
|
[F10] [nvarchar](255) NULL,
|
|
[F11] [nvarchar](255) NULL,
|
|
[F12] [nvarchar](255) NULL,
|
|
[F13] [nvarchar](255) NULL,
|
|
[F14] [nvarchar](255) NULL,
|
|
[F15] [nvarchar](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpExcel] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpExcel](
|
|
[cod_grupo] [smallint] NULL,
|
|
[descripcion] [nvarchar](30) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[TMPempresas1] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[TMPempresas1](
|
|
[rnc] [nchar](11) NULL,
|
|
[razon_social] [nchar](100) NULL,
|
|
[nombre_empresa] [nchar](100) NULL,
|
|
[actividad] [nchar](100) NULL,
|
|
[calle] [nchar](100) NULL,
|
|
[no_local] [nchar](10) NULL,
|
|
[sector] [nchar](100) NULL,
|
|
[telefono] [nchar](15) NULL,
|
|
[fecha_inicio] [nchar](10) NULL,
|
|
[estado1] [nchar](15) NULL,
|
|
[estado2] [nchar](15) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpduplicados] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpduplicados](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_seg] [smallint] NULL,
|
|
[cantidad] [decimal](12, 4) NULL,
|
|
[veces] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpdiasInv] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpdiasInv](
|
|
[codigo] [varchar](50) NULL,
|
|
[descripcion] [varchar](120) NULL,
|
|
[consumo] [decimal](18, 2) NULL,
|
|
[existencia] [decimal](18, 4) NULL,
|
|
[dias] [smallint] NULL,
|
|
[fecha_venta] [date] NULL,
|
|
[fecha_compra] [date] NULL,
|
|
[cantidad_comprada] [decimal](18, 4) NULL,
|
|
[costo] [float] NULL,
|
|
[precio] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpdetallefact] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpdetallefact](
|
|
[factura] [float] NULL,
|
|
[clase] [float] NULL,
|
|
[grupo] [float] NULL,
|
|
[tipo] [float] NULL,
|
|
[medida] [float] NULL,
|
|
[cantidad] [float] NULL,
|
|
[precio] [float] NULL,
|
|
[descuento] [float] NULL,
|
|
[F9] [nvarchar](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpdescuento] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpdescuento](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[porc_desc] [decimal](18, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpcxc] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpcxc](
|
|
[num_doc] [int] NULL,
|
|
[bruto] [decimal](12, 2) NULL,
|
|
[itbis] [decimal](12, 2) NULL,
|
|
[monto_desc] [decimal](12, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpCuadre] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpCuadre](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_Grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[VALOR_ANT] [decimal](12, 2) NULL,
|
|
[VALOR_ACT] [decimal](12, 2) NULL,
|
|
[VALOR_FINAL] [decimal](12, 2) NULL,
|
|
[VALOR_MES] [decimal](12, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpcostosFeria] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpcostosFeria](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[descripcion] [char](80) NULL,
|
|
[existencia] [decimal](12, 3) NULL,
|
|
[costo_std] [decimal](12, 3) NULL,
|
|
[precio_us] [decimal](12, 2) NULL,
|
|
[costo_liq] [decimal](12, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpCostos1] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpCostos1](
|
|
[cod_n] [float] NULL,
|
|
[cod_grupo] [float] NULL,
|
|
[cod_tipo] [float] NULL,
|
|
[cod_Sec] [float] NULL,
|
|
[Costo Mat#] [float] NULL,
|
|
[Labor ] [float] NULL,
|
|
[Gastos] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpCostos] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpCostos](
|
|
[ventas] [float] NULL,
|
|
[ano] [float] NULL,
|
|
[mes_ini] [float] NULL,
|
|
[mes_fin] [float] NULL,
|
|
[cod_n] [float] NULL,
|
|
[cod_grupo] [float] NULL,
|
|
[cod_tipo] [float] NULL,
|
|
[cod_sec] [float] NULL,
|
|
[material] [float] NULL,
|
|
[labor] [float] NULL,
|
|
[gastos] [float] NULL,
|
|
[F12] [nvarchar](255) NULL,
|
|
[F13] [nvarchar](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpCodSec] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpCodSec](
|
|
[codsec] [smallint] NULL,
|
|
[descripcion] [nchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpcodigos1] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpcodigos1](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[material] [float] NULL,
|
|
[labor] [float] NULL,
|
|
[gasto] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpcodigos] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpcodigos](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_Sec] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpcodigorepetido] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpcodigorepetido](
|
|
[cod_cia] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cuenta] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[TMPCOD12] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[TMPCOD12](
|
|
[FICHA] [float] NULL,
|
|
[valor] [float] NULL,
|
|
[CODMOV] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[TMPCOD11] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[TMPCOD11](
|
|
[FICHA] [float] NULL,
|
|
[valor] [float] NULL,
|
|
[CODMOV] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpclientes] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpclientes](
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[nombre] [char](50) NULL,
|
|
[cod_zona] [smallint] NULL,
|
|
[cod_provincia] [smallint] NULL,
|
|
[telefono] [char](16) NULL,
|
|
[fax] [char](16) NULL,
|
|
[telex] [char](16) NULL,
|
|
[patente] [char](11) NULL,
|
|
[limite_credito] [numeric](10, 2) NULL,
|
|
[zona_postal] [char](10) NULL,
|
|
[num_rnc] [char](11) NULL,
|
|
[nombre_patente] [char](30) NULL,
|
|
[us_Crea] [char](20) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpclasificacion] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpclasificacion](
|
|
[tipo_cliente] [float] NULL,
|
|
[sec_cliente] [float] NULL,
|
|
[tipo_negocio] [float] NULL,
|
|
[F4] [nvarchar](255) NULL,
|
|
[F5] [nvarchar](255) NULL,
|
|
[F6] [nvarchar](255) NULL,
|
|
[F7] [nvarchar](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpCLASE1] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpCLASE1](
|
|
[cod_n] [nvarchar](255) NULL,
|
|
[descripcion] [nvarchar](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpCLASE] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpCLASE](
|
|
[cod_n] [smallint] NOT NULL,
|
|
[descripcion] [char](30) NULL,
|
|
CONSTRAINT [PK_tmpCLASE] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_n] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpcctb01] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpcctb01](
|
|
[cuenta_no] [char](8) NULL,
|
|
[cod_cia] [smallint] NULL,
|
|
[tipo_doc] [char](2) NULL,
|
|
[num_doc] [int] NOT NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[cod_emp] [smallint] NULL,
|
|
[cod_emp_sec] [smallint] NULL,
|
|
[fecha_orig] [smalldatetime] NULL,
|
|
[fecha_ven] [smalldatetime] NULL,
|
|
[aplica_a] [int] NULL,
|
|
[banco] [smallint] NULL,
|
|
[num_cheque] [char](12) NULL,
|
|
[valor] [numeric](12, 2) NOT NULL,
|
|
[valor_efectivo] [numeric](12, 2) NULL,
|
|
[valor_cheque] [numeric](12, 2) NULL,
|
|
[costo] [numeric](12, 2) NULL,
|
|
[monto_desc] [numeric](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpccrp48] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpccrp48](
|
|
[codigo_supervisor] [smallint] NULL,
|
|
[nombre_supervisor] [varchar](60) NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[nombre_vendedor] [varchar](60) NULL,
|
|
[fecha] [date] NULL,
|
|
[documento] [int] NULL,
|
|
[tipo_doc] [varchar](2) NULL,
|
|
[cotizacion_no] [int] NULL,
|
|
[nombre_cliente] [nchar](100) NULL,
|
|
[valor_orig] [decimal](12, 2) NULL,
|
|
[porc_cobros_vend] [decimal](8, 4) NULL,
|
|
[chitbis] [char](2) NULL,
|
|
[comision_vend] [decimal](12, 4) NULL,
|
|
[sec_vend_a] [smallint] NULL,
|
|
[valor_adicional] [decimal](12, 2) NULL,
|
|
[comision_adicional] [decimal](12, 2) NULL,
|
|
[str_reporte] [nchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpccprrp027] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpccprrp027](
|
|
[tipo_cliente] [int] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[nombre] [varchar](100) NULL,
|
|
[corriente] [decimal](18, 2) NULL,
|
|
[de0a30] [decimal](18, 2) NULL,
|
|
[de31a60] [decimal](18, 2) NULL,
|
|
[de61a90] [decimal](18, 2) NULL,
|
|
[masde90] [decimal](18, 2) NULL,
|
|
[total_saldo] [decimal](18, 2) NULL,
|
|
[total_saldo_ext] [decimal](18, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tmpCAM] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpCAM](
|
|
[labor] [float] NULL,
|
|
[gasto] [float] NULL,
|
|
[codn] [float] NULL,
|
|
[codgrupo] [float] NULL,
|
|
[codtipo] [float] NULL,
|
|
[codsec] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpbonifica] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpbonifica](
|
|
[tipo_emp] [nvarchar](255) NULL,
|
|
[num_nomi] [float] NULL,
|
|
[cod_mov] [float] NULL,
|
|
[ficha] [float] NULL,
|
|
[departamento] [float] NULL,
|
|
[nivel_emp] [float] NULL,
|
|
[cod_puesto] [float] NULL,
|
|
[BONIFICACION] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpbalances] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpbalances](
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[balance_a] [decimal](12, 2) NULL,
|
|
[balance_b] [decimal](12, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpaumento] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpaumento](
|
|
[fecha] [date] NULL,
|
|
[num_nomi] [int] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[valor] [decimal](18, 2) NULL,
|
|
[cod_mov] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmpactualiza] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmpactualiza](
|
|
[cod_n] [float] NULL,
|
|
[cod_grupo] [float] NULL,
|
|
[cod_tipo] [float] NULL,
|
|
[cod_sec] [float] NULL,
|
|
[COD1] [float] NULL,
|
|
[GRUPO1] [float] NULL,
|
|
[TIPO2] [float] NULL,
|
|
[SEC1] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmp3iptb00012] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmp3iptb00012](
|
|
[idtrx] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_seccion] [smallint] NULL,
|
|
[cod_tramo] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](12, 4) NULL,
|
|
[balance] [decimal](12, 4) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[lado_1] [decimal](12, 4) NULL,
|
|
[lado_2] [decimal](12, 4) NULL,
|
|
[lado_3] [decimal](12, 4) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmp2iptb00012] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmp2iptb00012](
|
|
[idtrx] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_seccion] [smallint] NULL,
|
|
[cod_tramo] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](12, 4) NULL,
|
|
[balance] [decimal](12, 4) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[lado_1] [decimal](12, 4) NULL,
|
|
[lado_2] [decimal](12, 4) NULL,
|
|
[lado_3] [decimal](12, 4) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tmp_kit] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tmp_kit](
|
|
[id_kit] [int] NULL,
|
|
[cotizacion_no] [int] NULL,
|
|
[area] [int] NULL,
|
|
[cod_n] [int] NULL,
|
|
[cod_grupo] [int] NULL,
|
|
[cod_tipo] [int] NULL,
|
|
[cod_sec] [int] NULL,
|
|
[cantidad] [decimal](12, 5) NULL,
|
|
[precio] [decimal](12, 2) NULL,
|
|
[porc_desc] [decimal](12, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[tetb00006] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[tetb00006](
|
|
[cheque_no] [int] NULL,
|
|
[banco] [char](8) NULL,
|
|
[codigo] [int] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[tetb00003] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[tetb00003](
|
|
[codigo] [smallint] NULL,
|
|
[descripcion] [nvarchar](30) NULL,
|
|
[tipo] [nvarchar](2) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[SVTB00008] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[SVTB00008](
|
|
[num_oc] [int] NOT NULL,
|
|
[area] [int] NULL,
|
|
[cod_n] [int] NULL,
|
|
[cod_grupo] [int] NULL,
|
|
[cod_tipo] [int] NULL,
|
|
[cod_sec] [int] NULL,
|
|
[cantidad] [decimal](12, 5) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [varchar](30) NULL,
|
|
[fech_crea] [date] NULL,
|
|
[us_mod] [varchar](30) NULL,
|
|
[fech_mod] [date] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[SVTB00007] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[SVTB00007](
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha_dev] [date] NULL,
|
|
[num_oc] [int] NULL,
|
|
[fech_produccion] [date] NULL,
|
|
[fecha_despacho] [date] NULL,
|
|
[tipo_cliente] [int] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[cod_vend] [int] NULL,
|
|
[producido] [int] NULL,
|
|
[instalado] [int] NULL,
|
|
[dev_recibida] [int] NULL,
|
|
[medido] [varchar](100) NULL,
|
|
[cod_transp] [int] NULL,
|
|
[sec_transp] [int] NULL,
|
|
[supervisado] [int] NULL,
|
|
[realizado] [varchar](50) NULL,
|
|
[id_devolucion] [smallint] NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [varchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[svtb00006] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[svtb00006](
|
|
[num_doc] [int] NOT NULL,
|
|
[tipo_doc] [char](2) NULL,
|
|
[us_crea] [varchar](50) NOT NULL,
|
|
[fech_crea] [datetime] NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[svtb00005] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[svtb00005](
|
|
[num_doc] [int] NOT NULL,
|
|
[factura] [int] NOT NULL,
|
|
[fecha_factura] [date] NOT NULL,
|
|
[codigo] [varchar](25) NOT NULL,
|
|
[descripcion] [varchar](100) NOT NULL,
|
|
[cantidad] [decimal](12, 2) NOT NULL,
|
|
[precio] [decimal](12, 2) NOT NULL,
|
|
[descuento] [decimal](12, 2) NOT NULL,
|
|
[valor] [decimal](12, 2) NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[rowid] [int] NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[svtb00004] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[svtb00004](
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha] [date] NOT NULL,
|
|
[num_oc] [int] NULL,
|
|
[cotizacion_no] [int] NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[nombre] [varchar](100) NOT NULL,
|
|
[rnc] [varchar](11) NULL,
|
|
[telefono] [varchar](25) NULL,
|
|
[correo] [varchar](100) NULL,
|
|
[sec_vend] [int] NULL,
|
|
[comentario] [varchar](100) NULL,
|
|
[via] [varchar](50) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[producto] [varchar](100) NULL,
|
|
[lote] [varchar](100) NULL,
|
|
[fecha_compra] [date] NULL,
|
|
[sucid] [smallint] NULL,
|
|
[estado] [varchar](50) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[svtb00003] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[svtb00003](
|
|
[num_doc] [int] NULL,
|
|
[id_labor] [int] NULL,
|
|
[sec_vend1] [smallint] NULL,
|
|
[nombre] [varchar](100) NULL,
|
|
[fecha_labor] [date] NULL,
|
|
[fecha_visita] [date] NULL,
|
|
[observacion] [varchar](150) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [date] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[svtb00002] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[svtb00002](
|
|
[num_doc] [int] NULL,
|
|
[id] [smallint] NULL,
|
|
[items] [varchar](100) NULL,
|
|
[aplica] [nchar](10) NULL,
|
|
[medida] [nchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[svtb00001] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[svtb00001](
|
|
[num_Doc] [int] NOT NULL,
|
|
[fecha] [date] NULL,
|
|
[nombre] [varchar](100) NULL,
|
|
[celular] [varchar](20) NULL,
|
|
[telefono] [varchar](20) NULL,
|
|
[email] [varchar](100) NULL,
|
|
[direccion] [varchar](100) NULL,
|
|
[hdisponible] [varchar](100) NULL,
|
|
[presupuesto] [decimal](18, 2) NULL,
|
|
[observacion_general] [varchar](100) NULL,
|
|
[sec_Vend] [smallint] NULL,
|
|
[vendedor] [varchar](100) NULL,
|
|
[proyecto] [varchar](100) NULL,
|
|
[contacto] [varchar](100) NULL,
|
|
[telefono_contacto] [varchar](20) NULL,
|
|
[modelo] [varchar](100) NULL,
|
|
[tipologia] [varchar](100) NULL,
|
|
[terminacion] [varchar](100) NULL,
|
|
[color] [varchar](100) NULL,
|
|
[tirador] [varchar](100) NULL,
|
|
[iluminacion] [varchar](100) NULL,
|
|
[marca] [varchar](100) NULL,
|
|
[cantidad] [float] NULL,
|
|
[dimension_plancha] [varchar](50) NULL,
|
|
[espesor] [varchar](50) NULL,
|
|
[cocina] [nchar](10) NULL,
|
|
[m_instalados] [nchar](10) NULL,
|
|
[m_chino] [nchar](10) NULL,
|
|
[e_material] [varchar](100) NULL,
|
|
[t_bisel] [varchar](50) NULL,
|
|
[t_zocalo] [varchar](50) NULL,
|
|
[observacion_escalera] [varchar](200) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [varchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[status_t] [varchar](1) NULL,
|
|
[num_oc] [int] NULL,
|
|
[losas] [nchar](10) NULL,
|
|
[losas_entera] [nchar](10) NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
CONSTRAINT [PK_svtb00001] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_Doc] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[supplier] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[supplier](
|
|
[suppid] [int] NOT NULL,
|
|
[name] [char](80) NULL,
|
|
[status] [char](2) NOT NULL,
|
|
[addr1] [char](80) NULL,
|
|
[addr2] [char](80) NULL,
|
|
[city] [char](80) NULL,
|
|
[state] [char](80) NULL,
|
|
[zip] [char](5) NULL,
|
|
[phone] [char](80) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[Sucursales] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[Sucursales](
|
|
[SucID] [smallint] NOT NULL,
|
|
[SucNombre] [nvarchar](60) NOT NULL,
|
|
[localidad] [smallint] NULL,
|
|
[pais] [smallint] NULL,
|
|
[zona] [smallint] NULL,
|
|
[direccion] [nchar](80) NULL,
|
|
[telefono] [nchar](15) NULL,
|
|
[fax] [nchar](15) NULL,
|
|
[url] [nchar](80) NULL,
|
|
[email] [nchar](80) NULL,
|
|
[rnc] [nchar](11) NULL,
|
|
[nombre_display] [nvarchar](60) NULL,
|
|
[localidad_venta] [nchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[signon] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[signon](
|
|
[userid] [char](80) NOT NULL,
|
|
[password] [char](25) NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[seqreg] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[seqreg](
|
|
[sr_name] [varchar](30) NOT NULL,
|
|
[sr_last] [int] NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[seg0008] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[seg0008](
|
|
[depto] [smallint] NOT NULL,
|
|
[nombre] [nchar](100) NULL,
|
|
CONSTRAINT [PK_seg0008] PRIMARY KEY CLUSTERED
|
|
(
|
|
[depto] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[seg0007] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[seg0007](
|
|
[usuario] [nchar](50) NOT NULL,
|
|
[nombre] [nchar](60) NULL,
|
|
[sec_vend] [smallint] NOT NULL,
|
|
[tipo_usuario] [nchar](30) NOT NULL,
|
|
[comision] [nchar](10) NULL,
|
|
[porc_cobros] [decimal](12, 4) NULL,
|
|
CONSTRAINT [PK_seg0007] PRIMARY KEY CLUSTERED
|
|
(
|
|
[usuario] ASC,
|
|
[sec_vend] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[seg0006] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[seg0006](
|
|
[usuario] [char](50) NULL,
|
|
[session] [int] NULL,
|
|
[fecha_session] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[seg00051] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[seg00051](
|
|
[cod_perfil] [varchar](50) NULL,
|
|
[programa] [varchar](50) NULL,
|
|
[sistema] [varchar](50) NULL,
|
|
[descripcion] [varchar](50) NULL,
|
|
[ruta] [varchar](50) NULL,
|
|
[conexion] [varchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[seg0005] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[seg0005](
|
|
[cod_perfil] [int] NOT NULL,
|
|
[programa] [char](30) NOT NULL,
|
|
[sistema] [char](30) NULL,
|
|
[descripcion] [char](50) NULL,
|
|
[ruta] [nchar](100) NULL,
|
|
[conexion] [nchar](20) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[seg0004] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[seg0004](
|
|
[programa] [nchar](100) NULL,
|
|
[sistema] [nchar](100) NULL,
|
|
[descripcion] [nchar](100) NULL,
|
|
[ruta] [nchar](100) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[seg0003] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[seg0003](
|
|
[usuario] [char](30) NULL,
|
|
[nom_puesto] [char](30) NULL,
|
|
[autorizacionDespacho] [nchar](10) NULL,
|
|
[controlDespacho] [nchar](10) NULL,
|
|
[controlDespiece] [nchar](10) NULL,
|
|
[controlDibujo] [nchar](10) NULL,
|
|
[controlDescuento] [nchar](10) NULL,
|
|
[correo] [nchar](80) NULL,
|
|
[actualizacion_log_produccion] [nchar](10) NULL,
|
|
[actualizacion_produccion] [nchar](10) NULL,
|
|
[fotos_adicionales_inventario] [nchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[seg0001] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[seg0001](
|
|
[usuario] [char](50) NOT NULL,
|
|
[cod_perfil] [int] NOT NULL,
|
|
[observacion] [char](70) NULL,
|
|
[printerDefecto] [smallint] NOT NULL,
|
|
[otro_printer] [smallint] NOT NULL,
|
|
[printer_cheque] [smallint] NOT NULL,
|
|
[cambia_clave] [char](10) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[sucID] [smallint] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[clave] [nchar](12) NULL,
|
|
[tipo_usuario] [nchar](20) NULL,
|
|
[descuento1] [decimal](18, 2) NULL,
|
|
[descuento2] [decimal](18, 2) NULL,
|
|
[fecha_ultimo_login] [datetime] NULL,
|
|
[ultimo_programa_ejecutado] [nchar](50) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[num_emp] [int] IDENTITY(1,1) NOT NULL,
|
|
[email] [nchar](100) NULL,
|
|
CONSTRAINT [PK_seg0001] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_emp] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[seg0000] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[seg0000](
|
|
[id_number] [smallint] NULL,
|
|
[usuario] [char](40) NOT NULL,
|
|
[nombre] [char](60) NULL,
|
|
[sec_vend] [smallint] NOT NULL,
|
|
[password] [char](20) NULL,
|
|
[ocupacion] [char](30) NULL,
|
|
[email] [nchar](50) NULL,
|
|
[celular] [nchar](15) NULL,
|
|
[celular2] [nchar](15) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[depto] [smallint] NOT NULL,
|
|
CONSTRAINT [PK_seg0000_1] PRIMARY KEY CLUSTERED
|
|
(
|
|
[sec_vend] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[repitecodigotmp] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[repitecodigotmp](
|
|
[documento] [int] NULL,
|
|
[tipo_doc] [nchar](3) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[repiteCodigo] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[repiteCodigo](
|
|
[documento] [int] NOT NULL,
|
|
[tipo_doc] [nchar](3) NOT NULL,
|
|
[codigo] [nchar](25) NOT NULL,
|
|
[codid] [smallint] NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
CONSTRAINT [PK_repiteCodigo] PRIMARY KEY CLUSTERED
|
|
(
|
|
[documento] ASC,
|
|
[tipo_doc] ASC,
|
|
[codigo] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[ranking] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[ranking](
|
|
[rankingACT] [smallint] NULL,
|
|
[rankingANT] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[descripcion] [nchar](100) NULL,
|
|
[unidad_med] [nchar](10) NULL,
|
|
[cantidad] [decimal](15, 4) NULL,
|
|
[valor] [decimal](15, 2) NULL,
|
|
[cantidad_ant] [decimal](15, 4) NULL,
|
|
[valor_ant] [decimal](15, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[Query] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[Query](
|
|
[num_nomi] [int] NULL,
|
|
[tipo_emp] [char](1) NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[valor] [decimal](10, 2) NULL,
|
|
[clase_mov] [char](1) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[ptventasgralH] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[ptventasgralH](
|
|
[compania] [smallint] NULL,
|
|
[localidad] [char](50) NULL,
|
|
[tipotransaccion] [char](50) NULL,
|
|
[tipo_ventas] [char](50) NULL,
|
|
[origen_producto] [char](50) NULL,
|
|
[producto] [char](50) NULL,
|
|
[tipoProducto] [nchar](50) NULL,
|
|
[valor_bruto] [decimal](12, 2) NULL,
|
|
[porc_itbi] [decimal](12, 2) NULL,
|
|
[descuento] [decimal](12, 2) NULL,
|
|
[itbis] [decimal](12, 2) NULL,
|
|
[factura] [int] NULL,
|
|
[conduce] [int] NULL,
|
|
[documentodev] [int] NULL,
|
|
[documentocxc] [int] NULL,
|
|
[observaciones] [nchar](60) NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[cond_pago] [smallint] NULL,
|
|
[descrip_p] [char](50) NULL,
|
|
[fecha] [date] NULL,
|
|
[numero_mes] [smallint] NULL,
|
|
[ano] [char](50) NULL,
|
|
[mes] [char](50) NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[nombre_cliente] [char](80) NULL,
|
|
[rnc] [char](50) NULL,
|
|
[orden] [int] NULL,
|
|
[sec_vend] [int] NULL,
|
|
[nombrev] [char](50) NULL,
|
|
[apellidov] [char](50) NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[descripcionp] [char](100) NULL,
|
|
[unidadmed] [char](50) NULL,
|
|
[cantidad] [decimal](12, 4) NULL,
|
|
[precio] [decimal](12, 2) NULL,
|
|
[material] [decimal](12, 5) NULL,
|
|
[labor] [decimal](12, 5) NULL,
|
|
[gasto] [decimal](12, 5) NULL,
|
|
[valormaterial] [decimal](12, 5) NULL,
|
|
[valorlabor] [decimal](12, 5) NULL,
|
|
[valorgasto] [decimal](12, 5) NULL,
|
|
[tasa] [decimal](8, 3) NULL,
|
|
[valorrd] [decimal](12, 2) NULL,
|
|
[descuentord] [decimal](12, 2) NULL,
|
|
[itbisrd] [decimal](12, 2) NULL,
|
|
[netord] [decimal](12, 2) NULL,
|
|
[neto] [decimal](12, 2) NULL,
|
|
[margen] [decimal](12, 2) NULL,
|
|
[transportista] [nchar](80) NULL,
|
|
[pventas] [smallint] NULL,
|
|
[grupo] [nchar](40) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[ptventasgral] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[ptventasgral](
|
|
[compania] [smallint] NULL,
|
|
[localidad] [char](100) NULL,
|
|
[tipotransaccion] [char](100) NULL,
|
|
[tipo_ventas] [char](100) NULL,
|
|
[origen_producto] [char](100) NULL,
|
|
[producto] [char](100) NULL,
|
|
[tipoProducto] [nchar](100) NULL,
|
|
[valor_bruto] [decimal](12, 2) NULL,
|
|
[porc_itbi] [decimal](12, 2) NULL,
|
|
[descuento] [decimal](12, 2) NULL,
|
|
[itbis] [decimal](12, 2) NULL,
|
|
[factura] [int] NULL,
|
|
[conduce] [int] NULL,
|
|
[documentodev] [int] NULL,
|
|
[documentocxc] [int] NULL,
|
|
[observaciones] [nchar](100) NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[cond_pago] [smallint] NULL,
|
|
[descrip_p] [char](100) NULL,
|
|
[fecha] [date] NULL,
|
|
[numero_mes] [smallint] NULL,
|
|
[ano] [char](50) NULL,
|
|
[mes] [char](50) NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[nombre_cliente] [char](100) NULL,
|
|
[rnc] [char](50) NULL,
|
|
[orden] [int] NULL,
|
|
[sec_vend] [int] NULL,
|
|
[nombrev] [char](100) NULL,
|
|
[apellidov] [char](100) NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[descripcionp] [char](180) NULL,
|
|
[unidadmed] [char](50) NULL,
|
|
[cantidad] [decimal](12, 4) NULL,
|
|
[precio] [decimal](12, 2) NULL,
|
|
[material] [decimal](12, 5) NULL,
|
|
[labor] [decimal](12, 5) NULL,
|
|
[gasto] [decimal](12, 5) NULL,
|
|
[valormaterial] [decimal](12, 5) NULL,
|
|
[valorlabor] [decimal](12, 5) NULL,
|
|
[valorgasto] [decimal](12, 5) NULL,
|
|
[tasa] [decimal](8, 3) NULL,
|
|
[valorrd] [decimal](12, 2) NULL,
|
|
[descuentord] [decimal](12, 2) NULL,
|
|
[itbisrd] [decimal](12, 2) NULL,
|
|
[netord] [decimal](12, 2) NULL,
|
|
[neto] [decimal](12, 2) NULL,
|
|
[margen] [decimal](12, 2) NULL,
|
|
[transportista] [nchar](100) NULL,
|
|
[pventas] [smallint] NULL,
|
|
[grupo] [nchar](100) NULL,
|
|
[codigo_zona] [smallint] NULL,
|
|
[zona] [varchar](100) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[cod_provincia] [int] NULL,
|
|
[pais_o_provincia] [varchar](80) NULL,
|
|
[porc_Desc] [decimal](12, 2) NULL,
|
|
[precio_neto] [decimal](12, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[ptordenesgral] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[ptordenesgral](
|
|
[ano] [char](4) NULL,
|
|
[mes] [char](20) NULL,
|
|
[fechaorden] [date] NULL,
|
|
[fechaentrega] [date] NULL,
|
|
[documento] [int] NULL,
|
|
[orden] [char](10) NULL,
|
|
[fechaavance] [date] NULL,
|
|
[monto_avance] [decimal](12, 2) NULL,
|
|
[fechafactura] [date] NULL,
|
|
[clasificacion] [char](20) NULL,
|
|
[origen] [char](20) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[descripcionp] [char](40) NULL,
|
|
[unidadmedida] [char](4) NULL,
|
|
[existencia] [decimal](12, 3) NULL,
|
|
[cantidadorden] [decimal](12, 5) NULL,
|
|
[cantidad] [decimal](12, 5) NULL,
|
|
[unidades] [decimal](12, 5) NULL,
|
|
[precio] [decimal](12, 2) NULL,
|
|
[descuento] [decimal](12, 2) NULL,
|
|
[valor] [decimal](12, 2) NULL,
|
|
[costo_std] [decimal](12, 4) NULL,
|
|
[costo_lq] [decimal](12, 4) NULL,
|
|
[valorcostostd] [decimal](16, 4) NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[nombrecliente] [char](40) NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[nombrevendedor] [char](30) NULL,
|
|
[apellidovend] [char](30) NULL,
|
|
[fechatransac] [date] NULL,
|
|
[tipotrransaccion] [char](40) NULL,
|
|
[estado] [char](30) NULL,
|
|
[observacion] [char](180) NULL,
|
|
[detalle] [char](50) NULL,
|
|
[fechaactualizacion] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prttb00002] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prttb00002](
|
|
[ult_imp] [int] NULL,
|
|
[usuario] [char](50) NULL,
|
|
[fecha] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prttb00001] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prttb00001](
|
|
[codigo] [smallint] NULL,
|
|
[nombre] [char](30) NULL,
|
|
[lpprog] [char](20) NULL,
|
|
[lppipe] [char](1) NULL,
|
|
[puerto] [char](100) NULL,
|
|
[prtcodigo] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00034] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00034](
|
|
[cod_n] [smallint] NULL,
|
|
[tipo_orden] [varchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00033] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00033](
|
|
[num_oc] [int] NULL,
|
|
[fecha_trx] [datetime] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[usuario] [nchar](50) NULL,
|
|
[comentario] [nchar](100) NULL,
|
|
[actualiza] [nvarchar](2) NULL,
|
|
[fecha_compromiso] [date] NULL,
|
|
[id] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00032] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00032](
|
|
[num_oc] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[accion] [nchar](20) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[comando] [nchar](200) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00031] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00031](
|
|
[num_oc] [int] NOT NULL,
|
|
[cotizacion_no] [int] NOT NULL,
|
|
[id_kit] [int] NOT NULL,
|
|
[secuencia] [smallint] NOT NULL,
|
|
[area] [int] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad] [int] NOT NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00030] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00030](
|
|
[num_oc] [int] NOT NULL,
|
|
[departamento] [smallint] NOT NULL,
|
|
[num_emp] [int] NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
CONSTRAINT [PK_prtb00030] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_oc] ASC,
|
|
[departamento] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00029] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00029](
|
|
[num_oc] [int] NULL,
|
|
[ruta_file_original] [nchar](200) NULL,
|
|
[ruta_file_srv] [nchar](200) NULL,
|
|
[url_file_destino] [nchar](200) NULL,
|
|
[nombre_file] [nchar](100) NULL,
|
|
[tipo_file] [nchar](20) NULL,
|
|
[num_doc] [int] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[id] [int] NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[documento] [varbinary](max) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00028] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00028](
|
|
[num_oc] [int] NOT NULL,
|
|
[fecha_compromiso] [date] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad] [decimal](12, 4) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
CONSTRAINT [PK_prtb00028] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_oc] ASC,
|
|
[fecha_compromiso] ASC,
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00027] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00027](
|
|
[num_autoriza] [int] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [numeric](12, 3) NULL,
|
|
[monto] [numeric](12, 3) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00026] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00026](
|
|
[num_autoriza] [int] NULL,
|
|
[observacion] [char](50) NULL,
|
|
[num_oc] [int] NULL,
|
|
[num_doc] [int] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[descrip_mov] [char](30) NULL,
|
|
[fecha_oc] [smalldatetime] NULL,
|
|
[fecha_autoriza] [smalldatetime] NULL,
|
|
[usuario] [char](50) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00025] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00025](
|
|
[num_oc] [int] NULL,
|
|
[fecha] [smalldatetime] NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[nombre] [char](60) NULL,
|
|
[valor] [numeric](16, 0) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[us_autoriza] [char](40) NULL,
|
|
[fecha_autorizacion] [smalldatetime] NULL,
|
|
[estado] [char](2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00024] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00024](
|
|
[num_oc] [int] NULL,
|
|
[us_crea] [char](40) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00023] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00023](
|
|
[num_oc] [int] NULL,
|
|
[secuencia] [int] NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad_1] [numeric](12, 5) NULL,
|
|
[cantidad] [numeric](12, 5) NULL,
|
|
[id_kit] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00022] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00022](
|
|
[etiqueta] [char](20) NOT NULL,
|
|
[num_oc] [int] NULL,
|
|
[secuencia] [smallint] NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[lado_1] [numeric](12, 5) NULL,
|
|
[lado_2] [numeric](12, 5) NULL,
|
|
[lado_3] [numeric](12, 5) NULL,
|
|
[cantidad] [numeric](12, 5) NULL,
|
|
[medida] [numeric](12, 5) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00021] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00021](
|
|
[ano] [char](4) NULL,
|
|
[dia] [char](20) NULL,
|
|
[mes] [char](20) NULL,
|
|
[semana] [char](25) NULL,
|
|
[fecha] [date] NULL,
|
|
[documento] [int] NULL,
|
|
[codigosemi] [int] NULL,
|
|
[descripcionsemi] [char](30) NULL,
|
|
[uniadmed] [char](4) NULL,
|
|
[codigodepto] [smallint] NULL,
|
|
[nombredto] [char](30) NULL,
|
|
[ficha] [smallint] NULL,
|
|
[nombre] [char](25) NULL,
|
|
[apellido] [char](25) NULL,
|
|
[normalesd] [decimal](8, 2) NULL,
|
|
[normalesind] [decimal](8, 2) NULL,
|
|
[extrasdirecta] [decimal](8, 2) NULL,
|
|
[extrasind] [decimal](8, 2) NULL,
|
|
[cantidad] [decimal](12, 5) NULL,
|
|
[bloque] [char](25) NULL,
|
|
[cantidadprep] [decimal](12, 5) NULL,
|
|
[grupodepto] [char](30) NULL,
|
|
[costo] [decimal](12, 5) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00020] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00020](
|
|
[num_oc] [int] NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00019] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00019](
|
|
[ano] [char](4) NULL,
|
|
[mes] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[cantidad] [decimal](12, 5) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00018] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00018](
|
|
[num_oc] [smallint] NULL,
|
|
[detalle] [char](100) NULL,
|
|
[fecha_entrada] [smalldatetime] NULL,
|
|
[fecha_realizacion] [smalldatetime] NULL,
|
|
[fecha_inicial] [smalldatetime] NULL,
|
|
[fecha_final] [smalldatetime] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00017] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00017](
|
|
[num_oc] [int] NOT NULL,
|
|
[fecha_mensaje] [smalldatetime] NOT NULL,
|
|
[usuario] [char](40) NULL,
|
|
[usuario_lee] [char](40) NULL,
|
|
[fecha_leido] [smalldatetime] NULL,
|
|
[tema] [char](255) NOT NULL,
|
|
[mensaje] [char](255) NOT NULL,
|
|
[leido] [char](1) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00016] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00016](
|
|
[area_num] [smallint] NOT NULL,
|
|
[nombre_area] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00015] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00015](
|
|
[num_oc] [int] NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [numeric](12, 5) NULL,
|
|
[fecha] [smalldatetime] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00014] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00014](
|
|
[num_oc] [int] NULL,
|
|
[observacion] [char](180) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00013] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00013](
|
|
[num_oc] [int] NULL,
|
|
[secuencia] [smallint] NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[altura_zocalo] [numeric](8, 2) NULL,
|
|
[terminacion] [char](1) NULL,
|
|
[bisel] [char](4) NULL,
|
|
[precio] [numeric](10, 2) NULL,
|
|
[cantidad] [numeric](12, 5) NULL,
|
|
[descuento] [numeric](10, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[fecha_compromiso] [date] NULL,
|
|
[estado_produccion] [varchar](100) NULL,
|
|
[observacion] [nchar](100) NULL,
|
|
[id_kit] [int] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[costo] [decimal](12, 5) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00012] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00012](
|
|
[ventas] [char](1) NULL,
|
|
[cotizacion_no] [int] NULL,
|
|
[num_oc] [int] NOT NULL,
|
|
[fecha_oc] [date] NOT NULL,
|
|
[nombre_file] [char](15) NOT NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[tipo_cliente] [smallint] NOT NULL,
|
|
[sec_cliente] [smallint] NOT NULL,
|
|
[direccion] [char](80) NULL,
|
|
[telefono] [char](20) NULL,
|
|
[fax] [char](20) NULL,
|
|
[fecha_entrega] [date] NULL,
|
|
[cond_pago] [smallint] NULL,
|
|
[cantidad_i] [numeric](8, 2) NULL,
|
|
[precio_i] [numeric](8, 2) NULL,
|
|
[cantidad_mo] [numeric](10, 2) NULL,
|
|
[precio_mo] [numeric](10, 2) NULL,
|
|
[transporte] [numeric](10, 2) NULL,
|
|
[itbis] [numeric](10, 2) NULL,
|
|
[ubicacion] [varchar](170) NULL,
|
|
[cerrada] [char](1) NULL,
|
|
[fecha_cierre] [date] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[observacion] [nchar](100) NULL,
|
|
[nombre_file2] [nchar](100) NULL,
|
|
[tipo_orden] [varchar](50) NULL,
|
|
[num_emp_inst] [int] NULL,
|
|
CONSTRAINT [PK_prtb00012] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_oc] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00011] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00011](
|
|
[cotiza_no] [int] NULL,
|
|
[cot_n] [smallint] NULL,
|
|
[cot_grupo] [smallint] NULL,
|
|
[cot_tipo] [smallint] NULL,
|
|
[cot_sec] [smallint] NULL,
|
|
[precio] [numeric](12, 2) NULL,
|
|
[porc_desc] [numeric](8, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[us_month] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00010] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00010](
|
|
[cotiza_no] [int] NULL,
|
|
[fecha] [smalldatetime] NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[obra] [char](60) NULL,
|
|
[atencion] [char](60) NULL,
|
|
[cond_pago] [smallint] NULL,
|
|
[sec_vent] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[us_month] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00009] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00009](
|
|
[num_oc] [int] NULL,
|
|
[fecha] [date] NULL,
|
|
[fecha_fabricacion] [date] NULL,
|
|
[pendiente] [char](1) NULL,
|
|
[detalle] [char](300) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime2](7) NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime2](7) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00008] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00008](
|
|
[num_oc] [int] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad] [numeric](12, 3) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00007] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00007](
|
|
[num_oc] [int] NOT NULL,
|
|
[fecha] [smalldatetime] NOT NULL,
|
|
[fecha_termina] [smalldatetime] NULL,
|
|
[tipo_cliente] [smallint] NOT NULL,
|
|
[sec_cliente] [smallint] NOT NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[orden_pedido] [int] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [numeric](12, 3) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00006] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00006](
|
|
[cod_prod] [int] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[fact_conv] [numeric](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00005] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00005](
|
|
[codigo] [smallint] NULL,
|
|
[descripcion] [char](40) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00004] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00004](
|
|
[tipo] [char](3) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00003] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00003](
|
|
[num_semana] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[fecha] [smalldatetime] NULL,
|
|
[hn_ind] [numeric](5, 2) NULL,
|
|
[he_ind] [numeric](5, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00002] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00002](
|
|
[num_semana] [smallint] NULL,
|
|
[ano] [char](4) NULL,
|
|
[mes] [smallint] NULL,
|
|
[semana_del] [smalldatetime] NULL,
|
|
[semana_al] [smalldatetime] NULL,
|
|
[descripcion] [char](50) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prtb00001] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prtb00001](
|
|
[ano] [char](4) NULL,
|
|
[mes] [char](2) NULL,
|
|
[tasa] [numeric](8, 2) NULL,
|
|
[concepto] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prordenstatus] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prordenstatus](
|
|
[fecha_trx] [datetime] NULL,
|
|
[num_oc] [int] NULL,
|
|
[cerrada] [nchar](10) NULL,
|
|
[fecha_compromiso] [nchar](10) NULL,
|
|
[observacion] [varchar](100) NULL,
|
|
[usuario] [nchar](50) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[departamento] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prordenlog] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[prordenlog](
|
|
[num_oc] [char](20) NULL,
|
|
[documento] [int] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [numeric](12, 5) NULL,
|
|
[fecha] [smalldatetime] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[cantidad_p] [numeric](12, 5) NULL,
|
|
[diferencia] [numeric](12, 5) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[product] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[product](
|
|
[productid] [char](10) NOT NULL,
|
|
[catid] [char](10) NOT NULL,
|
|
[prodname] [char](80) NULL,
|
|
[proddesc] [char](255) NULL,
|
|
[prodpic] [char](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[preciosc] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[preciosc](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_Sec] [smallint] NULL,
|
|
[precio] [decimal](18, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[precios] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[precios](
|
|
[ventas] [varchar](50) NULL,
|
|
[cod_n] [varchar](50) NULL,
|
|
[cod_grupo] [varchar](50) NULL,
|
|
[cod_tipo] [varchar](50) NULL,
|
|
[cod_sec] [varchar](50) NULL,
|
|
[precios] [varchar](50) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[descripcion] [varchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[prdtable] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[prdtable](
|
|
[ano] [smallint] NULL,
|
|
[mes] [smallint] NULL,
|
|
[fecha_inicio] [datetime] NULL,
|
|
[fecha_corte] [datetime] NULL,
|
|
[dias_habiles] [smallint] NULL,
|
|
[dias_gracia] [smallint] NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[permisos] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[permisos](
|
|
[cod_perfil] [varchar](50) NULL,
|
|
[Column 1] [varchar](50) NULL,
|
|
[Column 2] [varchar](50) NULL,
|
|
[Column 3] [varchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[pda5] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[pda5](
|
|
[idtrx] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_seccion] [smallint] NULL,
|
|
[cod_tramo] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](12, 4) NULL,
|
|
[balance] [decimal](12, 4) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[lado_1] [decimal](12, 4) NULL,
|
|
[lado_2] [decimal](12, 4) NULL,
|
|
[lado_3] [decimal](12, 4) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[orderstatus] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[orderstatus](
|
|
[orderid] [int] NOT NULL,
|
|
[linenum] [int] NOT NULL,
|
|
[mdate] [datetime] NOT NULL,
|
|
[status] [char](2) NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[orders] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[orders](
|
|
[orderid] [int] NOT NULL,
|
|
[userid] [char](80) NOT NULL,
|
|
[orderdate] [datetime] NOT NULL,
|
|
[shipfirstname] [char](80) NOT NULL,
|
|
[shiplastname] [char](80) NOT NULL,
|
|
[shipaddr1] [char](80) NOT NULL,
|
|
[shipaddr2] [char](80) NULL,
|
|
[shipcity] [char](80) NOT NULL,
|
|
[shipstate] [char](80) NULL,
|
|
[shipzip] [char](20) NOT NULL,
|
|
[shipcountry] [char](3) NOT NULL,
|
|
[billfirstname] [char](80) NOT NULL,
|
|
[billlastname] [char](80) NOT NULL,
|
|
[billaddr1] [char](80) NOT NULL,
|
|
[billaddr2] [char](80) NULL,
|
|
[billcity] [char](80) NOT NULL,
|
|
[billstate] [char](80) NULL,
|
|
[billzip] [char](20) NOT NULL,
|
|
[billcountry] [char](3) NOT NULL,
|
|
[totalprice] [decimal](10, 2) NOT NULL,
|
|
[creditcard] [char](80) NULL,
|
|
[exprdate] [char](7) NULL,
|
|
[cardtype] [char](80) NULL,
|
|
[sourceapp] [char](3) NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[ntb00005] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[ntb00005](
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[descrip_mov] [nvarchar](40) NULL,
|
|
[status_mov] [nvarchar](1) NULL,
|
|
[cuenta_1] [nvarchar](8) NULL,
|
|
[cuenta_2] [nvarchar](8) NULL,
|
|
[cuenta_3] [nvarchar](8) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[notbingresos] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[notbingresos](
|
|
[num_emp] [smallint] NULL,
|
|
[monto] [decimal](12, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[notbcuenta] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notbcuenta](
|
|
[num_emp] [smallint] NULL,
|
|
[cuenta_no] [char](25) NULL,
|
|
[valor] [decimal](12, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb03] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb03](
|
|
[num_emp] [smallint] NOT NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[valor] [decimal](10, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
CONSTRAINT [PK_notb003] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_emp] ASC,
|
|
[cod_mov] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb0019] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb0019](
|
|
[num_nomi] [smallint] NULL,
|
|
[tipo_emp] [char](1) NULL,
|
|
[cheque_no_ini] [int] NULL,
|
|
[cheque_no_fin] [int] NULL,
|
|
[cuenta_no] [char](8) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00033] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00033](
|
|
[num_nomi] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[fecha_liquidacion] [datetime] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[sueldo_actual] [decimal](12, 2) NULL,
|
|
[sueldo_promedio] [decimal](12, 2) NULL,
|
|
[salario_dia] [decimal](12, 2) NULL,
|
|
[anos_empresa] [smallint] NULL,
|
|
[meses_empresa] [smallint] NULL,
|
|
[dias_empresa] [smallint] NULL,
|
|
[dias_cesantia] [smallint] NULL,
|
|
[dias_preaviso] [smallint] NULL,
|
|
[dias_vacaciones] [smallint] NULL,
|
|
[ultimas_vacaciones] [datetime] NULL,
|
|
[tiempo_empresa] [decimal](6, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00023] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00023](
|
|
[numero_nomina] [smallint] NULL,
|
|
[tipo_emp] [char](1) NULL,
|
|
[fecha] [date] NULL,
|
|
[monto_excento] [decimal](12, 2) NULL,
|
|
[porc_15] [decimal](12, 2) NULL,
|
|
[porc_20] [decimal](12, 2) NULL,
|
|
[porc_25] [decimal](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fecha_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fecha_mod] [smalldatetime] NULL,
|
|
[monto_ars] [decimal](12, 2) NULL,
|
|
[monto_afp] [decimal](12, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00021] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00021](
|
|
[num_nomi] [smallint] NULL,
|
|
[tipo_emp] [char](1) NULL,
|
|
[cheque_no_ini] [int] NULL,
|
|
[cheque_no_fin] [int] NULL,
|
|
[cuenta_no] [char](8) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00020] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00020](
|
|
[cuenta_no] [char](8) NULL,
|
|
[cheque_no] [int] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[portador] [char](30) NULL,
|
|
[tasa] [decimal](8, 2) NULL,
|
|
[monto] [decimal](12, 2) NULL,
|
|
[status_impresion] [char](1) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00019] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00019](
|
|
[num_nomi] [smallint] NULL,
|
|
[tipo_emp] [char](1) NULL,
|
|
[cheque_no_ini] [int] NULL,
|
|
[cheque_no_fin] [int] NULL,
|
|
[cuenta_no] [char](8) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00018] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00018](
|
|
[num_emp] [smallint] NULL,
|
|
[porc_accidente] [decimal](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00017] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00017](
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00016] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00016](
|
|
[num_nomi] [int] NULL,
|
|
[tipo_emp] [char](1) NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[valor] [decimal](10, 2) NULL,
|
|
[clase_mov] [char](1) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00015] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00015](
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[num_doc] [int] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[monto] [decimal](10, 2) NULL,
|
|
[porciento] [decimal](5, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00014] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00014](
|
|
[cod_mov] [smallint] NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00013] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00013](
|
|
[cod_mov] [smallint] NULL,
|
|
[cod_mov_a] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00012] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00012](
|
|
[cod_mes] [smallint] NULL,
|
|
[dias] [smallint] NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00011] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00011](
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[num_doc] [int] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[fecha] [date] NULL,
|
|
[monto] [decimal](10, 2) NULL,
|
|
[porciento] [decimal](5, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00010] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00010](
|
|
[tipo_emp] [char](1) NOT NULL,
|
|
[h_normal] [decimal](8, 2) NULL,
|
|
[num_nomi] [int] NOT NULL,
|
|
[mes] [smallint] NULL,
|
|
[ano] [smallint] NOT NULL,
|
|
[num_sem] [smallint] NULL,
|
|
[fecha_del] [date] NULL,
|
|
[fecha_al] [date] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[fecha_cierre_nomina] [date] NULL,
|
|
CONSTRAINT [PK_notb00010] PRIMARY KEY CLUSTERED
|
|
(
|
|
[tipo_emp] ASC,
|
|
[num_nomi] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00009] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00009](
|
|
[num_nomi] [int] NULL,
|
|
[tipo_emp] [char](1) NULL,
|
|
[cheque_no] [smallint] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[monto] [decimal](10, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00008] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00008](
|
|
[num_nomi] [int] NULL,
|
|
[tipo_emp] [char](1) NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[valor] [decimal](10, 2) NULL,
|
|
[clase_mov] [char](1) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00007] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00007](
|
|
[num_nomi] [smallint] NULL,
|
|
[tipo_emp] [char](1) NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[valor] [decimal](10, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[num_trx] [int] NULL,
|
|
[cod_mto] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00006] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00006](
|
|
[salario_sem_desde] [decimal](10, 2) NULL,
|
|
[salario_sem_hasta] [decimal](10, 2) NULL,
|
|
[salario_men_desde] [decimal](10, 2) NULL,
|
|
[salario_men_hasta] [decimal](10, 2) NULL,
|
|
[porc_emp] [decimal](10, 2) NULL,
|
|
[porc_pat] [decimal](10, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00005] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00005](
|
|
[salario] [decimal](12, 2) NULL,
|
|
[valor] [decimal](12, 2) NULL,
|
|
[porc_imp] [decimal](8, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00003] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00003](
|
|
[num_emp] [smallint] NOT NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[valor] [decimal](10, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
CONSTRAINT [PK_notb00003] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_emp] ASC,
|
|
[cod_mov] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00002] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00002](
|
|
[cod_mov] [smallint] NULL,
|
|
[descrip_mov] [char](30) NULL,
|
|
[primer_enc] [char](8) NULL,
|
|
[segundo_enc] [char](8) NULL,
|
|
[tercer_enc] [char](8) NULL,
|
|
[ch_encabeza] [char](10) NULL,
|
|
[tipo_mov] [char](1) NULL,
|
|
[clase_mov] [char](1) NULL,
|
|
[afecta_tss] [nchar](10) NULL,
|
|
[cantidad_cia] [decimal](10, 2) NULL,
|
|
[cantidad_emp] [decimal](10, 2) NULL,
|
|
[cta_control] [char](8) NULL,
|
|
[cta_aux] [char](8) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[modifica] [nchar](2) NULL,
|
|
[vacaciones] [nchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[notb00001] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[notb00001](
|
|
[ult_cheque] [int] NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[NC] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[NC](
|
|
[cuenta_no] [char](8) NULL,
|
|
[cod_cia] [smallint] NULL,
|
|
[tipo_doc] [char](2) NULL,
|
|
[num_doc] [int] NOT NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[cod_emp] [smallint] NULL,
|
|
[cod_emp_sec] [smallint] NULL,
|
|
[fecha_orig] [date] NULL,
|
|
[fecha_ven] [date] NULL,
|
|
[aplica_a] [int] NULL,
|
|
[banco] [smallint] NULL,
|
|
[num_cheque] [char](12) NULL,
|
|
[valor] [decimal](12, 2) NOT NULL,
|
|
[valor_efectivo] [decimal](12, 2) NULL,
|
|
[valor_cheque] [decimal](12, 2) NULL,
|
|
[costo] [decimal](12, 2) NULL,
|
|
[monto_desc] [decimal](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[msgtable] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[msgtable](
|
|
[cod_msg] [smallint] NULL,
|
|
[desc_msg] [char](60) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[molduras23] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[molduras23](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [varchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[mestable] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[mestable](
|
|
[mes] [smallint] NULL,
|
|
[descrip] [char](10) NULL,
|
|
[dias_prod] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[MARZO$] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[MARZO$](
|
|
[mes] [float] NULL,
|
|
[ano] [float] NULL,
|
|
[codprod] [float] NULL,
|
|
[cantidad] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[mallas9] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[mallas9](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_Sec] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[Localizacion] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[Localizacion](
|
|
[SucID] [nvarchar](10) NOT NULL,
|
|
[LocID] [int] NOT NULL,
|
|
[LocDescripcion] [nvarchar](60) NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[listaprecio] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[listaprecio](
|
|
[cod_n] [float] NULL,
|
|
[cod_grupo] [float] NULL,
|
|
[cod_tipo] [float] NULL,
|
|
[cod_sec] [float] NULL,
|
|
[descripcion] [nvarchar](255) NULL,
|
|
[costo_prima] [float] NULL,
|
|
[costo_rd] [float] NULL,
|
|
[costo_estand] [float] NULL,
|
|
[dif_costo_estand] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[lineitem] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[lineitem](
|
|
[orderid] [int] NOT NULL,
|
|
[linenum] [int] NOT NULL,
|
|
[itemid] [char](10) NOT NULL,
|
|
[quantity] [int] NOT NULL,
|
|
[unitprice] [decimal](10, 2) NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[lajas2$] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[lajas2$](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_Sec] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[lajas2] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[lajas2](
|
|
[cod_n] [float] NULL,
|
|
[cod_grupo] [float] NULL,
|
|
[cod_tipo] [float] NULL,
|
|
[cod_Sec] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[lajas14] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[lajas14](
|
|
[cod_n] [float] NULL,
|
|
[cod_grupo] [float] NULL,
|
|
[cod_tipo] [float] NULL,
|
|
[cod_sec] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[lajas] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[lajas](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_Sec] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[item] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[item](
|
|
[itemid] [char](10) NOT NULL,
|
|
[productid] [char](10) NOT NULL,
|
|
[listprice] [decimal](10, 2) NULL,
|
|
[unitcost] [decimal](10, 2) NULL,
|
|
[supplier] [int] NULL,
|
|
[status] [char](2) NULL,
|
|
[attr1] [char](80) NULL,
|
|
[attr2] [char](80) NULL,
|
|
[attr3] [char](80) NULL,
|
|
[attr4] [char](80) NULL,
|
|
[attr5] [char](80) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[istb00006] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[istb00006](
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha] [date] NULL,
|
|
[fact_no] [char](10) NULL,
|
|
[conduce_no] [char](10) NULL,
|
|
[orden_compra] [int] NULL,
|
|
[tipo] [char](2) NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad_1] [decimal](10, 2) NULL,
|
|
[cantidad_2] [decimal](10, 2) NULL,
|
|
[depto_de] [smallint] NULL,
|
|
[depto_a] [smallint] NULL,
|
|
[cond_recep] [char](1) NULL,
|
|
[uso_tiempo] [char](1) NULL,
|
|
[bodega] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[istb00002] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[istb00002](
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[descrip_esp] [varchar](100) NULL,
|
|
[unidad_med] [varchar](4) NULL,
|
|
[pto_reorden] [decimal](10, 2) NULL,
|
|
[existencia] [decimal](10, 2) NULL,
|
|
[cod_nab] [char](11) NULL,
|
|
[base] [decimal](10, 2) NULL,
|
|
[bodega] [smallint] NULL,
|
|
[categoria] [char](1) NULL,
|
|
[dia_llegada] [smallint] NULL,
|
|
[gravamen] [decimal](5, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[rowid] [int] IDENTITY(1,1) NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00042] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00042](
|
|
[num_doc] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](18, 4) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00041] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00041](
|
|
[fecha_act] [datetime] NULL,
|
|
[idtrx] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[balance] [decimal](12, 2) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00040] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00040](
|
|
[fecha_act] [datetime] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[balance] [decimal](12, 2) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00030] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00030](
|
|
[cod_grupo] [smallint] NULL,
|
|
[descripcion] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00029] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00029](
|
|
[departamento] [smallint] NULL,
|
|
[maquina] [smallint] NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00027] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00027](
|
|
[fecha_r] [datetime] NOT NULL,
|
|
[cod_n_r] [smallint] NOT NULL,
|
|
[cod_grupo_r] [smallint] NOT NULL,
|
|
[cod_tipo_r] [smallint] NOT NULL,
|
|
[cod_sec_r] [smallint] NOT NULL,
|
|
[cod_n_m] [smallint] NOT NULL,
|
|
[cod_grupo_m] [smallint] NOT NULL,
|
|
[cod_tipo_m] [smallint] NOT NULL,
|
|
[cod_sec_m] [smallint] NOT NULL,
|
|
[cantidad_m] [decimal](10, 2) NOT NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00018] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00018](
|
|
[cod_mov] [int] NULL,
|
|
[usuario] [nvarchar](9) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00017] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00017](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[semana_del] [datetime] NULL,
|
|
[semana_al] [datetime] NULL,
|
|
[exis_act] [decimal](10, 2) NULL,
|
|
[exis_fisica] [decimal](10, 2) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00016] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00016](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[categoria] [nvarchar](1) NULL,
|
|
[mes_ch] [datetime] NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00014] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00014](
|
|
[num_salida] [int] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00013] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00013](
|
|
[mes_ini] [smallint] NULL,
|
|
[mes_fin] [smallint] NULL,
|
|
[ano] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[costo_st] [decimal](12, 2) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
CONSTRAINT [PK_irtb00013] PRIMARY KEY CLUSTERED
|
|
(
|
|
[ano] ASC,
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00012] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00012](
|
|
[idtrx] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_seccion] [smallint] NULL,
|
|
[cod_tramo] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[balance] [decimal](12, 2) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00011] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00011](
|
|
[fecha] [datetime] NOT NULL,
|
|
[bodega] [smallint] NOT NULL,
|
|
[cod_seccion] [smallint] NOT NULL,
|
|
[cod_tramo] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad] [decimal](10, 2) NOT NULL,
|
|
[balance] [decimal](12, 2) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00010] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00010](
|
|
[codigo] [int] NULL,
|
|
[nombre] [nvarchar](30) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00009] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00009](
|
|
[codigo] [smallint] NULL,
|
|
[nombre] [nvarchar](25) NULL,
|
|
[unidad_med] [nvarchar](3) NULL,
|
|
[modelo] [nvarchar](15) NULL,
|
|
[serie] [nvarchar](15) NULL,
|
|
[fabricante] [nvarchar](45) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00008] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00008](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cod_maq] [smallint] NULL,
|
|
[numero] [nvarchar](20) NULL,
|
|
[serie] [nvarchar](20) NULL,
|
|
[distribuidor] [nvarchar](30) NULL,
|
|
[fabricante] [nvarchar](50) NULL,
|
|
[localizacion] [nvarchar](50) NULL,
|
|
[material] [nvarchar](20) NULL,
|
|
[dureza] [nvarchar](10) NULL,
|
|
[motor_elec] [smallint] NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00007] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00007](
|
|
[codigo_m] [smallint] NULL,
|
|
[frame] [nvarchar](10) NULL,
|
|
[numero] [nvarchar](15) NULL,
|
|
[fase_m] [smallint] NULL,
|
|
[serie] [nvarchar](20) NULL,
|
|
[rpm_m] [int] NULL,
|
|
[hp_m] [nvarchar](7) NULL,
|
|
[voltaje] [nvarchar](7) NULL,
|
|
[amperaje] [nvarchar](7) NULL,
|
|
[ciclo] [int] NULL,
|
|
[tipo] [nvarchar](10) NULL,
|
|
[modelo] [nvarchar](15) NULL,
|
|
[marca] [nvarchar](20) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00006] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00006](
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha] [datetime] NOT NULL,
|
|
[fact_no] [nvarchar](10) NULL,
|
|
[conduce_no] [nvarchar](10) NULL,
|
|
[tipo] [nvarchar](2) NULL,
|
|
[orden_compra] [int] NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[maquina] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad_1] [decimal](10, 2) NULL,
|
|
[cantidad_2] [decimal](10, 2) NULL,
|
|
[sec_de] [smallint] NULL,
|
|
[sec_a] [smallint] NULL,
|
|
[status_mov] [nvarchar](1) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[bodega] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00005] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00005](
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[descrip_mov] [nvarchar](40) NULL,
|
|
[status_mov] [nvarchar](1) NULL,
|
|
[cuenta_1] [nvarchar](8) NULL,
|
|
[cuenta_2] [nvarchar](8) NULL,
|
|
[cuenta_3] [nvarchar](8) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00002] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00002](
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[descrip_esp] [char](80) NULL,
|
|
[descrip_ing] [char](80) NULL,
|
|
[unidad_med] [char](3) NULL,
|
|
[existencia] [numeric](10, 2) NULL,
|
|
[exist_min] [numeric](10, 2) NULL,
|
|
[dia_llegada] [smallint] NULL,
|
|
[categoria] [char](1) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[codid] [int] IDENTITY(1,1) NOT NULL,
|
|
CONSTRAINT [PK_irtb00002] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[irtb00001] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[irtb00001](
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[descrip_esp] [char](30) NOT NULL,
|
|
[descrip_ing] [char](30) NULL,
|
|
[unidad_med] [char](3) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[ircodigos] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[ircodigos](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cuenta] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptbexistencia] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptbexistencia](
|
|
[ID] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[num_doc] [int] NULL,
|
|
[cantidad] [decimal](12, 5) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_crea] [nchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb025] Script Date: 02/07/2019 14:49:19 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb025](
|
|
[etiqueta] [char](20) NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[num_doc] [int] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[lado_1] [numeric](12, 5) NULL,
|
|
[lado_2] [numeric](12, 5) NULL,
|
|
[lado_3] [numeric](12, 5) NULL,
|
|
[cantidad] [numeric](12, 5) NULL,
|
|
[medida] [numeric](12, 5) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00050] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00050](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[observacion] [varchar](200) NULL,
|
|
[imagen] [varbinary](max) NULL,
|
|
[rowid] [int] IDENTITY(1,1) NOT NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [varchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00049] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00049](
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha] [date] NOT NULL,
|
|
[cotizacion_no] [int] NOT NULL,
|
|
[fecha_vencimiento] [date] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad] [decimal](18, 2) NOT NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00048] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00048](
|
|
[bodega] [smallint] NOT NULL,
|
|
[usuario] [nchar](50) NOT NULL,
|
|
CONSTRAINT [PK_iptb00048] PRIMARY KEY CLUSTERED
|
|
(
|
|
[bodega] ASC,
|
|
[usuario] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00047] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00047](
|
|
[id_ficha] [int] NULL,
|
|
[instalacion] [varchar](max) NULL,
|
|
[secuencia] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Instalacion' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'iptb00047'
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00046] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00046](
|
|
[id_ficha] [int] NULL,
|
|
[foto_producto] [nchar](200) NULL,
|
|
[secuencia] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Foto Ficha Producto' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'iptb00046'
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00045] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00045](
|
|
[id_ficha] [int] NULL,
|
|
[caracteristicas] [varbinary](max) NULL,
|
|
[secuencia] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Caracteristica' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'iptb00045'
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00044] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00044](
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_provincia] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[tipo] [nchar](30) NULL,
|
|
[id_ficha] [int] NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crera] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Maestra Ficha Tecnica Producto' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'iptb00044'
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00043] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00043](
|
|
[num_doc] [int] NULL,
|
|
[usuario] [nchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00042] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00042](
|
|
[num_doc] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](18, 4) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00041] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00041](
|
|
[fecha_act] [datetime] NULL,
|
|
[idtrx] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[balance] [decimal](12, 2) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00040] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00040](
|
|
[fecha_act] [datetime] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[balance] [decimal](12, 2) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00035] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00035](
|
|
[cod_cat] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00034] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00034](
|
|
[cod_categoria] [smallint] NOT NULL,
|
|
[descripcion] [varchar](100) NULL,
|
|
CONSTRAINT [PK_iptb00034] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_categoria] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00033] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00033](
|
|
[cod_cia] [smallint] NULL,
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha] [smalldatetime] NOT NULL,
|
|
[fact_no] [char](10) NULL,
|
|
[conduce_no] [char](10) NULL,
|
|
[tipo] [char](2) NULL,
|
|
[orden_compra] [int] NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[cod_transp] [smallint] NULL,
|
|
[sec_transp] [smallint] NULL,
|
|
[placa] [char](10) NULL,
|
|
[cod_tarifa] [smallint] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[detalle] [char](60) NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad_1] [int] NULL,
|
|
[cantidad_2] [int] NOT NULL,
|
|
[cond_recep] [char](1) NULL,
|
|
[uso_tiempo] [char](1) NULL,
|
|
[bodega] [smallint] NOT NULL,
|
|
[bodega_d] [smallint] NOT NULL,
|
|
[status_t] [char](1) NULL,
|
|
[costo] [decimal](18, 3) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00032] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00032](
|
|
[documento] [int] NOT NULL,
|
|
[fecha] [date] NOT NULL,
|
|
[usuario] [nchar](80) NOT NULL,
|
|
CONSTRAINT [PK_iptb00032] PRIMARY KEY CLUSTERED
|
|
(
|
|
[documento] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00031] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00031](
|
|
[cod_sec] [smallint] NULL,
|
|
[descripcion] [char](30) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00030] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00030](
|
|
[cod_Sec] [smallint] NOT NULL,
|
|
[descripcion] [char](50) NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
CONSTRAINT [PK_iptb00030] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_Sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00029] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00029](
|
|
[cod_grupo] [smallint] NULL,
|
|
[descripcion] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00028] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00028](
|
|
[cod_mov] [smallint] NULL,
|
|
[num_doc] [int] NULL,
|
|
[cod_mov1] [smallint] NULL,
|
|
[entrada] [int] NULL,
|
|
[bodega] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00027] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00027](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00026] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00026](
|
|
[cod_mov] [smallint] NULL,
|
|
[num_doc] [int] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[bodega] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00025] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00025](
|
|
[etiqueta] [char](20) NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[num_doc] [int] NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[lado_1] [numeric](12, 5) NULL,
|
|
[lado_2] [numeric](12, 5) NULL,
|
|
[lado_3] [numeric](12, 5) NULL,
|
|
[cantidad] [numeric](12, 5) NULL,
|
|
[medida] [numeric](12, 5) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[id_etiqueda] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00024] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00024](
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[descripcion] [nvarchar](30) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[cod_inv] [smallint] NULL,
|
|
CONSTRAINT [PK_iptb00024] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_tipo] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00022] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00022](
|
|
[cod_cia] [smallint] NULL,
|
|
[descripcion] [char](20) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[cuenta_no] [char](8) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00021] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00021](
|
|
[cod_cia] [int] NOT NULL,
|
|
[nombre_cia] [char](20) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00020] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00020](
|
|
[cod_n] [int] NOT NULL,
|
|
[producto] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[cod_inv] [smallint] NULL,
|
|
[comentario] [nchar](80) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00019] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00019](
|
|
[marca] [smallint] NULL,
|
|
[nombre_marca] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](20) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00017] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00017](
|
|
[cod_cia] [smallint] NULL,
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha] [smalldatetime] NULL,
|
|
[fact_no] [char](10) NULL,
|
|
[conduce_no] [char](10) NULL,
|
|
[tipo] [char](2) NULL,
|
|
[orden_compra] [int] NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[cod_transp] [smallint] NULL,
|
|
[sec_transp] [smallint] NULL,
|
|
[placa] [char](10) NULL,
|
|
[cod_tarifa] [smallint] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[detalle] [char](60) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad_1] [int] NULL,
|
|
[cantidad_2] [int] NULL,
|
|
[cond_recep] [char](1) NULL,
|
|
[uso_tiempo] [char](1) NULL,
|
|
[bodega] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00015] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00015](
|
|
[fecha_conteo] [date] NULL,
|
|
[us_mod] [varchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00014] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00014](
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[precio_min] [decimal](12, 2) NULL,
|
|
[precio_lista] [decimal](12, 2) NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](10) NULL,
|
|
[fecha_crea] [datetime2](7) NULL,
|
|
[us_mod] [nchar](10) NULL,
|
|
[fecha_mod] [datetime2](7) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00013] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00013](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[tipo_prod] [char](3) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00012] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00012](
|
|
[idtrx] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_seccion] [smallint] NULL,
|
|
[cod_tramo] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](12, 4) NULL,
|
|
[balance] [decimal](12, 4) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[lado_1] [decimal](12, 4) NULL,
|
|
[lado_2] [decimal](12, 4) NULL,
|
|
[lado_3] [decimal](12, 4) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00011] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00011](
|
|
[fecha] [datetime] NOT NULL,
|
|
[bodega] [smallint] NOT NULL,
|
|
[cod_seccion] [smallint] NOT NULL,
|
|
[cod_tramo] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad] [decimal](10, 2) NOT NULL,
|
|
[balance] [decimal](12, 2) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00010] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00010](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[descripcion] [char](50) NULL,
|
|
[cod_barra1] [char](13) NULL,
|
|
[cod_barra2] [char](1) NULL,
|
|
[conversion] [smallint] NULL,
|
|
[cod_dumm1] [char](1) NULL,
|
|
[cod_dumm2] [char](12) NULL,
|
|
[cod_dumm3] [char](1) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00008] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00008](
|
|
[cod_cia] [smallint] NULL,
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha] [smalldatetime] NULL,
|
|
[fact_no] [char](10) NULL,
|
|
[conduce_no] [char](10) NULL,
|
|
[tipo] [char](2) NULL,
|
|
[orden_compra] [int] NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[cod_transp] [smallint] NULL,
|
|
[sec_transp] [smallint] NULL,
|
|
[placa] [char](10) NULL,
|
|
[cod_tarifa] [smallint] NULL,
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[detalle] [char](60) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad_1] [int] NULL,
|
|
[cantidad_2] [int] NOT NULL,
|
|
[cond_recep] [char](1) NULL,
|
|
[uso_tiempo] [char](1) NULL,
|
|
[bodega] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00007] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00007](
|
|
[num_doc] [int] NOT NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[bodega] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00006] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00006](
|
|
[cod_cia] [smallint] NULL,
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha] [smalldatetime] NOT NULL,
|
|
[fact_no] [char](10) NULL,
|
|
[conduce_no] [char](10) NULL,
|
|
[tipo] [char](2) NULL,
|
|
[orden_compra] [int] NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[cod_transp] [smallint] NULL,
|
|
[sec_transp] [smallint] NULL,
|
|
[placa] [char](10) NULL,
|
|
[cod_tarifa] [smallint] NULL,
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[detalle] [char](60) NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [int] NULL,
|
|
[cod_grupo] [int] NULL,
|
|
[cod_tipo] [int] NULL,
|
|
[cod_sec] [int] NULL,
|
|
[cantidad_1] [decimal](12, 5) NULL,
|
|
[cantidad_2] [decimal](12, 5) NOT NULL,
|
|
[cond_recep] [char](1) NULL,
|
|
[uso_tiempo] [char](1) NULL,
|
|
[bodega] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[num_req] [int] NULL,
|
|
[codigo_bloque] [nchar](25) NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[direccion] [nchar](500) NULL,
|
|
[num_oc] [int] NULL,
|
|
[bodega_d] [smallint] NULL,
|
|
[costo] [decimal](12, 5) NULL,
|
|
[id_kit] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00005] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00005](
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[descrip_mov] [char](40) NOT NULL,
|
|
[status_mov] [char](1) NOT NULL,
|
|
[cuenta_1] [char](8) NULL,
|
|
[cuenta_2] [char](8) NULL,
|
|
[cuenta_3] [char](8) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[control_clientes] [nchar](3) NOT NULL,
|
|
[control_despacho] [nchar](2) NULL,
|
|
[control_devolucion] [nchar](2) NULL,
|
|
[control_transferencia] [nchar](2) NULL,
|
|
[control_departamento] [nchar](2) NULL,
|
|
CONSTRAINT [PK_iptb00005] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_mov] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00004] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00004](
|
|
[ventas] [char](1) NULL,
|
|
[mes_ini] [char](2) NULL,
|
|
[mes_fin] [char](2) NULL,
|
|
[ano] [char](4) NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[material] [decimal](12, 4) NULL,
|
|
[labor] [decimal](12, 4) NULL,
|
|
[gastos] [decimal](12, 4) NULL,
|
|
[material_usd] [float] NULL,
|
|
[labor_usd] [float] NULL,
|
|
[gastos_usd] [float] NULL,
|
|
[tasa] [float] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
CONSTRAINT [PK_iptb00004] PRIMARY KEY CLUSTERED
|
|
(
|
|
[ano] ASC,
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00003] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00003](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[presentacion] [char](20) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00002] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00002](
|
|
[cod_cia] [smallint] NOT NULL,
|
|
[cod_n] [int] NOT NULL,
|
|
[cod_grupo] [int] NOT NULL,
|
|
[cod_tipo] [int] NOT NULL,
|
|
[cod_sec] [int] NOT NULL,
|
|
[descrip_esp] [varchar](180) NOT NULL,
|
|
[descrip_ing] [varchar](80) NULL,
|
|
[unidad_med] [varchar](50) NULL,
|
|
[nomenclatura] [varchar](50) NULL,
|
|
[bodega] [smallint] NULL,
|
|
[exist_max] [decimal](10, 2) NULL,
|
|
[exist_min] [decimal](10, 2) NULL,
|
|
[dia_llegada] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [varchar](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[control_existencia] [varchar](2) NULL,
|
|
[control_itbis] [varchar](2) NULL,
|
|
[codid] [int] IDENTITY(1,1) NOT NULL,
|
|
[foto_producto] [nchar](200) NULL,
|
|
[porc_desc] [decimal](12, 2) NULL,
|
|
[fecha_desc] [date] NULL,
|
|
[imagen] [varbinary](max) NULL,
|
|
[descuento_permitido] [nchar](10) NULL,
|
|
CONSTRAINT [PK_iptb00002_1] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[iptb00001] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[iptb00001](
|
|
[cod_n] [int] NOT NULL,
|
|
[cod_grupo] [int] NOT NULL,
|
|
[cod_tipo] [int] NOT NULL,
|
|
[cod_sec] [int] NOT NULL,
|
|
[unidad] [char](5) NULL,
|
|
[factor_conv] [numeric](12, 5) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[factor_ad] [decimal](12, 5) NULL,
|
|
CONSTRAINT [PK_iptb00001] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[inventory] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[inventory](
|
|
[itemid] [char](10) NOT NULL,
|
|
[qty] [int] NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[intb00044] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00044](
|
|
[tipo_inventario] [varchar](50) NULL,
|
|
[fecha_conteo] [date] NULL,
|
|
[disponible] [nchar](10) NULL,
|
|
[fecha_mod] [datetime] NULL,
|
|
[us_mod] [varchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[intb00043a] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00043a](
|
|
[cod_bodega] [smallint] NOT NULL,
|
|
[cod_seccion] [smallint] NOT NULL,
|
|
[cod_tramo] [smallint] NOT NULL,
|
|
[descripcion] [nchar](30) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00043$] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00043$](
|
|
[cod_bodega] [float] NULL,
|
|
[cod_seccion] [float] NULL,
|
|
[cod_tramo] [float] NULL,
|
|
[descripcion] [nvarchar](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00043] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00043](
|
|
[cod_bodega] [smallint] NOT NULL,
|
|
[cod_seccion] [smallint] NOT NULL,
|
|
[cod_tramo] [smallint] NOT NULL,
|
|
[descripcion] [varchar](50) NULL,
|
|
CONSTRAINT [PK_intb00043] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_bodega] ASC,
|
|
[cod_seccion] ASC,
|
|
[cod_tramo] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[intb00042] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00042](
|
|
[num_doc] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](18, 4) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00041] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00041](
|
|
[fecha_act] [datetime] NULL,
|
|
[idtrx] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[balance] [decimal](12, 2) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00040] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00040](
|
|
[fecha_act] [datetime] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](10, 2) NULL,
|
|
[balance] [decimal](12, 2) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00026] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00026](
|
|
[fecha] [datetime] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad_a] [decimal](12, 2) NULL,
|
|
[cantidad_b] [decimal](12, 2) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00023] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00023](
|
|
[num_doc] [int] NOT NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[bodega] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[intb00022] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00022](
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[descrip_esp] [nvarchar](30) NULL,
|
|
[descrip_ing] [nvarchar](30) NULL,
|
|
[unidad_med] [nvarchar](3) NULL,
|
|
[costo_real_ci] [decimal](9, 4) NULL,
|
|
[costo_real_si] [decimal](9, 4) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00020] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00020](
|
|
[tipo_doc] [nvarchar](1) NULL,
|
|
[num_fianza] [int] NULL,
|
|
[num_res] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[nom_buque] [nvarchar](20) NULL,
|
|
[fecha_ent] [datetime] NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[cod_pais] [nvarchar](3) NULL,
|
|
[cant_bulto] [nvarchar](20) NULL,
|
|
[num_oc] [int] NULL,
|
|
[num_emb] [smallint] NULL,
|
|
[valor_merc] [decimal](13, 3) NULL,
|
|
[cod_ca] [nvarchar](4) NULL,
|
|
[poliza] [nvarchar](10) NULL,
|
|
[prima] [decimal](10, 2) NULL,
|
|
[porc_prima] [decimal](7, 2) NULL,
|
|
[valor_desm] [decimal](7, 2) NULL,
|
|
[valor_gar] [decimal](13, 3) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](13, 3) NULL,
|
|
[cantidad_c] [decimal](13, 3) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00019] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00019](
|
|
[cod_inv] [char](2) NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cod_sp] [smallint] NOT NULL,
|
|
[cod_sp_sec] [smallint] NOT NULL,
|
|
[unidad_med] [char](4) NULL,
|
|
[conversion] [decimal](12, 4) NULL,
|
|
[precio] [decimal](12, 4) NULL,
|
|
[precio_s] [decimal](12, 4) NULL,
|
|
[descripcion] [nchar](100) NULL,
|
|
[referencia] [nchar](25) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
CONSTRAINT [PK_intb00019] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC,
|
|
[cod_sp] ASC,
|
|
[cod_sp_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[intb00018] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00018](
|
|
[documento] [int] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[fecha] [date] NULL,
|
|
[codigo_bloque] [char](25) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[ancho1] [decimal](12, 5) NULL,
|
|
[largo1] [decimal](12, 5) NULL,
|
|
[espesor1] [decimal](12, 5) NULL,
|
|
[medida1] [decimal](12, 5) NULL,
|
|
[ancho2] [decimal](12, 5) NULL,
|
|
[largo2] [decimal](12, 5) NULL,
|
|
[espesor2] [decimal](12, 5) NULL,
|
|
[medida2] [decimal](12, 2) NULL,
|
|
[cantidad] [decimal](12, 5) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[intb00015] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00015](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[semana_del] [datetime] NULL,
|
|
[semana_al] [datetime] NULL,
|
|
[exis_act] [decimal](10, 2) NULL,
|
|
[exis_fisica] [decimal](10, 2) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00014] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00014](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[categoria] [nvarchar](1) NULL,
|
|
[mes_ch] [datetime] NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00013] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00013](
|
|
[mes_ini] [nvarchar](10) NULL,
|
|
[mes_fin] [nvarchar](10) NULL,
|
|
[ano] [nvarchar](4) NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[costo_st] [decimal](12, 4) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
CONSTRAINT [PK_intb00013] PRIMARY KEY CLUSTERED
|
|
(
|
|
[ano] ASC,
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00012] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00012](
|
|
[idtrx] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_seccion] [smallint] NULL,
|
|
[cod_tramo] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](12, 4) NULL,
|
|
[balance] [decimal](12, 4) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00011] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00011](
|
|
[fecha] [datetime] NOT NULL,
|
|
[bodega] [smallint] NOT NULL,
|
|
[cod_Seccion] [smallint] NULL,
|
|
[cod_tramo] [smallint] NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad] [decimal](10, 2) NOT NULL,
|
|
[balance] [decimal](12, 2) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00010] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00010](
|
|
[cod_bodega] [smallint] NOT NULL,
|
|
[cod_seccion] [smallint] NOT NULL,
|
|
[descripcion] [nchar](30) NULL,
|
|
CONSTRAINT [PK_intb00010] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_bodega] ASC,
|
|
[cod_seccion] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00009] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00009](
|
|
[cod_bodega] [smallint] NOT NULL,
|
|
[descripcion] [nvarchar](30) NULL,
|
|
[control_existencia] [nchar](10) NULL,
|
|
CONSTRAINT [PK_intb00009] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_bodega] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00008] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00008](
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cod_sp] [smallint] NOT NULL,
|
|
[cod_sp_sec] [smallint] NOT NULL,
|
|
[precio] [decimal](10, 2) NULL,
|
|
[fecha_act] [datetime] NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00007] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00007](
|
|
[codigo_unidad] [nvarchar](3) NOT NULL,
|
|
[descripcion] [nvarchar](20) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00006] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00006](
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha] [date] NULL,
|
|
[fact_no] [nvarchar](10) NULL,
|
|
[conduce_no] [nvarchar](10) NULL,
|
|
[orden_compra] [int] NULL,
|
|
[tipo] [nvarchar](2) NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad_1] [decimal](10, 2) NULL,
|
|
[cantidad_2] [decimal](10, 2) NULL,
|
|
[depto_de] [smallint] NULL,
|
|
[depto_a] [smallint] NULL,
|
|
[cod_seccion] [nvarchar](2) NULL,
|
|
[cond_recep] [nvarchar](1) NULL,
|
|
[uso_tiempo] [nvarchar](1) NULL,
|
|
[bodega] [smallint] NOT NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[num_emp] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00005] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00005](
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[descrip_mov] [nvarchar](40) NULL,
|
|
[status_mov] [nvarchar](1) NULL,
|
|
[cuenta_1] [nvarchar](8) NULL,
|
|
[cuenta_2] [nvarchar](8) NULL,
|
|
[cuenta_3] [nvarchar](8) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
CONSTRAINT [PK_intb00005] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_mov] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00004] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00004](
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cod_n_e] [smallint] NULL,
|
|
[cod_grupo_e] [smallint] NULL,
|
|
[cod_tipo_e] [smallint] NULL,
|
|
[cod_sec_e] [smallint] NULL,
|
|
[cod_uso_e] [nvarchar](1) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00003] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00003](
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cod_n_s] [smallint] NULL,
|
|
[cod_grupo_s] [smallint] NULL,
|
|
[cod_tipo_s] [smallint] NULL,
|
|
[cod_sec_s] [smallint] NULL,
|
|
[cod_uso_s] [nvarchar](1) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[intb00002] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00002](
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[pto_reorden] [numeric](10, 2) NULL,
|
|
[existencia] [numeric](10, 2) NULL,
|
|
[cod_nab] [char](11) NULL,
|
|
[base] [numeric](10, 2) NULL,
|
|
[bodega] [smallint] NULL,
|
|
[categoria] [char](1) NULL,
|
|
[dia_llegada] [smallint] NULL,
|
|
[gravamen] [numeric](5, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
CONSTRAINT [PK_intb00002] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[intb00001] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[intb00001](
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[descrip_esp] [char](60) NOT NULL,
|
|
[descrip_ing] [char](60) NULL,
|
|
[unidad_med] [char](3) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[codid] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[inrp00002] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[inrp00002](
|
|
[cod_n] [float] NULL,
|
|
[cod_grupo] [float] NULL,
|
|
[cod_tipo] [float] NULL,
|
|
[cod_sec] [float] NULL,
|
|
[descripcion] [nvarchar](255) NULL,
|
|
[unidad] [nvarchar](255) NULL,
|
|
[existencia] [nvarchar](255) NULL,
|
|
[costos] [nvarchar](255) NULL,
|
|
[total] [nvarchar](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[encuesta] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[encuesta](
|
|
[id_encuesta] [int] NULL,
|
|
[sec_vend] [int] NULL,
|
|
[fecha] [datetime] NULL,
|
|
[cotizacion_no_movil] [int] NULL,
|
|
[pegamento] [smallint] NULL,
|
|
[derretido] [smallint] NULL,
|
|
[griferia] [smallint] NULL,
|
|
[lavamanos] [smallint] NULL,
|
|
[accesorios] [smallint] NULL,
|
|
[duchas] [smallint] NULL,
|
|
[inodoros] [smallint] NULL,
|
|
[tinas] [smallint] NULL,
|
|
[jacuzzi] [smallint] NULL,
|
|
[fregadero] [smallint] NULL,
|
|
[griferias] [smallint] NULL,
|
|
[puertas] [smallint] NULL,
|
|
[closets] [smallint] NULL,
|
|
[shutter] [smallint] NULL,
|
|
[hidrosanitario] [smallint] NULL,
|
|
[electrico] [smallint] NULL,
|
|
[cotizacion_no] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[emventas] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[emventas](
|
|
[MES] [char](20) NULL,
|
|
[VENTAS] [char](50) NULL,
|
|
[VENTAS_DIA] [decimal](18, 0) NULL,
|
|
[VENTAS_ACUM] [decimal](18, 0) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[dstb00007] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[dstb00007](
|
|
[menu1] [char](10) NULL,
|
|
[tipo_menu] [smallint] NULL,
|
|
[ruta_grafica] [char](80) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fecha_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fecha_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[dstb00006] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[dstb00006](
|
|
[programa] [char](50) NULL,
|
|
[numero_act] [char](50) NULL,
|
|
[tabla] [char](50) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[dstb00005] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[dstb00005](
|
|
[tabla] [char](9) NULL,
|
|
[descripcion] [char](40) NULL,
|
|
[num_emp1] [int] NULL,
|
|
[fecha_creacion] [smalldatetime] NULL,
|
|
[numero_act] [int] NULL,
|
|
[campo] [char](20) NULL,
|
|
[descrip_campo] [char](150) NULL,
|
|
[tipo] [char](8) NULL,
|
|
[longitud] [char](16) NULL,
|
|
[secuencia] [int] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[dstb00004] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[dstb00004](
|
|
[cod_sistema] [char](2) NULL,
|
|
[menu1] [char](9) NULL,
|
|
[programa] [char](9) NULL,
|
|
[opcion] [int] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[dstb00003] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[dstb00003](
|
|
[cod_sistema] [char](2) NULL,
|
|
[desc_sistema] [char](35) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[dstb00002] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[dstb00002](
|
|
[programa] [char](9) NULL,
|
|
[numero_act] [char](9) NULL,
|
|
[linea_no] [int] NULL,
|
|
[entradas] [char](60) NULL,
|
|
[proceso] [char](60) NULL,
|
|
[salida] [char](60) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[dstb00001] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[dstb00001](
|
|
[programa] [char](9) NULL,
|
|
[cod_sistema] [char](2) NULL,
|
|
[num_emp] [int] NULL,
|
|
[no_solicitud] [int] NULL,
|
|
[fecha_creacion] [smalldatetime] NULL,
|
|
[fecha_modificacion] [smalldatetime] NULL,
|
|
[descripcion] [char](60) NULL,
|
|
[objetivo1] [char](60) NULL,
|
|
[objetivo2] [char](60) NULL,
|
|
[numero_act] [char](60) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[diatable] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[diatable](
|
|
[dia] [smallint] NULL,
|
|
[descripcion] [char](20) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[DGII_RNC3] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[DGII_RNC3](
|
|
[Column 0] [varchar](50) NULL,
|
|
[Column 1] [varchar](50) NULL,
|
|
[Column 2] [varchar](50) NULL,
|
|
[Column 3] [varchar](50) NULL,
|
|
[Column 4] [varchar](50) NULL,
|
|
[Column 5] [varchar](50) NULL,
|
|
[Column 6] [varchar](50) NULL,
|
|
[Column 7] [varchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[DGII_RNC] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[DGII_RNC](
|
|
[RNC] [varchar](50) NULL,
|
|
[Column1] [text] NULL,
|
|
[Column2] [varchar](255) NULL,
|
|
[Column3] [varchar](255) NULL,
|
|
[Column4] [varchar](50) NULL,
|
|
[Column5] [varchar](50) NULL,
|
|
[Column6] [varchar](50) NULL,
|
|
[Column7] [varchar](255) NULL,
|
|
[Column8] [varchar](50) NULL,
|
|
[Column9] [varchar](50) NULL,
|
|
[Column10] [varchar](50) NULL,
|
|
[column11] [varchar](50) NULL
|
|
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[departamentos] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[departamentos](
|
|
[departamento] [varchar](50) NULL,
|
|
[tipo_departamento] [varchar](50) NULL,
|
|
[Column 2] [varchar](50) NULL,
|
|
[Column 3] [varchar](50) NULL,
|
|
[Column 4] [varchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[dbocodigos20] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[dbocodigos20](
|
|
[F1] [float] NULL,
|
|
[F2] [float] NULL,
|
|
[F3] [float] NULL,
|
|
[F4] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cttb000log2] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb000log2](
|
|
[fecha_lq] [date] NULL,
|
|
[fecha] [date] NULL,
|
|
[tipo_lq] [char](1) NULL,
|
|
[num_oc] [int] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](12, 2) NULL,
|
|
[costo_lq] [decimal](12, 4) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[tipo_orden] [smallint] NULL,
|
|
[programa] [nchar](20) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb000log1] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb000log1](
|
|
[fecha] [datetime] NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[programa] [nchar](20) NULL,
|
|
[estado] [nchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00042] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00042](
|
|
[num_doc] [int] NULL,
|
|
[fecha] [date] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[observacion] [char](50) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00041] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00041](
|
|
[cod_prod] [int] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](10, 4) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00039] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00039](
|
|
[ano] [smallint] NULL,
|
|
[mes] [smallint] NULL,
|
|
[valor] [decimal](12, 2) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00038] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00038](
|
|
[ventas] [char](1) NOT NULL,
|
|
[nomenclatura] [char](10) NOT NULL,
|
|
[ano] [smallint] NOT NULL,
|
|
[mes] [smallint] NOT NULL,
|
|
[costo_st] [decimal](12, 7) NOT NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00036] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00036](
|
|
[ventas] [smallint] NULL,
|
|
[fecha_lq] [date] NULL,
|
|
[num_oc] [int] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](12, 2) NULL,
|
|
[costo_lq] [decimal](12, 4) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00034] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00034](
|
|
[fecha] [date] NULL,
|
|
[cod_prod] [smallint] NULL,
|
|
[costo_lab] [decimal](12, 4) NULL,
|
|
[costo_ga] [decimal](12, 4) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00033] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00033](
|
|
[cuenta_m] [char](8) NULL,
|
|
[cuenta_l] [char](8) NULL,
|
|
[cuenta_g] [char](8) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00032] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00032](
|
|
[ano] [smallint] NULL,
|
|
[mes] [smallint] NOT NULL,
|
|
[tipo_lq] [char](1) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[reporte_ent] [int] NULL,
|
|
[num_oc] [int] NULL,
|
|
[tipo] [char](1) NULL,
|
|
[fob] [decimal](12, 2) NULL,
|
|
[flete] [decimal](12, 2) NULL,
|
|
[cost_flete] [decimal](12, 2) NULL,
|
|
[seguro] [decimal](12, 2) NULL,
|
|
[impuesto_c] [decimal](12, 2) NULL,
|
|
[gasto_ad] [decimal](12, 2) NULL,
|
|
[prima_d] [decimal](12, 2) NULL,
|
|
[cost_planta] [decimal](12, 2) NULL,
|
|
[unid_rec] [decimal](12, 2) NULL,
|
|
[cost_uni] [decimal](12, 4) NULL,
|
|
[precio_std] [decimal](12, 4) NULL,
|
|
[cost_std] [decimal](12, 3) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00029] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00029](
|
|
[cod_prod] [int] NULL,
|
|
[ano] [char](4) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[gasto_ind] [decimal](12, 5) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00028] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00028](
|
|
[ano] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[cod_prod] [int] NULL,
|
|
[fact_hombre] [decimal](13, 8) NULL,
|
|
[valor_labor] [decimal](13, 8) NULL,
|
|
[hora_hombre] [decimal](13, 8) NULL,
|
|
[valor_real] [decimal](13, 8) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00027] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00027](
|
|
[ventas] [char](1) NULL,
|
|
[mes] [smallint] NULL,
|
|
[pila] [char](10) NULL,
|
|
[primo] [decimal](12, 3) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00026] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00026](
|
|
[mes_ini] [int] NULL,
|
|
[mes_fin] [int] NULL,
|
|
[ano] [char](4) NULL,
|
|
[cod_prod] [smallint] NULL,
|
|
[costo_st] [decimal](12, 4) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00023] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00023](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[costo_imp] [decimal](12, 4) NULL,
|
|
[costo_s_imp] [decimal](12, 4) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00022] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00022](
|
|
[cod_prod] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cant_prop] [decimal](10, 8) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00021] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00021](
|
|
[ventas] [char](1) NULL,
|
|
[mes] [smallint] NULL,
|
|
[pila] [char](10) NULL,
|
|
[material] [decimal](12, 3) NULL,
|
|
[labor] [decimal](12, 3) NULL,
|
|
[gasto] [decimal](12, 3) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00018] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00018](
|
|
[turno] [smallint] NULL,
|
|
[descripcion] [char](40) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00017] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00017](
|
|
[num_doc] [int] NULL,
|
|
[fecha] [date] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[emp_no] [smallint] NULL,
|
|
[cod_mq] [smallint] NULL,
|
|
[detalle] [char](30) NULL,
|
|
[h_directa] [decimal](8, 2) NULL,
|
|
[h_indirecta] [decimal](8, 2) NULL,
|
|
[e_directa] [decimal](8, 2) NULL,
|
|
[e_indirecta] [decimal](8, 2) NULL,
|
|
[cod_prod] [smallint] NULL,
|
|
[cantidad] [decimal](12, 2) NULL,
|
|
[codigo_bloque] [char](25) NULL,
|
|
[costo_lab] [decimal](12, 5) NULL,
|
|
[costo_gasto] [decimal](12, 5) NULL,
|
|
[turno] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00016] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00016](
|
|
[referencia] [char](25) NULL,
|
|
[numero] [int] NULL,
|
|
[fecha] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00015] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00015](
|
|
[cod_n] [int] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[mes] [smallint] NULL,
|
|
[ano] [char](4) NULL,
|
|
[cantidad] [decimal](15, 5) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00014] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00014](
|
|
[cod_prod] [int] NULL,
|
|
[ano] [char](4) NULL,
|
|
[mes] [smallint] NULL,
|
|
[cantidad] [decimal](15, 5) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00013] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00013](
|
|
[fecha_lq] [date] NULL,
|
|
[fecha] [date] NULL,
|
|
[tipo_lq] [char](1) NULL,
|
|
[num_oc] [int] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [decimal](12, 2) NULL,
|
|
[costo_lq] [decimal](12, 4) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[tipo_orden] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00012] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00012](
|
|
[documento] [int] NULL,
|
|
[fecha] [date] NULL,
|
|
[codigo_bloque] [char](15) NULL,
|
|
[cod_prod] [int] NULL,
|
|
[ancho1] [decimal](12, 5) NULL,
|
|
[largo1] [decimal](12, 5) NULL,
|
|
[espesor1] [decimal](12, 5) NULL,
|
|
[medida1] [decimal](12, 5) NULL,
|
|
[ancho2] [decimal](12, 5) NULL,
|
|
[largo2] [decimal](12, 5) NULL,
|
|
[espesor2] [decimal](12, 5) NULL,
|
|
[medida2] [decimal](12, 2) NULL,
|
|
[cantidad] [decimal](12, 5) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00011] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00011](
|
|
[cod_prod] [int] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [numeric](10, 4) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00010] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00010](
|
|
[ult_num] [int] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[observacion] [char](40) NULL,
|
|
[fecha] [date] NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00009] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00009](
|
|
[formula] [int] NOT NULL,
|
|
[descripcion] [char](60) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cod_prod] [int] NULL,
|
|
[cantidad] [decimal](12, 3) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00008] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00008](
|
|
[ano] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[cod_prod] [int] NULL,
|
|
[fact_hombre] [decimal](13, 8) NULL,
|
|
[valor_labor] [decimal](13, 8) NULL,
|
|
[hora_hombre] [decimal](13, 8) NULL,
|
|
[valor_real] [decimal](13, 8) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00007] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00007](
|
|
[codigo_unidad] [char](3) NOT NULL,
|
|
[descripcion] [char](20) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00006] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00006](
|
|
[num_oc] [int] NULL,
|
|
[tipo] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cod_prod] [int] NULL,
|
|
[cantidad] [decimal](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00004] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00004](
|
|
[fecha_inicio_costo] [date] NULL,
|
|
[ano] [smallint] NULL,
|
|
[mes] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00003] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00003](
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha] [date] NOT NULL,
|
|
[departamento] [smallint] NOT NULL,
|
|
[emp_no] [smallint] NULL,
|
|
[cod_mq] [smallint] NULL,
|
|
[detalle] [char](30) NULL,
|
|
[h_directa] [numeric](8, 2) NULL,
|
|
[h_indirecta] [numeric](8, 2) NULL,
|
|
[e_directa] [numeric](8, 2) NULL,
|
|
[e_indirecta] [numeric](8, 2) NULL,
|
|
[cod_prod] [smallint] NULL,
|
|
[cantidad] [numeric](12, 2) NULL,
|
|
[codigo_bloque] [char](25) NULL,
|
|
[costo_lab] [numeric](12, 5) NULL,
|
|
[costo_gasto] [numeric](12, 5) NULL,
|
|
[turno] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00002] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00002](
|
|
[ano] [smallint] NULL,
|
|
[venta] [char](1) NULL,
|
|
[nomenclatura] [char](10) NULL,
|
|
[mes] [smallint] NULL,
|
|
[costo] [decimal](12, 4) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cttb00001] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cttb00001](
|
|
[cod_prod] [int] NOT NULL,
|
|
[descripcion] [char](50) NULL,
|
|
[unidad_med] [char](4) NULL,
|
|
[nomenclatura] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[cod_cia] [smallint] NULL,
|
|
CONSTRAINT [PK_cttb00001] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_prod] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cptb00007] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cptb00007](
|
|
[num_doc] [int] NULL,
|
|
[tipo_doc] [char](2) NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cptb00006] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cptb00006](
|
|
[tipo_doc] [char](2) NULL,
|
|
[num_doc] [char](10) NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[fecha_orig] [smalldatetime] NULL,
|
|
[fecha_proc] [smalldatetime] NULL,
|
|
[orden_no] [int] NULL,
|
|
[tipo] [char](2) NULL,
|
|
[aplica_a] [char](10) NULL,
|
|
[cta_ctble] [char](10) NULL,
|
|
[valor] [numeric](12, 2) NOT NULL,
|
|
[detalle] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cptb00005] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cptb00005](
|
|
[fecha] [smalldatetime] NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[factura] [char](10) NULL,
|
|
[cuenta_no] [char](8) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[num_doc] [char](12) NULL,
|
|
[cod_aux] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[detalles] [char](30) NULL,
|
|
[debito] [numeric](12, 2) NULL,
|
|
[credito] [numeric](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cptb00003] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cptb00003](
|
|
[fecha] [smalldatetime] NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[factura] [char](10) NULL,
|
|
[cuenta_no] [char](8) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[num_doc] [char](12) NULL,
|
|
[cod_aux] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[detalles] [char](30) NULL,
|
|
[debito] [numeric](12, 2) NULL,
|
|
[credito] [numeric](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cptb00002] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cptb00002](
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[cuenta_no] [char](8) NULL,
|
|
[num_doc] [char](10) NULL,
|
|
[fecha] [smalldatetime] NULL,
|
|
[valor] [numeric](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cptb00001] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cptb00001](
|
|
[tipo_doc] [nvarchar](2) NULL,
|
|
[num_doc] [nvarchar](10) NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[fecha_orig] [smalldatetime] NULL,
|
|
[fecha_proc] [smalldatetime] NULL,
|
|
[orden_no] [int] NULL,
|
|
[tipo] [nvarchar](2) NULL,
|
|
[aplica_a] [nvarchar](10) NULL,
|
|
[cta_ctble] [nvarchar](10) NULL,
|
|
[valor] [decimal](12, 2) NOT NULL,
|
|
[detalle] [nvarchar](60) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[country] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[country](
|
|
[code] [char](3) NULL,
|
|
[codedesc] [char](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotizacion_detalle] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotizacion_detalle](
|
|
[cotizacion_no_mob] [int] NULL,
|
|
[area] [smallint] NULL,
|
|
[descripcion_area] [varchar](50) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[descripcion] [varchar](80) NULL,
|
|
[cantidad] [decimal](12, 5) NULL,
|
|
[cantidad1] [decimal](12, 5) NULL,
|
|
[precio] [decimal](12, 2) NULL,
|
|
[porc_desc] [decimal](12, 2) NULL,
|
|
[itbis] [decimal](12, 2) NULL,
|
|
[valor] [decimal](12, 2) NULL,
|
|
[codid] [int] NULL,
|
|
[cotizacion_no] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotizacion] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotizacion](
|
|
[cotizacion_no_mob] [int] NULL,
|
|
[fecha] [date] NULL,
|
|
[ventas] [char](1) NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[nombre] [varchar](80) NULL,
|
|
[rnc] [varchar](11) NULL,
|
|
[nombre_proyecto] [varchar](50) NULL,
|
|
[direccion_proyecto] [varchar](50) NULL,
|
|
[direccion_cliente] [varchar](50) NULL,
|
|
[cond_pago] [smallint] NULL,
|
|
[descripcion] [varchar](50) NULL,
|
|
[celular] [varchar](15) NULL,
|
|
[email] [varchar](60) NULL,
|
|
[prima] [decimal](12, 2) NULL,
|
|
[porc_itbis] [decimal](12, 2) NULL,
|
|
[sec_vend] [int] NULL,
|
|
[total_bruto] [decimal](12, 2) NULL,
|
|
[monto_desc] [decimal](12, 2) NULL,
|
|
[monto_itbis] [decimal](12, 2) NULL,
|
|
[total_cotizacion] [decimal](12, 2) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[cotizacion_no] [int] NULL,
|
|
[status_t] [nchar](1) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00042] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00042](
|
|
[num_req] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[detalle1] [char](80) NULL,
|
|
[detalle2] [char](80) NULL,
|
|
[detalle3] [char](80) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00038] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00038](
|
|
[num_doc] [int] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[fecha] [date] NULL,
|
|
[num_oc] [int] NULL,
|
|
[cod_emb] [char](8) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad_o] [decimal](12, 2) NULL,
|
|
[cantidad] [decimal](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00036] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00036](
|
|
[priori_req] [smallint] NOT NULL,
|
|
[desc_priori] [char](20) NOT NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00034] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00034](
|
|
[num_oc] [int] NULL,
|
|
[num_req] [int] NULL,
|
|
[tipo] [char](2) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[num_parte] [char](12) NULL,
|
|
[cantidad] [numeric](10, 2) NULL,
|
|
[precio] [numeric](11, 3) NULL,
|
|
[cod_mon] [int] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00033] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00033](
|
|
[num_oc] [int] NULL,
|
|
[tipo] [char](2) NULL,
|
|
[fech_oc] [smalldatetime] NULL,
|
|
[num_pr] [char](10) NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[term_sp] [smallint] NULL,
|
|
[via] [char](2) NULL,
|
|
[enviada] [char](1) NULL,
|
|
[fech_enviada] [smalldatetime] NULL,
|
|
[pago] [char](1) NULL,
|
|
[fech_pago] [smalldatetime] NULL,
|
|
[cierre] [char](1) NULL,
|
|
[cod_pt] [char](4) NULL,
|
|
[c_flete] [numeric](12, 2) NULL,
|
|
[otros_g] [numeric](12, 2) NULL,
|
|
[detalle] [char](40) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00031] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00031](
|
|
[cod_mon] [int] NULL,
|
|
[descrip_mon] [char](30) NULL,
|
|
[simbolo] [char](4) NULL,
|
|
[tasa_cambio] [numeric](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00030] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00030](
|
|
[num_oc] [int] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00029] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00029](
|
|
[num_oc] [int] NULL,
|
|
[tipo] [char](2) NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[ship_to] [char](60) NULL,
|
|
[n_a_b] [char](30) NULL,
|
|
[c_i_d] [char](60) NULL,
|
|
[c_i_d1] [char](60) NULL,
|
|
[nota] [char](60) NULL,
|
|
[nota1] [char](60) NULL,
|
|
[desc_flete] [char](20) NULL,
|
|
[total_flete] [decimal](18, 2) NULL,
|
|
[desc_valor] [char](20) NULL,
|
|
[total_valor] [decimal](18, 2) NULL,
|
|
[desc_otro] [char](20) NULL,
|
|
[total_otro] [decimal](18, 2) NULL,
|
|
[descripcion] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00028] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00028](
|
|
[dia] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00027] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00027](
|
|
[cod_embarque] [smallint] NOT NULL,
|
|
[descrip_emb] [char](50) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00025] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00025](
|
|
[num_oc] [int] NULL,
|
|
[tipo] [char](2) NULL,
|
|
[num_req] [int] NOT NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[fech_emb] [smalldatetime] NULL,
|
|
[fech_ent] [smalldatetime] NULL,
|
|
[fecha_a] [smalldatetime] NULL,
|
|
[cantidad] [numeric](10, 2) NULL,
|
|
[cantidad_r] [numeric](10, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[secuencia] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00024] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00024](
|
|
[term_sp] [smallint] NULL,
|
|
[descrip_term] [char](30) NULL,
|
|
[descrip_ting] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00022] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00022](
|
|
[cod_ca] [char](4) NULL,
|
|
[nom_ca] [char](30) NULL,
|
|
[poliza] [char](15) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00019] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00019](
|
|
[cod_pt] [int] NOT NULL,
|
|
[nom_pt] [char](100) NULL,
|
|
[cod_pais] [smallint] NOT NULL,
|
|
[ciudad] [char](30) NULL,
|
|
[duracion] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
CONSTRAINT [PK_cotb00019] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_pt] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00018] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00018](
|
|
[cod_pais] [smallint] NOT NULL,
|
|
[nom_pais] [char](60) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
CONSTRAINT [PK_cotb00018] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_pais] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00017] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00017](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[procedencia] [char](30) NULL,
|
|
[cod_pt] [char](4) NULL,
|
|
[via_t] [char](2) NULL,
|
|
[seguro] [numeric](5, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00015] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00015](
|
|
[num_oc] [int] NOT NULL,
|
|
[num_req] [int] NULL,
|
|
[tipo] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[num_parte] [char](12) NULL,
|
|
[cantidad] [numeric](12, 5) NULL,
|
|
[precio] [numeric](18, 5) NULL,
|
|
[porc_desc] [decimal](18, 2) NULL,
|
|
[monto_desc] [decimal](18, 2) NULL,
|
|
[cod_mon] [int] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[numero_orden] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00014] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00014](
|
|
[num_oc] [int] NOT NULL,
|
|
[tipo] [char](2) NOT NULL,
|
|
[fech_oc] [smalldatetime] NULL,
|
|
[num_pr] [char](10) NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[term_sp] [smallint] NULL,
|
|
[via] [char](2) NULL,
|
|
[enviada] [char](1) NULL,
|
|
[fech_enviada] [smalldatetime] NULL,
|
|
[pago] [char](1) NULL,
|
|
[fech_pago] [smalldatetime] NULL,
|
|
[cierre] [char](1) NULL,
|
|
[cod_pt] [char](4) NULL,
|
|
[total_bruto] [decimal](18, 2) NULL,
|
|
[c_flete] [numeric](12, 2) NULL,
|
|
[otros_g] [numeric](12, 2) NULL,
|
|
[neto] [decimal](18, 2) NULL,
|
|
[detalle] [varchar](100) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[orden] [int] NULL,
|
|
CONSTRAINT [PK_cotb00014] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_oc] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00013] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00013](
|
|
[num_pr] [char](10) NULL,
|
|
[tipo] [char](2) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [numeric](10, 2) NULL,
|
|
[costo_mp] [numeric](10, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00012] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00012](
|
|
[num_pr] [char](10) NULL,
|
|
[tipo] [char](2) NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [numeric](10, 2) NULL,
|
|
[costo_mp] [numeric](10, 2) NULL,
|
|
[fech_emb] [smalldatetime] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00011] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00011](
|
|
[num_pr] [char](10) NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[cod_pais] [char](3) NULL,
|
|
[cod_pt] [char](4) NULL,
|
|
[fecha] [smalldatetime] NULL,
|
|
[flete] [numeric](10, 2) NULL,
|
|
[decl_cons] [numeric](10, 2) NULL,
|
|
[otros_imp] [numeric](10, 2) NULL,
|
|
[term_sp] [smallint] NULL,
|
|
[descrip_term] [char](30) NULL,
|
|
[via] [char](2) NULL,
|
|
[procesada] [char](1) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00010] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00010](
|
|
[tipo] [char](2) NULL,
|
|
[descripcion] [char](30) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00008] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00008](
|
|
[num_req] [int] NOT NULL,
|
|
[tipo_inv] [nchar](20) NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad] [numeric](10, 2) NOT NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[precio] [numeric](11, 3) NULL,
|
|
[procesada] [char](1) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[ruta_file] [nchar](100) NULL,
|
|
[documento] [varbinary](max) NULL,
|
|
CONSTRAINT [PK_cotb00008] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_req] ASC,
|
|
[tipo_inv] ASC,
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00006] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00006](
|
|
[num_req] [int] IDENTITY(1,1) NOT NULL,
|
|
[fech_req] [smalldatetime] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[cod_emp_sec] [smallint] NULL,
|
|
[fech_ent] [smalldatetime] NULL,
|
|
[uso] [char](100) NULL,
|
|
[prioridad] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[procesada] [nchar](10) NULL,
|
|
[num_oc] [int] NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[nombre_cliente] [varchar](100) NULL,
|
|
[observacion] [varchar](100) NULL,
|
|
[documento] [varbinary](max) NULL,
|
|
[nombre_file] [varchar](100) NULL,
|
|
[proveedor] [varchar](100) NULL,
|
|
CONSTRAINT [PK_cotb00006] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_req] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00005] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00005](
|
|
[cod_nab] [char](11) NULL,
|
|
[descrip_esp] [char](30) NULL,
|
|
[descrip_ing] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00004] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00004](
|
|
[cod_embarque] [smallint] NULL,
|
|
[cod_furg] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad] [numeric](10, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00003] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00003](
|
|
[cod_furg] [smallint] NULL,
|
|
[descrip_furg] [char](50) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00002] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00002](
|
|
[cod_sp] [smallint] NULL,
|
|
[cod_sp_sec] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cotb00001] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cotb00001](
|
|
[cod_sp] [smallint] NOT NULL,
|
|
[cod_sp_sec] [smallint] NOT NULL,
|
|
[nom_sp] [nvarchar](41) NULL,
|
|
[dir_sp] [nvarchar](60) NULL,
|
|
[ciu_sp] [nvarchar](30) NULL,
|
|
[cod_pais] [nvarchar](3) NULL,
|
|
[tel_sp] [nvarchar](25) NULL,
|
|
[area_sp] [nvarchar](10) NULL,
|
|
[fax_sp] [nvarchar](25) NULL,
|
|
[cont_sp] [nvarchar](30) NULL,
|
|
[term_sp] [smallint] NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
CONSTRAINT [PK_cotb00001] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cod_sp] ASC,
|
|
[cod_sp_sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[correos] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[correos](
|
|
[fecha] [datetime] NULL,
|
|
[emailto] [nchar](150) NULL,
|
|
[usubject] [nchar](150) NULL,
|
|
[cuerpo] [nchar](150) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[componentes_cocinas_gioto] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[componentes_cocinas_gioto](
|
|
[orden_no] [int] NULL,
|
|
[nivel] [smallint] NULL,
|
|
[category] [nchar](15) NULL,
|
|
[item_code] [nchar](30) NULL,
|
|
[descripcion] [varchar](80) NULL,
|
|
[cantidad] [decimal](18, 2) NULL,
|
|
[dim_x] [decimal](18, 4) NULL,
|
|
[dim_y] [decimal](18, 4) NULL,
|
|
[dim_z] [decimal](18, 4) NULL,
|
|
[unity] [varchar](10) NULL,
|
|
[Calculated_measure] [decimal](18, 2) NULL,
|
|
[porc_Delta] [decimal](18, 2) NULL,
|
|
[mesusre] [decimal](18, 2) NULL,
|
|
[precio] [decimal](18, 2) NULL,
|
|
[valor] [decimal](18, 2) NULL,
|
|
[porc_delta_calculated] [decimal](18, 2) NULL,
|
|
[delta_fixed] [decimal](18, 2) NULL,
|
|
[amount] [decimal](18, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[companias] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[companias](
|
|
[cod_comp] [char](5) NOT NULL,
|
|
[nombre] [char](40) NULL,
|
|
[rnc] [char](30) NULL,
|
|
[direccion] [char](40) NULL,
|
|
[telefono] [char](15) NULL,
|
|
[fax] [char](15) NULL,
|
|
[administrador] [char](40) NULL,
|
|
[email] [char](100) NULL,
|
|
[paginaweb] [char](100) NULL,
|
|
[direccion1] [char](50) NULL,
|
|
[telefono1] [char](15) NULL,
|
|
[fax1] [char](15) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[codnomina] [nchar](30) NULL,
|
|
[cuenta_no_inv] [nchar](10) NULL,
|
|
[dias_vence_reservas] [smallint] NULL,
|
|
[path_documentos_ordenes] [nchar](100) NULL,
|
|
[url_file_destino] [nchar](100) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[codigos22] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[codigos22](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[CODIGOS] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[CODIGOS](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[codigo21] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[codigo21](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_Sec] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[codigo20] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[codigo20](
|
|
[F1] [smallint] NULL,
|
|
[F2] [smallint] NULL,
|
|
[F3] [smallint] NULL,
|
|
[F4] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[chequeo] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[chequeo](
|
|
[dpto] [char](1) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nom_dpto] [char](30) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtbh00004] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtbh00004](
|
|
[fecha] [datetime] NULL,
|
|
[tipo] [smallint] NULL,
|
|
[ref] [nvarchar](14) NOT NULL,
|
|
[cuenta_no] [nvarchar](8) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[num_doc] [nvarchar](12) NULL,
|
|
[cod_aux] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[detalles] [nvarchar](30) NULL,
|
|
[detalle_1] [nvarchar](40) NULL,
|
|
[detalle_2] [nvarchar](40) NULL,
|
|
[debito] [decimal](12, 2) NULL,
|
|
[credito] [decimal](12, 2) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb04] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb04](
|
|
[fecha] [date] NULL,
|
|
[tipo] [smallint] NULL,
|
|
[ref] [char](14) NOT NULL,
|
|
[cuenta_no] [char](8) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[num_doc] [char](12) NULL,
|
|
[cod_aux] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[detalles] [char](30) NULL,
|
|
[detalle_1] [char](40) NULL,
|
|
[detalle_2] [char](40) NULL,
|
|
[debito] [decimal](12, 2) NULL,
|
|
[credito] [decimal](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00084] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00084](
|
|
[ventas] [smallint] NOT NULL,
|
|
[tipo_cliente] [smallint] NOT NULL,
|
|
[ano] [smallint] NOT NULL,
|
|
[mes] [smallint] NOT NULL,
|
|
[tasa] [decimal](12, 3) NULL,
|
|
CONSTRAINT [PK_cgtb00084] PRIMARY KEY CLUSTERED
|
|
(
|
|
[ventas] ASC,
|
|
[tipo_cliente] ASC,
|
|
[ano] ASC,
|
|
[mes] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00083] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00083](
|
|
[primern] [char](10) NULL,
|
|
[descrip_n] [char](60) NULL,
|
|
[aplica_a] [char](10) NULL,
|
|
[descripcion] [char](60) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00077] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00077](
|
|
[codigo_isr] [smallint] NULL,
|
|
[descripcion] [varchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00060] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00060](
|
|
[ano] [smallint] NULL,
|
|
[mes] [char](12) NULL,
|
|
[fecha_ini] [smalldatetime] NULL,
|
|
[fecha_fin] [smalldatetime] NULL,
|
|
[entrada_datos] [char](1) NULL,
|
|
[codigo_lote] [char](8) NULL,
|
|
[afecta] [char](1) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00036] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00036](
|
|
[id_estado] [int] IDENTITY(1,1) NOT NULL,
|
|
[orden_grupos] [smallint] NULL,
|
|
[grupo] [varchar](100) NULL,
|
|
[estado] [varchar](10) NULL,
|
|
[descripcion] [varchar](100) NULL,
|
|
[descripcion_estado] [varchar](50) NULL,
|
|
[tipo_estado] [varchar](50) NULL,
|
|
[signo] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00035] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00035](
|
|
[codigo_estado] [char](10) NULL,
|
|
[descripcion] [char](40) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00034] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00034](
|
|
[cuenta_no] [nchar](10) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[sec_vend] [int] NULL,
|
|
[cod_cia] [smallint] NULL,
|
|
[id] [nchar](2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00033] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00033](
|
|
[cheque_no] [int] NOT NULL,
|
|
[banco] [char](8) NOT NULL,
|
|
[fecha] [date] NULL,
|
|
[monto] [decimal](12, 2) NULL,
|
|
[portador] [char](60) NULL,
|
|
[cod_cro] [char](8) NOT NULL,
|
|
[recibido_por] [char](60) NOT NULL,
|
|
[cedula] [char](20) NOT NULL,
|
|
[direccion] [char](40) NULL,
|
|
[fecha_ent] [date] NOT NULL,
|
|
[hora_ent] [char](5) NOT NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00032] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00032](
|
|
[cheque_no] [int] NOT NULL,
|
|
[banco] [char](8) NOT NULL,
|
|
[fecha] [date] NULL,
|
|
[cod_cro] [char](8) NOT NULL,
|
|
[recibido_por] [char](60) NOT NULL,
|
|
[cedula] [char](20) NOT NULL,
|
|
[direccion] [char](40) NULL,
|
|
[fecha_ent] [date] NOT NULL,
|
|
[hora_ent] [char](5) NOT NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00031] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00031](
|
|
[cod_cro] [char](8) NULL,
|
|
[beneficiario] [char](60) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00023] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00023](
|
|
[cuenta_no] [char](8) NOT NULL,
|
|
[presupuesto] [decimal](12, 2) NOT NULL,
|
|
[ano] [smallint] NOT NULL,
|
|
[mes] [smallint] NOT NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00018] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00018](
|
|
[tipo] [smallint] NULL,
|
|
[num_oc] [int] NULL,
|
|
[rep_entrada] [int] NULL,
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[cantidad_oc] [decimal](12, 5) NULL,
|
|
[fob] [decimal](12, 3) NULL,
|
|
[costo_flete] [decimal](12, 2) NULL,
|
|
[impuesto] [decimal](12, 2) NULL,
|
|
[otros_g] [decimal](12, 2) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00017] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00017](
|
|
[tipo] [smallint] NOT NULL,
|
|
[num_oc] [int] NOT NULL,
|
|
[fecha] [datetime] NOT NULL,
|
|
[liquidada] [nvarchar](12) NULL,
|
|
[cerrada] [nvarchar](12) NULL,
|
|
[pagada] [nvarchar](12) NULL,
|
|
[rep_entrada] [int] NULL,
|
|
[factura] [nvarchar](12) NULL,
|
|
[prima_us] [decimal](8, 2) NULL,
|
|
[cod_sp] [smallint] NOT NULL,
|
|
[cod_sp_sec] [smallint] NOT NULL,
|
|
[timpuestos] [decimal](12, 2) NULL,
|
|
[tgastos] [decimal](12, 2) NULL,
|
|
[tflete] [decimal](12, 2) NULL,
|
|
[usa_calculo] [nchar](10) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00016] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00016](
|
|
[ano] [smallint] NULL,
|
|
[mes] [smallint] NULL,
|
|
[cuenta_no] [char](8) NULL,
|
|
[estado_a] [char](4) NULL,
|
|
[estado_m] [char](4) NULL,
|
|
[descripcion] [char](30) NULL,
|
|
[debito] [decimal](12, 2) NULL,
|
|
[credito] [decimal](12, 2) NULL,
|
|
[balance_ant] [decimal](12, 2) NULL,
|
|
[actividad] [decimal](12, 2) NULL,
|
|
[balance_act] [decimal](12, 2) NULL,
|
|
[primern] [nchar](10) NULL,
|
|
[programa] [varchar](50) NULL,
|
|
[departamento] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00014] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00014](
|
|
[cuenta_no] [char](8) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00012] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00012](
|
|
[cheque_no] [int] NULL,
|
|
[cuenta_no] [nvarchar](8) NULL,
|
|
[nombre_bco] [nvarchar](40) NULL,
|
|
[direccion] [nvarchar](50) NULL,
|
|
[cuenta_bank] [nvarchar](14) NULL,
|
|
[codigo_1] [nvarchar](7) NULL,
|
|
[codigo_2] [nvarchar](7) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00011] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00011](
|
|
[entrada_no] [smallint] NULL,
|
|
[descripcion] [nvarchar](60) NULL,
|
|
[prog_4gl] [nvarchar](9) NULL,
|
|
[referencia] [nvarchar](9) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00010] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00010](
|
|
[cod_mov] [smallint] NULL,
|
|
[cuenta_no] [char](8) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00009] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00009](
|
|
[cod_mov] [smallint] NULL,
|
|
[cuenta_no] [char](8) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00006] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00006](
|
|
[fecha] [date] NULL,
|
|
[numero_entrada] [smallint] NULL,
|
|
[secuencia_entrada] [int] NULL,
|
|
[mes] [smallint] NULL,
|
|
[periodo] [nchar](10) NULL,
|
|
[ref] [nchar](14) NULL,
|
|
[detalle] [nchar](100) NULL,
|
|
[informacion] [nchar](20) NULL,
|
|
[cod_sp] [smallint] NULL,
|
|
[fecha_inicial] [date] NULL,
|
|
[fecha_final] [date] NULL,
|
|
[cuenta_no] [nchar](10) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00005] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00005](
|
|
[cuenta_no] [nvarchar](8) NOT NULL,
|
|
[cheque_no] [int] NOT NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[fecha] [smalldatetime] NOT NULL,
|
|
[portador] [nvarchar](44) NOT NULL,
|
|
[tasa] [decimal](8, 2) NULL,
|
|
[monto] [decimal](12, 2) NOT NULL,
|
|
[status_impresion] [nvarchar](1) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00004] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00004](
|
|
[fecha] [datetime] NULL,
|
|
[tipo] [smallint] NULL,
|
|
[ref] [nvarchar](14) NOT NULL,
|
|
[cuenta_no] [nvarchar](8) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[num_doc] [nvarchar](12) NULL,
|
|
[cod_aux] [smallint] NULL,
|
|
[cod_sec] [smallint] NULL,
|
|
[detalles] [nvarchar](30) NULL,
|
|
[detalle_1] [nvarchar](40) NULL,
|
|
[detalle_2] [nvarchar](40) NULL,
|
|
[debito] [decimal](12, 2) NULL,
|
|
[credito] [decimal](12, 2) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00003] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00003](
|
|
[tipo] [smallint] NULL,
|
|
[clave] [char](3) NULL,
|
|
[descripcion] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00002] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00002](
|
|
[cuenta_no] [char](8) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cgtb00001] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cgtb00001](
|
|
[cuenta_no] [nvarchar](8) NULL,
|
|
[descripcion] [nvarchar](50) NULL,
|
|
[descrip_ing] [nvarchar](50) NULL,
|
|
[analitico] [nvarchar](1) NULL,
|
|
[cata] [nvarchar](1) NULL,
|
|
[depto] [nvarchar](1) NULL,
|
|
[nivel] [smallint] NULL,
|
|
[ref] [nvarchar](1) NULL,
|
|
[origen] [nvarchar](1) NULL,
|
|
[estado_a] [nvarchar](4) NULL,
|
|
[estado_m] [nvarchar](4) NULL,
|
|
[aplica_a] [nvarchar](8) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[cuenta_resultado] [char](1) NULL,
|
|
[grupo] [nchar](1) NULL,
|
|
[tipo_cuenta] [varchar](50) NULL,
|
|
[selectivo_consumo] [nchar](10) NULL,
|
|
[retencion] [nchar](10) NULL,
|
|
[codigo_isr] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00041] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00041](
|
|
[num_doc] [int] NULL,
|
|
[tipo_doc] [nchar](10) NULL,
|
|
[num_req] [int] NULL,
|
|
[fecha] [date] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00040] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00040](
|
|
[num_req] [int] NOT NULL,
|
|
[fecha] [datetime] NULL,
|
|
[usuario] [nchar](50) NULL,
|
|
[descripcion] [nchar](220) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00034] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00034](
|
|
[num_req] [int] NOT NULL,
|
|
[num_oc] [int] NOT NULL,
|
|
[cotizacion_no] [int] NOT NULL,
|
|
[id_kit] [int] NOT NULL,
|
|
[secuencia] [smallint] NOT NULL,
|
|
[area] [int] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad] [int] NOT NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00033] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00033](
|
|
[idnum] [int] NULL,
|
|
[num_doc] [int] NULL,
|
|
[num_ref] [int] NULL,
|
|
[aplica_a] [int] NULL,
|
|
[pendiente] [decimal](12, 2) NULL,
|
|
[descuento] [decimal](12, 2) NULL,
|
|
[valor_pagado] [decimal](12, 2) NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fecha_crea] [smalldatetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fecha_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00032] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00032](
|
|
[idnum] [int] IDENTITY(1,1) NOT NULL,
|
|
[num_doc] [int] NULL,
|
|
[tipo_doc] [nchar](2) NULL,
|
|
[localidad] [smallint] NULL,
|
|
[cuenta_no] [nchar](10) NULL,
|
|
[depsito] [int] NULL,
|
|
[tipo_cliente] [int] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[sec_vend] [int] NULL,
|
|
[fecha] [date] NULL,
|
|
[comentario] [nchar](80) NULL,
|
|
[valor_recibo] [decimal](12, 2) NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fecha_crea] [smalldatetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fecha_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00031] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00031](
|
|
[fecha] [datetime] NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[sec_vend] [int] NULL,
|
|
[nombreVendedor] [nchar](60) NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[nombreCliente] [nchar](60) NULL,
|
|
[num_req] [int] NULL,
|
|
[limite_cr] [decimal](12, 2) NULL,
|
|
[monto_cotizacion] [decimal](12, 2) NULL,
|
|
[balance] [decimal](12, 2) NULL,
|
|
[estado] [nchar](50) NULL,
|
|
[documento_ref] [int] NULL,
|
|
[tipo_doc_ref] [nchar](10) NULL,
|
|
[monto_req] [decimal](12, 2) NULL,
|
|
[factura] [int] NULL,
|
|
[fecha_vence] [date] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00030] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00030](
|
|
[num_req] [int] NOT NULL,
|
|
[etiqueta] [char](20) NULL,
|
|
[num_oc] [int] NOT NULL,
|
|
[secuencia] [smallint] NOT NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[lado_1] [numeric](12, 5) NULL,
|
|
[lado_2] [numeric](12, 5) NULL,
|
|
[lado_3] [numeric](12, 5) NULL,
|
|
[cantidad] [numeric](12, 5) NOT NULL,
|
|
[medida] [numeric](12, 5) NOT NULL,
|
|
[cantidad_r] [numeric](12, 5) NOT NULL,
|
|
[medida_r] [numeric](12, 5) NOT NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00029] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00029](
|
|
[num_req] [int] NOT NULL,
|
|
[mensaje] [varchar](200) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00028] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00028](
|
|
[num_temp_req] [int] NULL,
|
|
[us_crea] [char](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00027] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00027](
|
|
[num_req] [int] NOT NULL,
|
|
[etiqueta] [char](20) NULL,
|
|
[num_oc] [int] NOT NULL,
|
|
[secuencia] [smallint] NOT NULL,
|
|
[area] [smallint] NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[lado_1] [numeric](12, 5) NULL,
|
|
[lado_2] [numeric](12, 5) NULL,
|
|
[lado_3] [numeric](12, 5) NULL,
|
|
[cantidad] [numeric](12, 5) NOT NULL,
|
|
[medida] [numeric](12, 5) NOT NULL,
|
|
[cantidad_r] [numeric](12, 5) NOT NULL,
|
|
[medida_r] [numeric](12, 5) NOT NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00026] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00026](
|
|
[num_req] [int] NOT NULL,
|
|
[num_oc] [int] NOT NULL,
|
|
[cotizacion_no] [int] NOT NULL,
|
|
[id] [smallint] NOT NULL,
|
|
[area] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_Sec] [smallint] NOT NULL,
|
|
[cantidad_ord1] [decimal](12, 4) NULL,
|
|
[cantidad_ord] [decimal](12, 4) NOT NULL,
|
|
[cantidad_1] [decimal](12, 4) NULL,
|
|
[cantidad] [decimal](12, 4) NOT NULL,
|
|
[precio] [decimal](12, 2) NOT NULL,
|
|
[descuento] [decimal](8, 2) NOT NULL,
|
|
[descvalor] [decimal](10, 2) NOT NULL,
|
|
[valor] [decimal](12, 2) NOT NULL,
|
|
[estado] [nchar](20) NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](50) NOT NULL,
|
|
[fech_crea] [datetime] NOT NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[fecha_transporte] [date] NULL,
|
|
[fecha_llegada] [date] NULL,
|
|
[id_kit] [int] NULL,
|
|
CONSTRAINT [PK_cctb00026_1] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_req] ASC,
|
|
[num_oc] ASC,
|
|
[cotizacion_no] ASC,
|
|
[area] ASC,
|
|
[cod_n] ASC,
|
|
[cod_grupo] ASC,
|
|
[cod_tipo] ASC,
|
|
[cod_Sec] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00025] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00025](
|
|
[num_req] [int] NOT NULL,
|
|
[fecha] [date] NOT NULL,
|
|
[sec_vend] [smallint] NOT NULL,
|
|
[sec_vend_aprobado] [smallint] NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](50) NOT NULL,
|
|
[fech_crea] [datetime] NOT NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[estado] [nchar](20) NULL,
|
|
[fecha_transporte] [date] NULL,
|
|
[estado_despacho] [nchar](20) NULL,
|
|
[fecha_autorizacion] [datetime] NULL,
|
|
[monto_req] [decimal](12, 2) NULL,
|
|
CONSTRAINT [PK_cctb00025] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_req] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00024] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00024](
|
|
[status_mov] [int] NULL,
|
|
[descripcion] [varchar](50) NULL,
|
|
[status_t] [varchar](1) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [varchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00023] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00023](
|
|
[num_doc] [int] NULL,
|
|
[fecha] [date] NULL,
|
|
[cod_moneda] [smallint] NULL,
|
|
[cantidad] [smallint] NULL,
|
|
[valor] [decimal](18, 2) NULL,
|
|
[tipo_doc] [char](2) NULL,
|
|
[tasa] [decimal](18, 2) NULL,
|
|
[cod_cia] [smallint] NULL,
|
|
[num_trans] [int] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00022] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00022](
|
|
[cod_moneda] [smallint] NULL,
|
|
[descripcion] [char](30) NULL,
|
|
[valor] [decimal](18, 2) NULL,
|
|
[tipo_moneda] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00021] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00021](
|
|
[cod_cia] [smallint] NOT NULL,
|
|
[tipo_doc] [char](2) NOT NULL,
|
|
[descripcion] [char](50) NULL,
|
|
[debito] [char](8) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[status_mov] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[secuencia] [int] NULL,
|
|
[cxc] [char](1) NULL,
|
|
[credito] [char](8) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00020] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00020](
|
|
[cod_cia] [smallint] NULL,
|
|
[tipo_doc] [char](2) NULL,
|
|
[num_oc] [char](10) NULL,
|
|
[fecha] [date] NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [int] NULL,
|
|
[factura] [int] NULL,
|
|
[tipo_tarjeta] [char](30) NULL,
|
|
[banco] [smallint] NULL,
|
|
[referencia] [char](20) NULL,
|
|
[porc_Desc] [decimal](18, 2) NULL,
|
|
[valor_efectivo] [decimal](18, 2) NULL,
|
|
[otro_valor] [decimal](18, 2) NULL,
|
|
[observacion] [char](60) NULL,
|
|
[devuelta] [decimal](18, 2) NULL,
|
|
[num_trans] [int] NULL,
|
|
[tipo_aplica] [char](2) NULL,
|
|
[cajera] [int] NULL,
|
|
[cobrador] [int] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](40) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](40) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00019] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00019](
|
|
[num_req] [int] NOT NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00013] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00013](
|
|
[tipo_negocio] [smallint] NULL,
|
|
[descripcion] [char](30) NULL,
|
|
[cond_pago] [smallint] NULL,
|
|
[porc_desc] [decimal](12, 2) NULL,
|
|
[codigo_eis] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00011] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00011](
|
|
[cod_cia] [smallint] NULL,
|
|
[num_doc] [int] NOT NULL,
|
|
[tipo_doc] [char](2) NOT NULL,
|
|
[tipo_cliente] [int] NOT NULL,
|
|
[sec_cliente] [int] NOT NULL,
|
|
[comentario] [char](100) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[SucID] [smallint] NULL,
|
|
[chitbis] [nchar](2) NULL,
|
|
[bodega] [smallint] NULL,
|
|
[cod_emp_sec] [int] NULL,
|
|
[valor_recibo] [decimal](18, 2) NULL,
|
|
[fecha_orig] [date] NULL,
|
|
[porc_itbis] [decimal](18, 2) NULL,
|
|
[valor_bruto] [decimal](18, 2) NULL,
|
|
[descuento] [decimal](18, 2) NULL,
|
|
[monto_itbis] [decimal](18, 2) NULL,
|
|
[factura] [int] NULL,
|
|
[tasa] [float] NULL,
|
|
[imagen] [varbinary](max) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00008] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00008](
|
|
[sec_vend] [smallint] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[porc_ventas] [decimal](8, 4) NOT NULL,
|
|
[porc_cobros] [decimal](8, 4) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00005] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00005](
|
|
[idavance] [int] NULL,
|
|
[aplica_a] [int] NULL,
|
|
[num_doc] [int] NULL,
|
|
[tipo_doc] [varchar](2) NULL,
|
|
[descuento] [decimal](18, 2) NULL,
|
|
[valor_pagado] [decimal](18, 2) NULL,
|
|
[sucid] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00004] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00004](
|
|
[tipo_doc] [varchar](2) NOT NULL,
|
|
[num_doc] [int] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad] [decimal](18, 5) NOT NULL,
|
|
[precio] [decimal](18, 5) NOT NULL,
|
|
[descuento] [decimal](18, 2) NULL,
|
|
[porc_desc] [decimal](18, 2) NULL,
|
|
[itbis] [decimal](18, 2) NULL,
|
|
[num_doc_almacen] [int] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[bodega] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00003] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00003](
|
|
[cod_vend] [smallint] NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[ult_recibo] [int] NULL,
|
|
[tipo_doc] [char](2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00002] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00002](
|
|
[fecha] [datetime] NULL,
|
|
[cod_vend] [smallint] NULL,
|
|
[sec_vend] [smallint] NULL,
|
|
[sec_de] [int] NULL,
|
|
[sec_a] [int] NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[cctb00001] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[cctb00001](
|
|
[cuenta_no] [char](8) NULL,
|
|
[cod_cia] [smallint] NULL,
|
|
[tipo_doc] [char](2) NULL,
|
|
[num_doc] [int] NOT NULL,
|
|
[tipo_cliente] [smallint] NULL,
|
|
[sec_cliente] [smallint] NULL,
|
|
[cod_emp] [smallint] NULL,
|
|
[cod_emp_sec] [smallint] NULL,
|
|
[fecha_orig] [date] NULL,
|
|
[fecha_ven] [date] NULL,
|
|
[aplica_a] [int] NULL,
|
|
[banco] [int] NULL,
|
|
[num_cheque] [char](12) NULL,
|
|
[valor] [numeric](12, 2) NOT NULL,
|
|
[valor_efectivo] [numeric](12, 2) NULL,
|
|
[valor_cheque] [numeric](12, 2) NULL,
|
|
[costo] [numeric](12, 2) NULL,
|
|
[monto_desc] [numeric](12, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[bodega] [smallint] NULL,
|
|
[factura_ext] [int] NULL,
|
|
[tipo_doc_aplica] [nchar](2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[category] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[category](
|
|
[catid] [char](10) NOT NULL,
|
|
[catorder] [smallint] NULL,
|
|
[catname] [char](80) NULL,
|
|
[catdesc] [char](255) NULL,
|
|
[catpic] [char](255) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[bono2011d] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[bono2011d](
|
|
[F1] [float] NULL,
|
|
[F2] [nvarchar](255) NULL,
|
|
[F3] [float] NULL,
|
|
[F4] [nvarchar](255) NULL,
|
|
[F5] [nvarchar](255) NULL,
|
|
[F6] [nvarchar](255) NULL,
|
|
[F7] [nvarchar](255) NULL,
|
|
[F8] [float] NULL,
|
|
[DIAS] [float] NULL,
|
|
[F10] [float] NULL,
|
|
[BONIFICACION] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[bono2011] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[bono2011](
|
|
[F1] [float] NULL,
|
|
[F2] [nvarchar](255) NULL,
|
|
[F3] [float] NULL,
|
|
[F4] [nvarchar](255) NULL,
|
|
[F5] [nvarchar](255) NULL,
|
|
[F6] [nvarchar](255) NULL,
|
|
[F7] [nvarchar](255) NULL,
|
|
[F8] [float] NULL,
|
|
[DIAS] [float] NULL,
|
|
[F10] [float] NULL,
|
|
[SUELDO1] [float] NULL,
|
|
[SUELDO ] [float] NULL,
|
|
[BONIFICACION1] [float] NULL,
|
|
[BONIFICACION ] [float] NULL,
|
|
[INFOTEP] [float] NULL,
|
|
[BONIFICACION2] [float] NULL,
|
|
[F17] [nvarchar](255) NULL,
|
|
[F18] [nvarchar](255) NULL,
|
|
[F19] [float] NULL,
|
|
[F20] [float] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[bloques] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[bloques](
|
|
[cod_n] [smallint] NULL,
|
|
[cod_grupo] [smallint] NULL,
|
|
[cod_tipo] [smallint] NULL,
|
|
[cod_Sec] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[altbm00001] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[altbm00001](
|
|
[num_doc] [int] NOT NULL,
|
|
[fecha] [date] NOT NULL,
|
|
[tipo] [smallint] NOT NULL,
|
|
[orden_compra] [int] NOT NULL,
|
|
[cod_sp] [smallint] NOT NULL,
|
|
[cod_sp_sec] [int] NOT NULL,
|
|
[conduce_no] [nchar](30) NULL,
|
|
[fact_no] [nchar](30) NULL,
|
|
[bodega] [smallint] NOT NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[altbd00001] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[altbd00001](
|
|
[num_doc] [int] NOT NULL,
|
|
[cod_n] [smallint] NOT NULL,
|
|
[cod_grupo] [smallint] NOT NULL,
|
|
[cod_tipo] [smallint] NOT NULL,
|
|
[cod_sec] [smallint] NOT NULL,
|
|
[cantidad_1] [decimal](18, 4) NOT NULL,
|
|
[cantdiad_2] [decimal](18, 4) NOT NULL,
|
|
[cod_mov] [smallint] NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00053] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00053](
|
|
[doc_id] [int] NOT NULL,
|
|
[fech_aut] [datetime] NULL,
|
|
[ficha_empleado] [nvarchar](50) NULL,
|
|
[nombre_empleado] [nvarchar](50) NULL,
|
|
[departamento] [nvarchar](50) NULL,
|
|
[supervisor] [nvarchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00052] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00052](
|
|
[departamento] [smallint] NULL,
|
|
[fortalezas] [varchar](100) NULL,
|
|
[id_fortalezas] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00051] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00051](
|
|
[departamento] [smallint] NULL,
|
|
[mision] [varchar](100) NULL,
|
|
[vision] [varchar](100) NULL,
|
|
[valores] [varchar](100) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00050] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00050](
|
|
[cod_sol] [int] NOT NULL,
|
|
[id] [int] IDENTITY(1,1) NOT NULL,
|
|
[herramienta] [varchar](50) NULL,
|
|
[nivel] [varchar](50) NULL,
|
|
[tiempo_experiencia] [varchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00049] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00049](
|
|
[cod_sol] [int] NULL,
|
|
[id] [int] NULL,
|
|
[nombre_file] [varchar](100) NULL,
|
|
[binario] [varbinary](max) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00048] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00048](
|
|
[secuencia] [int] NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00047] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00047](
|
|
[cod_sol] [int] NOT NULL,
|
|
[nombre_institucion] [varchar](100) NULL,
|
|
[calle] [varchar](100) NULL,
|
|
[casa_num] [varchar](10) NULL,
|
|
[urbanizacion] [varchar](100) NULL,
|
|
[cod_educa] [smallint] NULL,
|
|
[duracion] [smallint] NULL,
|
|
[ano_termino] [smallint] NULL,
|
|
[descripcion_curso] [varchar](100) NULL,
|
|
[modalidad] [varchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00046] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00046](
|
|
[cod_sol] [int] NULL,
|
|
[enfermedad] [nchar](50) NULL,
|
|
[padecimiento] [nchar](50) NULL,
|
|
[observacion] [nchar](60) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00045] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00045](
|
|
[cod_idioma] [smallint] NULL,
|
|
[idioma] [nchar](30) NULL,
|
|
[pais] [nchar](50) NULL,
|
|
[region] [nchar](50) NULL,
|
|
[continente] [nchar](50) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00043] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00043](
|
|
[cod_sol] [int] NULL,
|
|
[idioma] [nchar](30) NULL,
|
|
[habla] [nchar](4) NULL,
|
|
[lee] [nchar](4) NULL,
|
|
[escribe] [nchar](4) NULL,
|
|
[status_t] [nchar](1) NULL,
|
|
[us_crea] [nchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[id] [smallint] NULL,
|
|
[otros_idioma] [varchar](30) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00042] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00042](
|
|
[dep_corp] [smallint] NULL,
|
|
[nombre_depto] [char](50) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00041] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00041](
|
|
[mes] [smallint] NULL,
|
|
[ano] [smallint] NULL,
|
|
[num_sem] [smallint] NULL,
|
|
[fecha_del] [date] NULL,
|
|
[fecha_al] [date] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00040] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00040](
|
|
[cod_plan] [smallint] NULL,
|
|
[plan_descrip] [char](40) NULL,
|
|
[porc_vida] [decimal](8, 4) NULL,
|
|
[porc_mid] [decimal](8, 4) NULL,
|
|
[porc_comision] [decimal](8, 4) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00038] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00038](
|
|
[num_emp] [smallint] NULL,
|
|
[cedula_n] [char](13) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00036] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00036](
|
|
[num_emp] [smallint] NULL,
|
|
[nom1_emp] [char](20) NULL,
|
|
[nom2_emp] [char](20) NULL,
|
|
[apell1_emp] [char](20) NULL,
|
|
[apell2_emp] [char](20) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00033] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00033](
|
|
[dpto] [char](1) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nom_dpto] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](30) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](30) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00032] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00032](
|
|
[num_trx] [int] NULL,
|
|
[num_emp] [int] NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[cod_mov2] [smallint] NULL,
|
|
[fecha] [date] NULL,
|
|
[num_dia] [decimal](18, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[fecha_sal] [date] NULL,
|
|
[fecha_ent] [date] NULL,
|
|
[num_nomi] [int] NULL,
|
|
[num_dias_pagados] [smallint] NULL,
|
|
[num_nomi_no] [smallint] NULL,
|
|
[num_dias_disfrute] [decimal](12, 2) NULL,
|
|
[periodo] [smallint] NULL,
|
|
[valor_vacaciones] [decimal](12, 2) NULL,
|
|
[proporcion_vacaciones] [decimal](18, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00031] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00031](
|
|
[num_doc] [int] NOT NULL,
|
|
[cod_pericia] [smallint] NOT NULL,
|
|
[status_per] [nchar](10) NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00030] Script Date: 02/07/2019 14:49:18 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00030](
|
|
[num_emp] [smallint] NULL,
|
|
[sexo] [char](1) NULL,
|
|
[nis] [nchar](25) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00029] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00029](
|
|
[departamento] [smallint] NULL,
|
|
[estado_a] [char](4) NULL,
|
|
[estado_m] [char](4) NULL,
|
|
[depto_ant] [smallint] NULL,
|
|
[estatus_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[cuenta_no] [varchar](10) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00028] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00028](
|
|
[num_trx] [int] NOT NULL,
|
|
[clave] [char](2) NOT NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
CONSTRAINT [PK_adtb00028] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_trx] ASC,
|
|
[clave] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00027] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00027](
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[fecha_sal] [date] NULL,
|
|
[fecha_ent] [date] NULL,
|
|
[dias_tomados] [int] NULL,
|
|
[dias_vac] [int] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00026] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00026](
|
|
[amon_num] [smallint] NULL,
|
|
[fecha] [date] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[violacion] [char](60) NULL,
|
|
[violacion1] [char](60) NULL,
|
|
[num1_emp] [smallint] NULL,
|
|
[departamento1] [smallint] NULL,
|
|
[nivel1_emp] [smallint] NULL,
|
|
[cod1_puesto] [smallint] NULL,
|
|
[num2_emp] [smallint] NULL,
|
|
[departamento2] [smallint] NULL,
|
|
[nivel2_emp] [smallint] NULL,
|
|
[cod2_puesto] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00025] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00025](
|
|
[cod_par] [smallint] NULL,
|
|
[desc_par] [char](11) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00024] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00024](
|
|
[nivel_emp] [smallint] NULL,
|
|
[desc_nivel] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00023] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00023](
|
|
[fecha] [date] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[hora_ent] [datetime] NULL,
|
|
[hora_sal] [datetime] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00022] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00022](
|
|
[fecha] [date] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[cod_prof] [smallint] NULL,
|
|
[evento] [smallint] NULL,
|
|
[nom_evento] [char](80) NULL,
|
|
[fech_evento] [date] NULL,
|
|
[costo_evento] [decimal](10, 2) NULL,
|
|
[num1_emp] [smallint] NULL,
|
|
[departamento1] [smallint] NULL,
|
|
[nivel1_emp] [smallint] NULL,
|
|
[cod1_puesto] [smallint] NULL,
|
|
[num2_emp] [smallint] NULL,
|
|
[departamento2] [smallint] NULL,
|
|
[nivel2_emp] [smallint] NULL,
|
|
[cod2_puesto] [smallint] NULL,
|
|
[num3_emp] [smallint] NULL,
|
|
[departamento3] [smallint] NULL,
|
|
[nivel3_emp] [smallint] NULL,
|
|
[cod3_puesto] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00021] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00021](
|
|
[num_emp] [smallint] NOT NULL,
|
|
[cod_par] [smallint] NULL,
|
|
[sec_par] [smallint] NULL,
|
|
[nombre] [char](30) NULL,
|
|
[cedula] [char](20) NULL,
|
|
[sexo] [char](1) NULL,
|
|
[fecha_nac] [date] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
CONSTRAINT [PK_adtb00021] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_emp] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00020] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00020](
|
|
[num_trx] [int] NULL,
|
|
[cod_sol] [int] NULL,
|
|
[fecha] [date] NULL,
|
|
[fech_efec] [date] NULL,
|
|
[num_emp] [int] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[sueldo_ac] [decimal](10, 2) NULL,
|
|
[nomina] [char](20) NULL,
|
|
[estado_civil] [char](1) NULL,
|
|
[tipo_sangre] [char](3) NULL,
|
|
[cod_mto] [smallint] NULL,
|
|
[observacion] [char](60) NULL,
|
|
[num1_emp] [smallint] NULL,
|
|
[departamento1] [smallint] NULL,
|
|
[nivel1_emp] [smallint] NULL,
|
|
[cod1_puesto] [smallint] NULL,
|
|
[num2_emp] [smallint] NULL,
|
|
[departamento2] [smallint] NULL,
|
|
[nivel2_emp] [smallint] NULL,
|
|
[cod2_puesto] [smallint] NULL,
|
|
[num3_emp] [smallint] NULL,
|
|
[departamento3] [smallint] NULL,
|
|
[nivel3_emp] [smallint] NULL,
|
|
[cod3_puesto] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[sueldo_lq] [decimal](18, 2) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00019] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00019](
|
|
[cod_sol] [smallint] NULL,
|
|
[fech_efec] [date] NULL,
|
|
[sueldo] [decimal](10, 2) NULL,
|
|
[cod_mto] [smallint] NULL,
|
|
[sec_mto] [smallint] NULL,
|
|
[periodo] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00018] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00018](
|
|
[fecha] [date] NULL,
|
|
[cod_sol] [smallint] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[num3_emp] [smallint] NULL,
|
|
[departamento3] [smallint] NULL,
|
|
[nivel3_emp] [smallint] NULL,
|
|
[cod3_puesto] [smallint] NULL,
|
|
[recomendacion] [smallint] NULL,
|
|
[otros_com] [char](60) NULL,
|
|
[num1_emp] [smallint] NULL,
|
|
[departamento1] [smallint] NULL,
|
|
[nivel1_emp] [smallint] NULL,
|
|
[cod1_puesto] [smallint] NULL,
|
|
[num2_emp] [smallint] NULL,
|
|
[departamento2] [smallint] NULL,
|
|
[nivel2_emp] [smallint] NULL,
|
|
[cod2_puesto] [smallint] NULL,
|
|
[cod_requi] [smallint] NULL,
|
|
[ind_requi] [char](1) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00017] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00017](
|
|
[num_trx] [int] NULL,
|
|
[cod_sol] [smallint] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[fech_efec] [datetime] NULL,
|
|
[salario] [decimal](10, 2) NULL,
|
|
[cod_mto] [smallint] NULL,
|
|
[sec_mto] [smallint] NULL,
|
|
[nivel_sal] [smallint] NULL,
|
|
[liquidacion] [decimal](10, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](30) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](30) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00016] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00016](
|
|
[cod_sol] [smallint] NULL,
|
|
[nom_empr] [char](30) NULL,
|
|
[calle] [char](30) NULL,
|
|
[casa_num] [char](10) NULL,
|
|
[barrio] [char](20) NULL,
|
|
[urbanizacion] [char](20) NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[sueldo] [decimal](10, 2) NULL,
|
|
[ano_ini] [smallint] NULL,
|
|
[ano_fin] [smallint] NULL,
|
|
[desc_retiro] [char](60) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00015] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00015](
|
|
[cod_sol] [smallint] NULL,
|
|
[nom_inst] [varchar](100) NULL,
|
|
[calle] [varchar](100) NULL,
|
|
[urbanizacion] [varchar](100) NULL,
|
|
[puesto] [varchar](100) NULL,
|
|
[fecha_inicio] [date] NULL,
|
|
[fecha_termino] [date] NULL,
|
|
[observacion] [varchar](100) NULL,
|
|
[sueldo] [decimal](18, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[telefono] [varchar](20) NULL,
|
|
[email] [varchar](100) NULL,
|
|
[url] [varchar](100) NULL,
|
|
[contacto] [varchar](100) NULL,
|
|
[puesto_contacto] [varchar](100) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00014] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00014](
|
|
[secuencia] [int] NOT NULL,
|
|
[cod_sol] [smallint] NULL,
|
|
[nom_ref] [char](100) NULL,
|
|
[anos_rel] [smallint] NULL,
|
|
[telefono] [char](20) NULL,
|
|
[calle] [char](100) NULL,
|
|
[casa_num] [char](10) NULL,
|
|
[parentesco] [char](30) NULL,
|
|
[urbanizacion] [char](100) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00013] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00013](
|
|
[cod_sol] [smallint] NULL,
|
|
[cod_par] [smallint] NULL,
|
|
[sec_par] [smallint] NULL,
|
|
[nombre] [char](100) NULL,
|
|
[cedula] [char](20) NULL,
|
|
[sexo] [char](1) NULL,
|
|
[telefono] [varchar](20) NULL,
|
|
[fecha_nac] [date] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[edad] [smallint] NULL,
|
|
[ocupacion] [varchar](100) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00012] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00012](
|
|
[cod_sol] [smallint] NULL,
|
|
[fecha] [date] NULL,
|
|
[nom1_sol] [char](15) NULL,
|
|
[nom2_sol] [char](15) NULL,
|
|
[apell1_sol] [char](15) NULL,
|
|
[apell2_sol] [char](15) NULL,
|
|
[calle] [char](50) NULL,
|
|
[casa_num] [char](10) NULL,
|
|
[barrio] [char](30) NULL,
|
|
[urbanizacion] [char](30) NULL,
|
|
[telefono] [char](15) NULL,
|
|
[cod_provincia] [smallint] NULL,
|
|
[fech_nac] [date] NULL,
|
|
[cod_nac] [smallint] NULL,
|
|
[estado_civil] [char](1) NULL,
|
|
[estatura] [char](4) NULL,
|
|
[peso] [smallint] NULL,
|
|
[tipo_documento] [nchar](20) NULL,
|
|
[cedula] [nchar](11) NOT NULL,
|
|
[serie] [smallint] NULL,
|
|
[licencia] [char](11) NULL,
|
|
[tipo_sangre] [char](3) NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[cod_prof] [smallint] NULL,
|
|
[sexo] [char](1) NULL,
|
|
[afp] [nchar](80) NULL,
|
|
[ars] [nchar](80) NULL,
|
|
[numero_nss] [nchar](50) NULL,
|
|
[seguro_complementario] [nchar](25) NULL,
|
|
[categoria_licencia_conducir] [nchar](10) NULL,
|
|
[sueldo_deseado] [decimal](12, 2) NULL,
|
|
[pariente_emergencia] [nchar](60) NULL,
|
|
[parentesco_emergencia] [nchar](60) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[familiar_emp] [nchar](10) NULL,
|
|
[familiar_parentesco] [nchar](50) NULL,
|
|
[vehiculo_propio] [nchar](2) NULL,
|
|
[tipo_vivienda] [varchar](50) NULL,
|
|
[email] [varchar](100) NULL,
|
|
[cuenta_bancaria] [varchar](50) NULL,
|
|
[banco] [varchar](100) NULL,
|
|
[arrestado] [nchar](10) NULL,
|
|
[motivo_arresto] [varchar](100) NULL,
|
|
[sometido_justicia] [varchar](100) NULL,
|
|
[motivo_sometido_justicia] [varchar](100) NULL,
|
|
[foto_solicitante] [varbinary](max) NULL,
|
|
[celular] [varchar](15) NULL,
|
|
[no_afiliacion] [varchar](25) NULL,
|
|
[telefono_contacto_emergencia] [varchar](15) NULL,
|
|
CONSTRAINT [PK_adtb00012] PRIMARY KEY CLUSTERED
|
|
(
|
|
[cedula] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00011] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00011](
|
|
[num_doc] [smallint] NULL,
|
|
[fecha] [date] NULL,
|
|
[fech_req] [date] NULL,
|
|
[depart] [smallint] NULL,
|
|
[tipo_req] [smallint] NULL,
|
|
[razon_vac] [char](30) NULL,
|
|
[cod_puesto_r] [smallint] NULL,
|
|
[edad_min] [smallint] NULL,
|
|
[salario_sem] [decimal](10, 2) NULL,
|
|
[salario_men] [decimal](10, 2) NULL,
|
|
[experiencia] [smallint] NULL,
|
|
[cod_educa] [smallint] NULL,
|
|
[num_emp] [smallint] NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[num1_emp] [smallint] NULL,
|
|
[departamento1] [smallint] NULL,
|
|
[nivel1_emp] [smallint] NULL,
|
|
[cod1_puesto] [smallint] NULL,
|
|
[num2_emp] [smallint] NULL,
|
|
[departamento2] [smallint] NULL,
|
|
[nivel2_emp] [smallint] NULL,
|
|
[cod2_puesto] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00010] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00010](
|
|
[cod_prof] [smallint] NULL,
|
|
[nom_prof] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00009] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00009](
|
|
[cod_mto] [smallint] NULL,
|
|
[desc_mto] [char](50) NULL,
|
|
[tipo_mov] [nchar](25) NULL,
|
|
[cod_mov] [smallint] NULL,
|
|
[cod_mov2] [smallint] NULL,
|
|
[cod_mov3] [smallint] NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00008] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00008](
|
|
[cod_requi] [smallint] NULL,
|
|
[requisito] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00007] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00007](
|
|
[cod_nac] [smallint] NULL,
|
|
[nom_nac] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00006] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00006](
|
|
[cod_pericia] [smallint] NULL,
|
|
[nom_pericia] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00005] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00005](
|
|
[cod_educa] [smallint] NULL,
|
|
[nom_educa] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00004] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00004](
|
|
[cod_puesto] [smallint] NULL,
|
|
[nom_puesto] [char](180) NULL,
|
|
[otra_descripcion] [nchar](180) NULL,
|
|
[funciones] [char](60) NULL,
|
|
[funcion1] [char](60) NULL,
|
|
[nivel_sal] [smallint] NULL,
|
|
[salario_min] [decimal](10, 2) NULL,
|
|
[salario_max] [decimal](10, 2) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00003] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00003](
|
|
[num_emp] [smallint] NOT NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nivel_emp] [smallint] NULL,
|
|
[cod_puesto] [smallint] NULL,
|
|
[nom1_emp] [char](15) NULL,
|
|
[nom2_emp] [char](15) NULL,
|
|
[apell1_emp] [char](15) NULL,
|
|
[apell2_emp] [char](15) NULL,
|
|
[tipo_empleado] [char](20) NULL,
|
|
[fecha_termino_c] [date] NULL,
|
|
[calle] [char](50) NULL,
|
|
[casa_num] [char](10) NULL,
|
|
[barrio] [char](50) NULL,
|
|
[urbanizacion] [char](50) NULL,
|
|
[credito] [nchar](10) NULL,
|
|
[telefono] [char](15) NULL,
|
|
[fech_nac] [date] NULL,
|
|
[cod_nac] [smallint] NULL,
|
|
[estado_civil] [char](1) NULL,
|
|
[tipo_sangre] [char](3) NULL,
|
|
[cedula] [char](11) NULL,
|
|
[serie] [smallint] NULL,
|
|
[licencia] [char](9) NULL,
|
|
[sueldo_ac] [decimal](10, 2) NULL,
|
|
[nomina] [char](1) NULL,
|
|
[fech_efec] [date] NULL,
|
|
[fecha_salida] [date] NULL,
|
|
[paga_seg] [char](1) NULL,
|
|
[cod_seg1] [char](11) NULL,
|
|
[cod_seg2] [smallint] NULL,
|
|
[cod_seg3] [smallint] NULL,
|
|
[tipocuenta] [nchar](1) NULL,
|
|
[cuenta_no] [varchar](25) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[foto_empleado] [varbinary](max) NULL,
|
|
[sucid] [smallint] NULL,
|
|
[monto_seg_med] [decimal](18, 0) NULL,
|
|
[monto_seg_int] [decimal](18, 0) NULL,
|
|
[monto_care] [decimal](18, 0) NULL,
|
|
[fecha_ultimo_aumento] [date] NULL,
|
|
[moneda] [nchar](3) NULL,
|
|
[codbancodestino] [nchar](8) NULL,
|
|
[digiverbancodestino] [nchar](1) NULL,
|
|
[tipo_sueldo] [char](20) NULL,
|
|
[email] [varchar](100) NULL,
|
|
[instalador] [nchar](10) NULL,
|
|
[cuenta_aux] [nchar](10) NULL,
|
|
CONSTRAINT [PK_adtb00003] PRIMARY KEY CLUSTERED
|
|
(
|
|
[num_emp] ASC
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00002] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00002](
|
|
[cod_seccion] [nvarchar](2) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[nom_seccion] [nvarchar](30) NULL,
|
|
[status_t] [nvarchar](1) NULL,
|
|
[us_crea] [nvarchar](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [nvarchar](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
/****** Object: Table [dbo].[adtb00001] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[adtb00001](
|
|
[departamento] [smallint] NULL,
|
|
[nom_dpto] [char](30) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [smalldatetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [smalldatetime] NULL,
|
|
[tipo_departamento] [nchar](20) NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[actb00010] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[actb00010](
|
|
[id_etiqueta] [int] IDENTITY(1,1) NOT NULL,
|
|
[fecha] [datetime] NULL,
|
|
[tipo_inenvatio] [varchar](50) NULL,
|
|
[codigo] [varchar](50) NULL,
|
|
[cantidad] [decimal](18, 5) NULL,
|
|
[lado_1] [decimal](18, 5) NULL,
|
|
[lado_2] [decimal](18, 5) NULL,
|
|
[lado_3] [decimal](18, 5) NULL,
|
|
[medida] [decimal](18, 5) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[codid] [int] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[actb00005] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[actb00005](
|
|
[codigo] [smallint] NULL,
|
|
[descripcion] [varchar](30) NULL,
|
|
[cuenta_no] [varchar](8) NULL,
|
|
[cta_depr] [varchar](8) NULL,
|
|
[cta_gasto] [char](8) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[fech_compra] [date] NULL,
|
|
[duracion] [int] NULL,
|
|
[fech_elim] [date] NULL,
|
|
[status_t] [varchar](1) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [varchar](50) NULL,
|
|
[fech_mod] [datetime] NULL,
|
|
[codigo_n] [smallint] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[actb00004] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[actb00004](
|
|
[rowid] [int] IDENTITY(1,1) NOT NULL,
|
|
[codigo] [int] NULL,
|
|
[num_doc] [varchar](10) NULL,
|
|
[fecha] [date] NULL,
|
|
[cod_mov] [int] NULL,
|
|
[tasa_cambio] [decimal](7, 2) NULL,
|
|
[monto] [decimal](12, 2) NULL,
|
|
[observacion] [char](40) NULL,
|
|
[status_t] [varchar](1) NULL,
|
|
[us_crea] [varchar](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [varchar](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[actb00002] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[actb00002](
|
|
[cod_mov] [smallint] NOT NULL,
|
|
[descrip] [char](30) NOT NULL,
|
|
[tipo_mov] [char](1) NULL,
|
|
[uso] [char](1) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](50) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](50) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[actb00001] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[actb00001](
|
|
[rowid] [int] IDENTITY(1,1) NOT NULL,
|
|
[codigo] [smallint] NULL,
|
|
[descripcion] [char](40) NULL,
|
|
[cuenta_no] [char](8) NULL,
|
|
[cta_depr] [char](8) NULL,
|
|
[cta_gasto] [char](8) NULL,
|
|
[departamento] [smallint] NULL,
|
|
[fech_compra] [date] NULL,
|
|
[duracion] [int] NULL,
|
|
[fech_elim] [date] NULL,
|
|
[referencia] [varchar](25) NULL,
|
|
[fabricante] [varchar](50) NULL,
|
|
[status_t] [char](1) NULL,
|
|
[us_crea] [char](9) NULL,
|
|
[fech_crea] [datetime] NULL,
|
|
[us_mod] [char](9) NULL,
|
|
[fech_mod] [datetime] NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Table [dbo].[account] Script Date: 02/07/2019 14:49:17 ******/
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_PADDING ON
|
|
GO
|
|
CREATE TABLE [dbo].[account](
|
|
[userid] [char](80) NOT NULL,
|
|
[email] [char](80) NOT NULL,
|
|
[firstname] [char](80) NOT NULL,
|
|
[lastname] [char](80) NOT NULL,
|
|
[status] [char](2) NULL,
|
|
[addr1] [char](80) NOT NULL,
|
|
[addr2] [char](40) NULL,
|
|
[city] [char](80) NOT NULL,
|
|
[state] [char](80) NULL,
|
|
[zip] [char](20) NOT NULL,
|
|
[country] [char](3) NOT NULL,
|
|
[phone] [char](80) NOT NULL,
|
|
[langpref] [char](80) NOT NULL,
|
|
[favcategory] [char](10) NULL,
|
|
[mylistopt] [int] NULL,
|
|
[banneropt] [int] NULL,
|
|
[sourceapp] [char](3) NOT NULL
|
|
) ON [PRIMARY]
|
|
GO
|
|
SET ANSI_PADDING OFF
|
|
GO
|
|
/****** Object: Default [DF_ventas_porc_itbis] Script Date: 02/07/2019 14:49:19 ******/
|
|
ALTER TABLE [dbo].[ventas] ADD CONSTRAINT [DF_ventas_porc_itbis] DEFAULT ((0)) FOR [porc_itbis]
|
|
GO
|
|
/****** Object: ForeignKey [FK_seg0008_seg0008] Script Date: 02/07/2019 14:49:19 ******/
|
|
ALTER TABLE [dbo].[seg0008] WITH CHECK ADD CONSTRAINT [FK_seg0008_seg0008] FOREIGN KEY([depto])
|
|
REFERENCES [dbo].[seg0008] ([depto])
|
|
GO
|
|
ALTER TABLE [dbo].[seg0008] CHECK CONSTRAINT [FK_seg0008_seg0008]
|
|
GO
|